Test XPath Locators
open | ./tests/html/test_locators.html |
verifyText | xpath=//a | this is the first element
verifyText | xpath=//a[@class='a2'] | this is the second element
verifyText | xpath=//*[@class='a2'] | this is the second element
verifyText | xpath=//a[2] | this is the second element
verifyElementNotPresent | xpath=//a[@href='foo'] |
verifyAttribute | xpath=//a[contains(@href,'#id1')]/@class | a1
verifyElementPresent | xpath=//a[text()="this is the second element"] |
verifyText | //a | this is the first element
verifyAttribute | //a[contains(@href,'#id1')]/@class | a1
verifyText | xpath=(//table[@class='stylee'])//th[text()='theHeaderText']/../td | theCellText