Adding @state='complete' to /dom
Posted: 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 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
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