Skip to main content
CF

XPath locators for Selenium

1h 8m 22s
English
Paid

XPath or XML Path Language is a query language for selecting nodes from an XML document.  XPath also may be used to compute values from the content of an XML document. XPath is the most complicated method of identifying elements, but it  can find the location of ANY element on a web page, even those without class, name, or id attributes. XPath produces reliable locators if it used correctly.

In this course you will learn how to build reliable complex XPath locators, that can help you automate testing of any web application.

Requirements:

  • Test Automation with Selenium
  • Basic HTML and XML understanding

Who this course is for:
  • Test Automation engineer who want to create better and easier to maintain locators

What you'll learn:

  • Build complex XPath locators
  • Locate ANY element on the page with XPath
  • Automate testing of any element on the web page

About the Author: Udemy

Udemy thumbnail

Udemy is the largest open marketplace for online courses on the internet. Founded in 2010 by Eren Bali, Oktay Caglar, and Gagan Biyani and headquartered in San Francisco, the company went public on the Nasdaq in 2021 under the ticker UDMY. The platform hosts well over two hundred thousand courses across software development, IT and cloud, data science, design, business, marketing, and creative skills, taught by tens of thousands of independent instructors. Roughly seventy million learners use it worldwide, and the corporate arm — Udemy Business — supplies a curated subset of that catalog to enterprise customers.

Because Udemy is a marketplace rather than a single editorial publisher, the catalog is uneven by design. The strongest material lives in the long-form, project-based courses authored by working engineers — full-stack JavaScript, React, Node.js, Python data science, AWS, Docker and Kubernetes, mobile development with Flutter and React Native, and cloud certification preparation. The CourseFlix listing under this source is the slice of that catalog that has been mirrored here for offline-friendly viewing, organized by topic and updated as new releases land. Pricing on Udemy itself swings dramatically with the site's near-permanent sales, which is why the platform is best treated as a deep reference catalog: pick instructors with strong reviews and a track record of updating their material rather than buying on the headline price alone.

Watch Online 15 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 15 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Page elements
All Course Lessons (15)
#Lesson TitleDurationAccess
1
Page elements Demo
02:57
2
Selenium Locators
04:18
3
Locating Web Elements
07:14
4
What is XPath
00:54
5
Types of XPath
08:24
6
XPath Terminology
02:52
7
Basic XPath
06:54
8
Single and double forward slash
04:49
9
Position and index
05:02
10
Text
01:59
11
Partial values
05:24
12
XPath Operators
05:52
13
XPath Axes
06:06
14
XPath in Selenium test
04:44
15
Autro
00:53
Unlock unlimited learning

Get instant access to all 14 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Related courses

Frequently asked questions

What prerequisites should I have before taking this course?
Before enrolling, students should be familiar with basic web technologies such as HTML and XML, as understanding these is crucial for effectively using XPath. A foundational knowledge of Selenium and experience with web browsers will also be beneficial since the course involves applying XPath within Selenium tests.
What kind of projects or exercises will I be doing?
The course includes practical exercises involving the use of XPath to locate web elements in Selenium tests. This involves applying XPath terms like 'position', 'index', and 'axes', and using operators to select and manipulate nodes in XML documents.
Who is the target audience for this course?
This course is designed for software testers and developers who need to enhance their skills in web automation testing using Selenium. It is particularly useful for those who want to master the use of XPath locators to improve the accuracy and reliability of their automated tests.
How does the depth of this course compare to similar courses?
Unlike introductory Selenium courses that cover various locator strategies superficially, this course delves deeply into XPath. It covers complex XPath topics such as axes, operators, and different types of XPath, offering a thorough understanding essential for creating robust test scripts.
What specific tools or platforms will be covered?
The course focuses on using XPath within the Selenium testing framework. It provides detailed insights into how XPath can be used to locate web elements and interact with them using Selenium, a popular tool for web application testing.
What topics are not covered in this course?
The course does not cover other Selenium locator strategies like CSS selectors or other testing frameworks. It specifically concentrates on XPath and its application within Selenium, leaving out broader web development or other automation tools.
What is the time commitment required for this course?
The course comprises 15 lessons. While the exact runtime is not specified, students should allocate time for both the video lessons and hands-on practice. The time required can vary based on individual learning speed and prior familiarity with the topics.