I’m wondering if xpath has a way to test an element for a class. I currently have the ID, I would just like to be able to test to ensure JS added a class.
My element where I’m testing to see if id=foo contains class=red.
<span id="foo" class="red">test</span>
I’m assuming you would use xpathCount?
getXpathCount(("//a[@id='foo']") not sure what goes next).equals(1);
I’ve also tried this without success,
getXpathCount("//span[@id='foo'].span[contains(@class,'red')]").equals(1);
The xpath to use would be