Issue with List.FindRow and List.GetRowText
Home › Forums › Ask Expert › Issue with List.FindRow and List.GetRowText
- This topic has 10 replies, 4 voices, and was last updated 7 years, 1 month ago by Sasha ZAP.
-
AuthorPosts
-
November 10, 2017 at 12:08 am #31483Bruce SpringParticipant
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
November 10, 2017 at 6:07 pm #31485Sasha ZAPModeratorHello 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 TeamNovember 10, 2017 at 6:56 pm #31486Sasha ZAPModeratorHello 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 TeamNovember 13, 2017 at 4:58 pm #31487Bruce SpringParticipantHere is the .zap and the two most result files.
BTW I was off Friday.
November 15, 2017 at 8:10 pm #31498Sasha ZAPModeratorHello bruce.spring,
Please download the new ZAPTEST 17.4.0 version and try again.
Thanks,
ZAPTEST TeamNovember 15, 2017 at 9:56 pm #31499Bruce SpringParticipantThe “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:November 16, 2017 at 11:48 am #31502Valentin ZAPKeymasterHello 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 TeamNovember 16, 2017 at 7:05 pm #31503Bruce SpringParticipantI 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.November 20, 2017 at 12:55 pm #31505Sasha ZAPModeratorHello 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 TeamNovember 21, 2017 at 12:17 pm #31506thashan chettyParticipantHi 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 dilemmaNovember 21, 2017 at 3:57 pm #31507Sasha ZAPModeratorHello 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 -
AuthorPosts
- You must be logged in to reply to this topic.