cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to read field the first time but works the second time!

maneesh.vemula1
Level 5
I am working on a windows based application and bot is able to open the application but takes around 2 minutes to read a field - the wait time is around 10 secs but it is taking 2 mins to ultimately exception out but when immediately retried it is able to extract the field within 2 seconds. Whenever I try to read that field again after resetting everything, it is still able to read the value within 2 seconds. It is just the first time when interacting with the application - it is taking around 2-5 minutes to ultimately exception out.

I have used AA method to spy the field. All other spying techniques are not working properly. 

Please let me know if you have any suggestions or reasoning behind this behavior.

Thank You
2 REPLIES 2

John__Carter
Staff
Staff
A difficult one to diagnose from here but here are some suggestions.

Probably the 2 mins is App Modeller working through every element in order to determine that it can't find any match. And maybe the reason is because at the Read moment the element is not 'ready', so App Modeller continues its (hopeless) search through the rest of the screen. And maybe the reason the 2nd attempt works is because by then the element is ready. I may be wrong on this but as an experiment, try (manually) pausing for a few seconds before the read to see if that changes anything.

Another thing to check is that the wait stage is waiting for the same element that you are reading. If they are different then perhaps the assumption that 'element A exists therefore B must also exist' is not true. Again, this is a guess that may be incorrect.

Hi Maneesh,

As you have mentioned you are using AA mode, There are chances that the element attributes which are present, looking for the application window to be active before looking for the element. Please have a look.