I’m looking for a way to combine 2 XPath selectors into 1 to use in Selenium IDE, so I can check if an element with a certain ID has a certain class.
These 2 selectors do work but aren’t narrowing enough to do an assertElementPresent on.
xpath= .//*[contains (@class,'ui-tabs-hide')]
xpath= .//*[@id='${newTableID}']
I’ve unsuccesfully tried following XPath
xpath= .//*[contains (@class,'ui-tabs-hide')]/*[@id='${newTableID}']
Can anyone help me out on this one please?
Thanks,
J.
Use:
Do note how
contains()is specified. This guarantees that elements with classnames having the wanted class name as prefix or as suffix, will not be selected.