filmov
tv
How To Write Customized Xpath In Selenium Webdriver | Selenium Webdriver Tutorial

Показать описание
We have seen howto use the browser tool to generate your xpath for any element or object on a web page
Why would you want to know how to generate your own Xpath or know how to customise Xpaths?
For one you need to know various methods to generate an xpath and for another reason browser generated xpath are not 100 percent full proof
I have yet to see one that has not worked oin my test script but not ever web page or site are developed with the same amount of care
Check out the syntax for customised xpath @ my blog day 11 How To Write Customized Xpath In Selenium Webdriver
Once you have inspected the element or object you want to create you own xpath for it comes down to substituting tagname, attribute and attribute value from HTML code for that element into yout xpath syntax and you are good to
go
Remember every xpath you generate you can use the developer console tab to validate and check if it's correct before you start using it for scripting
See you tomorrow @ day 12
--------------------------------------------------------------------------------------------------------
Follow me @
--------------------------------------------------------------------------------------------------------
My Videos:
-------------------------------------------------------------------------------------------------------