Element found only after Refresh browser

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Vlad
Posts: 2
Joined: Tue Jun 25, 2019 3:18 pm

Element found only after Refresh browser

Post by Vlad » Tue Jun 25, 2019 3:31 pm

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)

User avatar
Stub
Posts: 265
Joined: Fri Jul 15, 2016 1:35 pm

Re: Element found only after Refresh browser

Post by Stub » Wed Jun 26, 2019 7:42 am

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.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5068
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Element found only after Refresh browser

Post by odklizec » Wed Jun 26, 2019 7:49 am

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?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Vlad
Posts: 2
Joined: Tue Jun 25, 2019 3:18 pm

Re: Element found only after Refresh browser

Post by Vlad » Thu Jun 27, 2019 12:47 pm

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.