Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
CSS Selector & XPath Masterclass
Rating: 4.5 out of 5(24 ratings)
1,111 students

CSS Selector & XPath Masterclass

Master All The Techniques To Select Web Elements With CSS Selectors & XPath
Created byRahul Mula
Last updated 4/2022
English
English [Auto],

What you'll learn

  • Select web elements using CSS Tag name/Type, Class, Id and Attribute-Value selectors.
  • Write XPath Expressions to select web elements based on their structure and tag name
  • Use CSS Operators like Starts-with, Ends-with and Contains to select attribute values dynamically.
  • Select web elements using XPath Attribute-Value selectors
  • Select web elements using CSS Parent, Child, Descendant & Sibling selectors.
  • Build XPath Conditions using different operators to create logical selectors
  • Use Special CSS selectors like not( ), nth-child( ), etc. to create efficient selectors.
  • Use XPath Functions to query attribute values (starts-with( ), contains( ), etc. a specific value), select innerText, and use value processor functions.

Course content

11 sections48 lectures2h 24m total length
  • CSS Selectors2:27

    Explore CSS selectors and how to select web elements from an HTML document to style them, including changing a heading color. Apply these selectors in web automation and scraping workflows.

  • Tagname Selectors1:46

    Use tag name selectors to target elements by their tag names, applying blue to all headings and yellow borders to images, demonstrating styling by tag.

  • Selecting two or more elements1:52

    Learn to select elements by tag name in css and apply colors, then combine selectors with a comma to style two or more elements like headings and prices.

Requirements

  • HTML & CSS Basics

Description

This course is all about selecting web elements with CSS Selectors & XPath!

When learning about the basic CSS Selectors or XPath, we know about the tag name selectors, class selectors, id selectors, and that's it. Most web elements can be selected using the selectors mentioned before, but there is always a demand for more in a real-world project. A better way to do the task, i.e. select web elements.


So it's time you up your game of web element selection and learn about the cool selectors you've never heard of. Whether you want to use CSS Selectors, XPath, or both, after taking this course, you'll write selectors which are accurate, concise, and easy to understand!


As I mentioned at the top, this course is all about SELECTORS! Here's an overview of what we will cover,

  • CSS Selectors

    • Tagname/Type

    • Class & Id

    • Attribute-Value

    • Hierarchy (Parent, Sibling & Child)

    • starts-with Operator

    • ends-with Operator

    • contains Operator

    • not Function

    • first-child, last-child, or only-child

    • nth-child or Element Position

    • Pseudo Elements

    • Element States

  • XPath

    • Absolute & Relative Path

    • Tagname/Type

    • Position or Index

    • Attribute-Value

    • starts-with( ) Function

    • contains( ) Function

    • Mathematical Operators

    • Conditional Operators

    • Axes ( ancestor, parent, sibling, child, or descendant )

    • Element Position

    • Child Element Count

    • Processor Function ( like round( ), translate( ), etc.)


To show the full potential of each selector, it is introduced with a use case in a real-world example so that everything fits into your mind. You'll be able to decide which selector to use in your projects.


Now whether you build web scrapers to scrape data from websites, are a front-end developer looking to master CSS Selectors, or use web automation/testing frameworks, if you're selecting web elements from websites either using CSS, XPath, or both - you should take this course to take your web selection to the next level!

Who this course is for:

  • Developers who are looking to Master CSS Selectors/XPath for Web Scraping
  • People working with Web Automation/Testing frameworks like Selenium
  • Front-end developers who wants to Master CSS selectors