Link : https://www.skptricks.com/2018/04/css...
CSS Selector is the combination of an element selector and a selector value which identifies the web element within a web page. The composite of element selector and selector value is known as Selector Pattern. Selector Pattern is constructed using HTML tags, attributes and their values. The central theme behind the procedure to create CSS Selector and Xpath are very much similar underlying the only difference in their construction protocol.
In this post we are going to discuss how to use css selector in selenium WebDriver java. Most of the automation testers believe that using CSS selectors makes the execution of script faster compared to XPath locator. CSS Selector locator is always the best way to locate elements on the page. CSS is always same irrespective of browsers.
In this example we are going to locate "button" field of user registration page by its Class using CSS Selector.
Link : https://www.skptricks.com/2018/04/css...