Field clear issue
Home › Forums › Ask Expert › Field clear issue
- This topic has 11 replies, 2 voices, and was last updated 7 years, 2 months ago by Sasha ZAP.
-
AuthorPosts
-
October 30, 2017 at 12:40 pm #31406Asif QureshiParticipantOctober 30, 2017 at 1:03 pm #31407Sasha ZAPModerator
Hello aqu,
This happens because you first use the method “Click” which sets the position of the caretcursor in the middle of the object (“TestABC”):
Instead of using “Click” please use Exist”.Let me know if this helps.
Thanks,
ZAPTEST TeamOctober 30, 2017 at 1:24 pm #31440Asif QureshiParticipantHi ZAPTEST Team,
Nothing happened same problem is coming.
See modified codeRegards,
AQUAttachments:October 30, 2017 at 1:42 pm #31441Sasha ZAPModeratorHello aqu,
Please let me know the following:
After you run this piece of script can you open the test’s results and check if the object does get recognized (If the Exist method found the objectת in the results you have to see the object highlighted).If it does please sent me the test’s final results.
Thanks,
ZAPTEST TeamOctober 30, 2017 at 1:51 pm #31442Asif QureshiParticipantOctober 30, 2017 at 1:57 pm #31443Sasha ZAPModeratorHello aqu,
In the final test’s results I cannot see if the expected object was found (Sometimes ZAPTEST may find similar object instead the required one):
Please click the “ExtendCollapse Rows” button so we can see if rows’ #16 and #17 show the object.Thanks,
ZAPTEST TeamAttachments:October 30, 2017 at 2:13 pm #31444Asif QureshiParticipantHi ZAPTEST Team,
Now you can see the value. 🙂
Please see attachment.Regards,
AUQAttachments:October 30, 2017 at 2:31 pm #31445Sasha ZAPModeratorHello aqu,
I need to see if the Exist method finds the object, if you expended all rows then as I understood now the Exist method’s execution is in line #24, correct?
If yes then it appears the Exist method found some other object and not the “TestABC” object (If this is true then this is the reason why the Type “” method’s execution did not work as expected).To verify it please do the following:
1. Run the test again.
2. After it finishes in ZAPTEST go to Tools -> Options -> Runtime -> Results Folder -> Click the “Open” button and find the last test’s results, please attach it to your next reply.Thanks,
ZAPTEST TeamOctober 30, 2017 at 2:43 pm #31446Asif QureshiParticipantOctober 30, 2017 at 3:15 pm #31447Sasha ZAPModeratorThanks aqu.
Change the Exist method with the DblClick method, and leave the Type “” method.Please let me know if it worked.
Thanks,
ZAPTEST Team.October 30, 2017 at 5:08 pm #31448Asif QureshiParticipantHi ZAPTEST Team,
After DblClick method, there are two issues are come.
Issue-1:
It take around 15 second to clear the field.Issue2:
I used same method in password screen. it did not clear the complete field why?See attached file
Regards,
AUQAttachments:October 30, 2017 at 6:19 pm #31449Sasha ZAPModeratorHello aqu,
The 2 issues you’ve mentioned may be because the objects are not being recognized properly during Runtime.
Please try to use the following code (Change the “object” object to the one you wish to execute the code upon):
‘Click on the object
Application(“Application”).View(“View”).Object(“object”).Click
‘Click key Home keyboard key
Application(“Application”).KeyPress 36
‘Press Shift keyboard key
Application(“Application”).KeyDown 16
‘Click the End keyboard key
Application(“Application”).KeyPress 35
‘Release Shift keyboard key
Application(“Application”).KeyUp 16
‘Click key Backspace keyboard key
Application(“Application”).KeyPress 8Please note if the above code will not work there is a possibility that you’ll have to redefine the objects in ZAPTEST Object Repository.
Please let me know if the above helped.
Thanks,
ZAPTEST Team -
AuthorPosts
- You must be logged in to reply to this topic.