Page 1 of 1

Element found only after Refresh browser

Posted: Tue Jun 25, 2019 3:31 pm
by Vlad
When I run the test case an object is not found/clicked by Renorex but if I refresh (CTRL+F5) the browser and manually go at that step (where the object is not found ) then automatically the object is found and the test case continue and runs successfully. Could you please tell me if you encountered a similar problem and how did you solve it ?

No element found for path '/dom[@domain='XXX']/body/div[19]/div[2]//tag[@tagname='mat-dialog-content']/div/tag/div//tag[@tagname='cwa-add-pa-type']/div/div/div[1]/div[1]/span/span/span/span' at step 'body' after 842 attempts within 1.5m.

Chrome Version: 75.0.3770.100 (Official Build) (64-bit)

Re: Element found only after Refresh browser

Posted: Wed Jun 26, 2019 7:42 am
by Stub
Your RxPath is probably too vague and needs some work done to it. You'll want to compare snapshots of the system when it can and cannot find the element, to figure out what the difference is and hence wrong with your RxPath. Indices are often very problematic indeed.

Re: Element found only after Refresh browser

Posted: Wed Jun 26, 2019 7:49 am
by odklizec
Hi,

I agree with Stub. Your xpath definitely needs some refinements. Indexes are first thing you should eliminate, because they are fragile and prone to changes. Could you please post a Ranorex snapshot (NOT screenshot) of your app, so we can check it and eventually suggest better xpath?

Re: Element found only after Refresh browser

Posted: Thu Jun 27, 2019 12:47 pm
by Vlad
I succeeded and I identified the problem.
After refresh (CTRL+F5) the path of the element was changing.
Thank you for your time and your answers.