fbpx

Scan GUI not recognizing Text boxes

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.
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #31457
    Bruce Spring
    Participant

      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.

      #31458
      Sasha ZAP
      Moderator

        Hello 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 Team

        #31459
        Bruce Spring
        Participant

          My 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.

          #31460
          Sasha ZAP
          Moderator

            Hello 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 Team

            #31461
            Bruce Spring
            Participant

              Attached are some screen captures. the .txt has the simple script and explains issue with WPF app. esp. the comments in the script

              #31462
              Sasha ZAP
              Moderator

                Hello 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.

                #31463
                Bruce Spring
                Participant

                  Here it is.

                  Attachments:
                  #31464
                  Sasha ZAP
                  Moderator

                    Hello 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 Team

                    #31465
                    Bruce Spring
                    Participant

                      Still doesn’t work.
                      I uncommented the IF statement and it times out as well.
                      I also changed the “Precision” to “Low” to no avail.

                      #31466
                      Valentin ZAP
                      Keymaster

                        Hello 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 Team

                        #31467
                        Bruce Spring
                        Participant

                          Timing 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.

                          #31468
                          Valentin ZAP
                          Keymaster

                            Hello 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 Team

                            Attachments:
                            #31469
                            Bruce Spring
                            Participant

                              Woo hoo. Works as expected. Thanks.

                              #31543
                              LN Jena
                              Participant

                                where is the answer?

                                #31546
                                Sasha ZAP
                                Moderator

                                  Hello 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

                                Viewing 15 posts - 1 through 15 (of 15 total)
                                • You must be logged in to reply to this topic.

                                Virtual Expert

                                ZAPTEST

                                ZAPTEST Logo