How to validate xPath (whether the written xpath exist in page or name)
Steps:
1) Load the URL in chrome browser
2) Right click on mouse and select inspect option
3) Select inspect option in tool bar (first option (has arrow symbol))
4) Now select which filed locator you want
5) It highlights html code with blue color
6) Right click on high lighted line
7) select Copy
8) select copy xpath
9) Go to console tab
xpath validation - $x ($x("//*[@id='pass']"))
css validation - $ ($("#loginbutton"))
Steps:
1) Load the URL in chrome browser
2) Right click on mouse and select inspect option
3) Select inspect option in tool bar (first option (has arrow symbol))
4) Now select which filed locator you want
5) It highlights html code with blue color
6) Right click on high lighted line
7) select Copy
8) select copy xpath
9) Go to console tab
xpath validation - $x ($x("//*[@id='pass']"))
css validation - $ ($("#loginbutton"))
No comments:
Post a Comment