Page 1 of 1

Adding @state='complete' to /dom

Posted: Tue Sep 24, 2019 2:45 pm
by qa-auto
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 post 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

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

Posted: Wed Sep 25, 2019 9:27 am
by odklizec
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.

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

Posted: Wed Sep 25, 2019 2:12 pm
by qa-auto
Hi Pavel,

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

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

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

Posted: Tue Oct 22, 2019 2:51 pm
by cs97jjm3
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

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

Posted: Fri Oct 25, 2019 4:38 pm
by qa-auto
You're welcome! Good to hear.