Use the HTML XPath to locate elements in Selenium.
- [Narrator] Besides the ID and the name attributes,…we can also locate elements using the XPath.…Let's take a look at this along with a code example.…XPath stands for XML path language.…It uses path expressions to identify…and navigate nodes in an XML document.…As HTML is an implementation of XML,…the power of XPath can be extended to HTML.…
These path expressions look very much like…the path expressions that we use…in traditional computer file systems.…That is, they follow a tree or a folder structure.…The HTML node is selected by following a path…or steps along the dome tree and can be used…to select one or more nodes in the document.…XPath is used to locate elements when a specific ID…or name attribute is not available for a node.…
It can be used to locate nodes…in absolute or relative terms.…In the case of an absolute path,…the path of the name is specified right from the root node.…In the case of relative paths, the path of the node…is specified relative to another node that…has an identifying attribute.…
- What is automated testing?
- Python-Selenium bindings
- Parsing the DOM structure
- Locating elements in the DOM
- Navigating and interacting with pages
- Explicit and implicit waits
Skill Level Intermediate
Learning Python GUI Programmingwith Burkhard Meier6h 6m Intermediate
Learning Python Web Penetration Testingwith Christian Martorella2h 49m Intermediate
1. What Is Automation Testing and Python-Selenium Framework?
2. Parsing the HTML DOM Structure
3. Navigating through Pages
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.