YouTube XPath Playlist Demo Site

Learn XPath using real HTML structures

This page is designed for Selenium/TestNG training videos. It includes IDs, classes, data attributes, forms, tables, lists, nested cards, dynamic text, and XPath axis examples.

1. Different HTML Elements

Use this area to explain how XPath can capture headings, paragraphs, links, buttons, images, lists, and nested content.

Text Elements

This paragraph has a class attribute.

This is a span with a title attribute. Important text

2. Attribute Capturing Examples

Use this section to compare XPath strategies: id, class, name, placeholder, value, title, aria-label, data-testid, starts-with, contains, and text.

Java Automation Book

4500

Selenium XPath Course

7500

3. Form Elements

Student Registration

Experience Level

Tools Known

4. Table XPath Examples

Good for teaching parent, child, following-sibling, preceding-sibling, and cell-based XPath.

Student ID Name Course Status Action
ST-001 Kasun Perera Selenium Active
ST-002 Nimali Silva TestNG Pending
ST-003 Ruwan Fernando XPath Inactive

5. XPath Axis Navigation Playground

This section is intentionally structured for teaching ancestor, parent, child, descendant, following-sibling, preceding-sibling, following, preceding, and self axes.

Tech Academy

QA Department

Automation Team
Saman QA Lead
Amali Automation Engineer
Dinesh QA Intern

Development Department

Backend Team
Rashmi Java Developer

6. Practice Questions

  1. Capture the Login button using id.
  2. Capture username field using placeholder.
  3. Capture all product buttons using contains.
  4. Capture the Edit button of ST-002 using table text.
  5. From Amali, navigate to her parent employee div.
  6. From Amali, navigate to following sibling employee Dinesh.