Wednesday, May 1, 2019

Making the Move With ID Locator in Selenium WebDriver

If you are beginning with Selenium, you may be unsure about what to do and how to do it? In my opinion, I find locators to be the best place to start learning Selenium. Locators are the foundation of building your Selenium Script. With the use of locators, one can locate the element on the web page. Not only is locating an element important but making sure it’s fast and accurate is equally as important. One such locator is the ID locator in Selenium WebDriver that does this business.

When to Opt for ID Locator in Selenium WebDriver?

Using ID Locator in Selenium WebDriver is the fastest and the most reliable among all the locators. ID’s are supposed to be unique to each element, making the ID locator as a dependable choice. Since browsers do not make it mandatory for ID to be unique, thereby making developers take leverage of it and may lead to ID’s either not present as part of an attribute or autogenerated, or not unique to a page. Due to the mentioned issues, it may require switching to other locators.



from DZone.com Feed http://bit.ly/2J1UvPA

No comments:

Post a Comment