Scan GUI not recognizing Text boxes
Home › Forums › Ask Expert › Scan GUI not recognizing Text boxes
- This topic has 14 replies, 4 voices, and was last updated 7 years ago by Sasha ZAP.
-
AuthorPosts
-
November 1, 2017 at 6:40 pm #31457Bruce SpringParticipant
I am evaluating the free version (17.3.9) and following along the Tutorials. When I Scan the GUI – the tutorial’s login page in Chrome: https://www.zaptest.com/tutorial/login, ZapTest does NOT recognize the two text boxes. I have Scanned it multiple times to no avail. A little frustrating. Is this because it is the free version?
Clicking Button works. My problem there. But Text boxes still not being recognized.
November 1, 2017 at 8:00 pm #31458Sasha ZAPModeratorHello bruce.spring,
The URL you’ve mentioned (www.zaptest.com/tutorial/login) is basically a tutorial video which asks to follow its instructions upon the real ZAP’s demo page which is:
http://demo.zap-t.com/login – This is the actual URL you need to use for your GUI scan.In order for ZAPTEST to locate a GUI object it needs the object to be “described” as much as possible in the object’s properties:
The best description an object can have so ZAPTEST will recognize it is its caption and color, the 2 mentioned text-boxes except of their position and size they do not have much more significant features to be recognized by ZAPTEST – In order for ZAPTEST to recognize such generic objects it is best to “anchor” them to much more recognizable objects (You see in each object’s properties the property “Relative Object”, which means the easy to recognize by ZAPTEST object you relate the generic object to).In the same page, next to the highlighted tutorial lesson’s line there is a download button for the “Login.zap” test, in it you can see how the mentioned text boxes are being recognized, for example the Username text-box was set to the “Username” caption above it (The “Username” caption was set as a Relative Object to the Username text-box) and so it will be assigned in the testing script as follow:
Application(“Demo”).View(“Login”).Object(“Username”).Object(“txtUsername”).Hope this makes sense.
Thanks,
ZAPTEST TeamNovember 1, 2017 at 10:02 pm #31459Bruce SpringParticipantMy bust on the URL. I understand what you are talking about with respect to anchoring. But I have nothing to anchor.
My issue is that in the tutorial the “Scan GUI” function “finds” the two text boxes under their respective labels: Username and Password. They are “highlighted” and listed in the Repository Explorer as “Image Objects”. Their object names are then changed to more descriptive text.
In my case these are not being recognized by ZapTest. They are not listed in the Repository Explorer. So I cannot “use” them.I have figured out how to use the Create Zap Object, placing the object over the respective text box that wasn’t found, and Relating it to the respective label. It now works.
ZapTest didn’t find one of the textboxes on a WPF Windows application that I wrote. It did find one though. The one it found was not as wide as the 2 in the tutorial and the other one in my app.
I was just wondering why ZapTest did not recognize the text boxes initially. And what kind of work around I can use.
November 1, 2017 at 10:45 pm #31460Sasha ZAPModeratorHello bruce.spring,
Basically there may be different reasons why the object is not being recognized (Setting o the object a Relative Object is one of the better ways to recognize the object by ZAPTEST).
Please attach your testing script and add a screenshot of the problematic object ZAPTEST cannot recognize.Thanks,
ZAPTEST TeamNovember 3, 2017 at 6:35 pm #31461Bruce SpringParticipantAttached are some screen captures. the .txt has the simple script and explains issue with WPF app. esp. the comments in the script
Attachments:November 3, 2017 at 7:34 pm #31462Sasha ZAPModeratorHello bruce.spring,
I need to understand why your testing script does not recognizes the object, in order to do so I need also the test’s Object Repository and its GUI Map – In order to get all these features please do the following:
1. In ZAPTEST open your testing script and run it again.
2. When finished go to File -> Save As and save the test to accessible directory, the file is a *.zap type file – Please attach this file to this post.Thanks,
ZAPTEST Team.November 3, 2017 at 7:37 pm #31463Bruce SpringParticipantHere it is.
Attachments:November 3, 2017 at 8:39 pm #31464Sasha ZAPModeratorHello bruce.spring,
Basically in my end the “File Name” object was found successfully.
Please change the “FileName” object’s Property Recognition Type from “OCR (Single)” to “OCR (Partial)”, then run the test again.
Please let me know if this helped.Thanks,
ZAPTEST TeamNovember 3, 2017 at 9:08 pm #31465Bruce SpringParticipantStill doesn’t work.
I uncommented the IF statement and it times out as well.
I also changed the “Precision” to “Low” to no avail.November 3, 2017 at 9:38 pm #31466Valentin ZAPKeymasterHello Bruce.Spring!
Could you describe your problem in details? When you are talking about timeout what do you get in ZAPTEST Report. Could you send your report with all steps: exist, click and type?
It could be different situations:
1. ZAPTEST cannot find your application
Please be sure that ZAPTEST can find your application. It’s simple to check, launch the script and after that your application is run, try to switch focus to ZAPTEST or other application. ZAPTEST should switch back to your application. If not, please check that properties: “regexpwndtitle” and “regexpwndclass” are set correctly.2. ZAPTEST cannot find your object
It could happen when text is hard to recognise using OCR technologies. To improve this situation you could set text color different to black and then use TextColorTolerance property to adjust the best object detection.It could be the first problem: in case when class or title could be different for every app execution. Simply try to clean “regexpwndclass” property for your Application(“PhotoDemoApp”) object and then try again. It should work in case if your application has static header: “Process Picture Files”.
Let us know if you resolve your issue and, please, attach your report to inspect your problem.
Thank you,
ZAPTEST TeamNovember 3, 2017 at 9:46 pm #31467Bruce SpringParticipantTiming Out – is when a line of script is executing it will sit at the line for 10’s of seconds before “failing” and moving on to the next line.
The script is finding and executing my .exe file find.
Here are 2 result files. ! with the IF statement commented out and 1 with it uncommented.
November 3, 2017 at 9:52 pm #31468Valentin ZAPKeymasterHello Bruce.Spring!
After execution ZAPTEST works with your application according Application() object settings. I have checked your report file. ZAPTEST cannot find application window (focus this window to capture screen image) and my suggestion should work: please correct application settings.
I have attached your example with updated Application object. Let us know if you resolve your issue.
Thank You,
ZAPTEST TeamAttachments:November 3, 2017 at 10:01 pm #31469Bruce SpringParticipantWoo hoo. Works as expected. Thanks.
December 7, 2017 at 3:56 pm #31543LN JenaParticipantwhere is the answer?
December 7, 2017 at 5:12 pm #31546Sasha ZAPModeratorHello jena.lnarayan,
It appears you replied in a different topic then the one you’ve just opened:
If you still want to check answer in this topic you need to go to its previous pages (At the bottom of this page there are numbers of the previous pages).Thanks,
ZAPTEST Team -
AuthorPosts
- You must be logged in to reply to this topic.