BrowserStack
browserstack.com › home › guide › css selectors cheat sheet (basic & advanced)
CSS Selectors Cheat Sheet (Basic & Advanced) | BrowserStack
March 20, 2025 - An exhaustive CSS Selectors Cheat Sheet with examples to help locate HTML elements for Browser Automation using Selenium.
What is XPath in Selenium?
XPath is a method where Selenium navigates via the HTML page structure. It lets the testers go through the XML document structure, which you can use on both XML and HTML documents.
testmuai.com
testmuai.com › testmu ai › blog › the most comprehensive selenium locators cheat sheet | testmu ai
The Most Comprehensive Selenium Locators Cheat Sheet | TestMu AI ...
Which is the best locator to use in Selenium?
Even though there are different types of locators in Selenium, many users prefer the Selenium ID locator to locate the needed WebElements on any page since it’s the fastest method. Selenium ID locators would be unique for each DOM element.
testmuai.com
testmuai.com › testmu ai › blog › the most comprehensive selenium locators cheat sheet | testmu ai
The Most Comprehensive Selenium Locators Cheat Sheet | TestMu AI ...
Which locator is faster CSS or XPath?
CSS selectors have a tendency to perform faster and reliably in comparison to XPath in the majority of the browsers. They are quite short and easier when you read them.
testmuai.com
testmuai.com › testmu ai › blog › the most comprehensive selenium locators cheat sheet | testmu ai
The Most Comprehensive Selenium Locators Cheat Sheet | TestMu AI ...
Videos
43:05
The ONLY CSS Selectors Guide You Need! #seleniumwebdriver ...
02:04:38
Selenium Java Training - Session 17 - CSS Selectors - Cheat-sheet ...
01:09:45
CSS Selectors in Selenium WebDriver | Web Automation Testing | ...
01:07:15
Session 23 - Selenium with Java | Locators - CSS Selector - YouTube
01:15:52
Selenium CSS Selector Tutorial - CSS Selectors in Selenium WebDriver ...
06:41
Selenium CSS Selector #2 - Write CSS Selector using Class Attribute ...
Automate The Planet
automatetheplanet.com › home › most exhaustive webdriver locators cheat sheet
Most Exhaustive WebDriver Locators Cheat Sheet
July 26, 2023 - So, I created the first and most exhaustive Selenium WebDriver cheat sheet dedicated to the locators. I hope that you will find it quite useful. Enjoy! Table of Contents · Default FindElement WebDriver Methods · Default FindsBy WebDriver Attributes · Complete XPath Locators' List · Complete CSS Selectors' List ·
Cheat Sheets
cheat-sheets.org › saved-copy › Locators_table_1_0_2.pdf pdf
Category Recipe XPath (1.0 – 2.0) CSS (CSS1 – 3) DOM Selenium General
Sprinkled with Selenium usage tips, this is both a general-purpose set of recipes for each technology as well as a cross-reference to map from one to another.
SmartBear
support.smartbear.com › crossbrowsertesting › docs › automated-testing › frameworks › selenium › about › css-selectors.html
CSS Selectors to XPath Cheatsheet | CrossBrowserTesting Documentation
January 10, 2023 - CSS Selectors to XPath Cheatsheet · Applies to CrossBrowserTesting SaaS, last modified on January 10, 2023 · CSS and XPath can both be used to denote locations in an XML document. These 2 syntaxes help guide your Selenium tests and allow automation to follow your well thought out test strategy.
Testmuai
testmuai.com › testmu ai › blog › the most comprehensive selenium locators cheat sheet | testmu ai
The Most Comprehensive Selenium Locators Cheat Sheet | TestMu AI (Formerly LambdaTest)
February 17, 2026 - Li:nth-of-child: Index of the referenced child element in CSS selector. Our Selenium locators cheat sheet would be incomplete without talking about the Selenium relative locators. A major feature of Selenium 4 is relative locators. This helps you search different WebElements which you can relate to different elements.
Mozilla
quality.mozilla.org › 2013 › 03 › very-nice-xpath-and-css-selector-locator-cheat-sheet-for-selenium
Very nice xpath and css selector locator cheat sheet for Selenium | Mozilla Quality Assurance
I was recently asked by a colleague for some advice on locators and I shared this cheat sheet with him. It contains just about everything you need to know for formulating locators for use with Selenium (and also Marionette), and includes syntax for both xpath and css selectors.
Cheatography
cheatography.com › janesh › cheat-sheets › css-selectors-for-selenium-webdriver › pdf pdf
CSS Selectors for Selenium WebDriver Cheat Sheet
February 28, 2018 - CSS Selectors for Selenium WebDriver Cheat Sheet · by Janesh via cheatography.com/56285/cs/14924/ CSS Selector Reference · Selector · Example · Description · #id · #txtUs‐ · ername · Select element with id="txtUserna‐ · me" .class ·
Ghost Inspector
ghostinspector.com › home › css selector cheat sheet for automated browser testing
CSS Selector Cheat Sheet for Automated Browser Testing
September 11, 2025 - XPath is supported by both Selenium and by Ghost Inspector, so this is a good option when matching an element by its text contents makes sense — which is fairly often. For more details on using XPath, check out our CSS to XPath Conversion Guide. And if you’d like to refer back to any of these tips, save our CSS Selector Cheat Sheet infographic below.
BrowserStack
browserstack.com › home › guide › mastering selenium css selectors in 2026
CSS Selector in Selenium: Locate Elements with Examples | BrowserStack
December 10, 2025 - What is the difference between XPath and CSS selectors in Selenium? XPath supports navigating both forward and backward in the DOM, while CSS selectors allow only forward traversal. However, CSS selectors typically perform faster and are more concise, making them easier to maintain in most projects. ... An exhaustive CSS Selectors Cheat Sheet with examples to help locate HTML elements for Browser Autom...
Medium
medium.com › @amritaangappaa › the-most-comprehensive-selenium-locators-cheat-sheet-340c5920f678
The Most Comprehensive Selenium Locators Cheat Sheet | by Amrita Angappa | Medium
August 1, 2022 - Li:nth-of-child: Index of the referenced child element in CSS selector. Our Selenium locators cheat sheet would be incomplete without talking about the Selenium relative locators. A major feature of Selenium 4 is relative locators. This helps you search different WebElements which you can relate to different elements.