Adding @state='complete' to /dom

Ranorex Spy, Recorder, and Studio.
qa-auto
Posts: 37
Joined: Mon Aug 05, 2019 10:46 pm

Adding @state='complete' to /dom

Post by qa-auto » Tue Sep 24, 2019 2:45 pm

Hi,

This is an info sharing post.

A left menu link panel in my app has caused issues because of intermittent locator failures. I tried changing the Path multiple times to various adapter attributes, adding href even - nothing was consistently found. Skimmed through the forums yesterday and found a posted about waiting for the page to fully load (especially when you use EnsureVisible), and learned about the @state='complete' you can add to the Base /dom. Added it and the test ran successfully 11 times in a row!

To add it in the Studio, open the repository view, and in the Base set Path to
/dom[@domain~'yourdomain.com' and @state='complete']

(I think this needs to be in the documentation...or a blog. I didn't see it in either. Sure would save some headaches and time especially as you ramp up on the tools.)

Best,
Lorinda

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

Re: Adding @state='complete' to /dom

Post by odklizec » Wed Sep 25, 2019 9:27 am

Hi Lorinda,

I agree that @state='complete' is a very useful feature, which is somewhat unknown and should be more propagated. It's on my personal Rx tips&tricks list I'm distributing among new Rx users in our company. However, it's worth to mention that this trick may not work with all web pages! As far as I remember, it does not work with Ajax-based webs.
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

qa-auto
Posts: 37
Joined: Mon Aug 05, 2019 10:46 pm

Re: Adding @state='complete' to /dom

Post by qa-auto » Wed Sep 25, 2019 2:12 pm

Hi Pavel,

Good deal. It's really helped in testing our ASP.NET app.

Have a good day (or night =) )!
Lorinda

cs97jjm3
Posts: 14
Joined: Mon Jan 14, 2019 4:30 pm

Re: Adding @state='complete' to /dom

Post by cs97jjm3 » Tue Oct 22, 2019 2:51 pm

Thanks, guys this little snippet is great: 100% of my work is testing web .ASP.Net.... Odklizec - fancy sharing with us :D :D :D :-) Thanks again