fbpx

Issue with List.FindRow and List.GetRowText

Issue with List.FindRow and List.GetRowText

Home Forums Ask Expert Issue with List.FindRow and List.GetRowText

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #31483
    Bruce Spring
    Participant

      I have a 4 item list. It works fine when selecting an item and moving on.
      I added .GetRowText(int rownum) to validate list contents. I use 1 through 4. I never get any text returned. I get an empty string.

      I added .FindRow (string). I call it 4 times once for each string in the list. It always finds the string but it doesn’t return a consistent row value. One time through the test all 4 strings are found in row 1. Another time 2 are found in row 1 and the other 2 are found in their respective row. Another all 4 are found in their respective row.
      The only wrong row value returned is 1.

      Don’t know if there is a setting I can use to rectify these.

      Thanks

      #31485
      Sasha ZAP
      Moderator

        Hello bruce.spring,

        Can you please attached your testing script (Save the script to an accessible directory and attach the *.zap saved file to the forum’s post) and a full detailed screenshot which will contain the entire objects you wish to find (Add also an explanation which are the problematic objects).

        Thanks,
        ZAPTEST Team

        #31486
        Sasha ZAP
        Moderator

          Hello again bruce.spring,

          Regarding the “GetText” method:
          The R&D fixed a bug in the “GetText” method, once the latest fixed version of ZAPTEST will be public I’ll let you know and you’ll be able to download it and try again.

          I’m sorry for the trouble.

          Thanks,
          ZAPTEST Team

          #31487
          Bruce Spring
          Participant

            Here is the .zap and the two most result files.

            BTW I was off Friday.

            #31498
            Sasha ZAP
            Moderator

              Hello bruce.spring,

              Please download the new ZAPTEST 17.4.0 version and try again.
              Thanks,
              ZAPTEST Team

              #31499
              Bruce Spring
              Participant

                The “FindRow” function has been working well for me lately (before the upgrade). I made the script shorter and haven’t had a problem since. Whether it is related or not.

                The “GetRowText” is returning text after the upgrade. It took some arranging of the object’s size and location on the GUI Map so that it would not include the leading border as a “l” at the beginning of the text string.

                There is an issue with the Font though. I am including the screen shot of the list box. You will see the capital “I” (eye) is quite obvious as the 2nd letter. GetRowText is returning it as a lower case “l” (ell). I set breakpoints and looked at the Local Variable’s contents.

                Currently FindRow() is working for me.

                Attachments:
                #31502
                Valentin ZAP
                Keymaster

                  Hello Bruce.Spring!

                  When we works with OCR or Image recognition we always can have some probability for each operation. In your example because of the font is difficult to separate 2 letters: ‘I’ and ‘l’. But if we start talking about some whole world such mistake doesn’t add some problem:

                  Let’s see the example: take a word “Ingredient” -> let’s imagine that ZAPTEST recognise it as ‘lngredient’, but if we recalculate the precision (probability) it will almost 90% -> it means that Exist method could find this world anyway and others method like click could generate mouse clicks.

                  GetText() (and similar to this) is an additional method and here we should understand such possible mistakes and process it in a right way depending on your goal (calculate probability of operation). Otherwise Exist method is the great way to check that object exists.

                  Also we could improve OCR recognition changing color/color tolerance/gamma and possible symbols. For example we can exclude symbol ‘l’ from possible symbols and ZAPTEST makes right recognition. But this way ZAPTEST cannot recognise symbol ‘l’ if it appears in different part of word.

                  Let us know if you still have some questions.

                  Thank You,
                  ZAPTEST Team

                  #31503
                  Bruce Spring
                  Participant

                    I understand the limitations of OCR. And have been playing around with the objects settings to see how the recognition goes.
                    I have some red text on a light gray background that fails “Exist”. I changed the object’s text color to Red from Black and it still failed “Exist”. Should I set color back to Black and manipulate the Gamma to get more contrast?
                    I won’t be able to test this until Friday the 17th.

                    #31505
                    Sasha ZAP
                    Moderator

                      Hello bruce.spring,

                      Yes, please try it as well.
                      To get string recognition you need to set the ColorToleranceGamma properties until you’ll get the right combination which will help ZAPTEST to recognize the text, also you can increase the size of the object’s rectangle so there will be no problems getting the entire appeared string.

                      Thanks,
                      ZAPTEST Team

                      #31506
                      thashan chetty
                      Participant

                        Hi My name is thashan
                        I have just started testing with Zaptest.I started with the free version as i wanted to see how the look and feel of the application works.I noticed running the same script on chrome browser is giving me 100 % results yet when i run the same script on another browser from the datatable i am not getting the same results.Please help me as i am stuck in this dilemma

                        #31507
                        Sasha ZAP
                        Moderator

                          Hello thashan20,

                          Thank you for trying ZAPTEST.

                          Basically in order to test same testing script in different Browsers’ types you need to make sure the GUI of the AUT (Application Under Test) appears exactly the same in the Browsers you wish to test (Also the size and location of the objects appear in all Browser’s type exactly the same), if there are some differences in the GUI appearance your script will fail:
                          In such case it is best to scan the GUI of the AUT in each Browser type and set a condition (If…Then statement) to the objects your test is failing upon;
                          The condition will make sure what type of Browser is being executed and based on it the test will use its unique objects.

                          Hope this makes sense.

                          Thanks,
                          ZAPTEST Team

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

                        Virtual Expert

                        ZAPTEST

                        ZAPTEST Logo