CSS selector is used by browsers to target specific HTML elements and apply styles. For web browser automation, Selenium webdriver uses CSS selectors to locate and perform an action on an object instead of applying a style.
Selenium RC was using Sizzle-JavaScript CSS selector engine for CSS locating but in WebDriver, native browser support is used for CSS queries. If a browser does not have native support, then Sizzle will be used.
Tips for writing better CSS Selector:
Useful CSS Selector Examples:
I hope it helps.
Written by: Asiq Ahamed
Comments(0)