How to find xPath in Chrome browser
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) paste in your selenium code
10) Works fine
ex- facebook email filed (//*[@id="email"])
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) paste in your selenium code
10) Works fine
ex- facebook email filed (//*[@id="email"])
No comments:
Post a Comment