Writing Customized CSS Selectors In Cypress

Опубликовано: 27 Февраль 2026
на канале: Teach Yourself Test Automation
558
5

Writing Customized CSS Selectors In Cypress: https://teachyourselftestautomation.com
Follow My personal development growth journey:   / owasuik  

Hello, Hello, Hello..My Name is Kevin Owasu Itoe

Welcome, welcome, welcome...

Today the video is on writing customized CSS selectors in Cypress.

Cypress on supports CSS selectors in use for locating elements on a web page.

However, you can customize various locator attributes into customized CSS selectors.

The main four options to customize CSS selectors in Cypress are;

ID name - #idname
Class name - .classname .search_query.form-control.ac_input
Attributes - [attribute=value] [name=search_query]
Tag name - tagname#idname or tagname.classname or tagname[attribute=value]

So to customize the id attribute into a CSS selector you add a hashtag before the id name.

And for the class name, to customize it you add a dot in front of the class name.

Above is on writing customized CSS selectors in Cypress

Hopefully, you found this video helpful please like, comment, and consider subscribing

Follow my journey - subscribe to my YouTube channel:https://www.youtube.com/channel/UCbme...

Hope this video was helpful, if so consider subscribing.

Many Thanks
Stay blessed always

My name is Kevin Owasu Itoe

Writing Customized CSS Selectors In Cypress: https://teachyourselftestautomation.com
--------------------------------------------------------------------------------------------------------
Follow me
@Facebook:   / kevin.itoe.5.  .
Pinterest: https://www.pinterest.co.uk/owasuik/
My Blog: http://teachyourselftestautomation.com/
My YouTube Channel: https://www.youtube.com/channel/UCbme....
My Quora: https://www.quora.com/profile/Teach-Y
--------------------------------------------------------------------------------------------------------
This video:
Writing Customized CSS Selectors In Cypress:    • Writing Customized CSS Selectors In Cypress  
--------------------------------------------------------------------------------------------------------
Other Videos you might be interested in:
Serenity BDD with selenium, cucumber, and juint:    • Serenity BDD With Selenium | Cucumber | Junit  Cypress
The Modern Web Application Automation Test Tool: What Is Cypress | Why Learn Cypress:    • What is Cypress | Why Learn Cypress | An A...  
Download And Setup Path To System Variables For Node.js:    • Download And Set Up Path To System Variabl...  Download
Visual Studio Code | Code Editor Javascript IDE:    • Download Visual Studio Code Code Editor Ja...  
Cypress ps1 cannot be loaded because running scripts is disabled on this system:    • Cypress ps1 cannot be loaded because runni...  
Cypress Project Setup And Installation On Windows 10:    • Cypress Project Setup And Installation On ...  
Launch Cypress Test Runner Via Terminal:    • Launch Cypress Test Runner Via Terminal  
Write Your First Test In Cypress:   • Write Your First Test In Cypress  
Cypress Supported Browsers:    • Cypress Supported Browsers  
Cypress Commands Get Type Click | Test Automation With Cypress:    • Cypress Commands Get Type Click | Test Aut...  
Cypress Command Log:    • Cypress Command Log  
Cypress Selector Playground:    • Cypress Selector Playground  
Intelligent Code Completion | IntelliSense Visual Studio Code:   / zmt2-thi1e  
Writing Customized CSS Selectors In Cypress:    • Writing Customized CSS Selectors In Cypress  
-------------------------------------------------------------------------------------------------------
Test automation: https://en.wikipedia.org/wiki/Test_au
--------------------------------------------------------------------------------------------------------
#cypress #cssselectorcypress #cypresslocatorstrategy