3 ms·
I ended up writing a Selenium-IDE plugin for a similar thing with hierarchical "data-test-label" attributes, since our test-team seemed unwilling to actually le
by Terr_ 13y ago
I ended up writing a Selenium-IDE plugin for a similar thing with hierarchical "data-test-label" attributes, since our test-team seemed unwilling to actually learn XPath, and the default Selenium-IDE output was far too hyper-specific and brittle.
Ugly but standards-following output:
xpath=(((
//.[@data-test-label='foo'])[1]
//.[@data-test-label='bar'])[1]
//.[@data-test-label='baz'])[1]
/a
This defines a three-step search which skips over a lot of probably-unimportant tags.