DoesQA
WebsiteLogin
  • Welcome to DoesQA
  • Getting Started
    • Terminology
    • Creating your first test
    • Running your first test
  • Guides
    • Working with Node Groups
    • Test Tagging
    • Interacting With Emails
    • Codeless vs Code
    • DoesQA Compared
  • Test Steps
    • Starter
      • Open
    • Browser
      • Go To Absolute URL
      • Go To Relative Path
      • Reload
      • Back
      • Forward
      • Open File
      • Run Browser Script
      • Next Tab
      • Previous Tab
      • Close Current Tab
    • Action
      • Touch
      • Double Tap
      • Drag and Drop
      • Clear
      • File
      • Select Option
      • Send Keys
      • Set MFA
      • Open Plugin
      • Scroll Into View
      • Scroll To Edge
      • Hover
      • Set Value
    • Check
      • Check Displayed
      • Check Not Displayed
      • Check Visible
      • Check Not Visible
      • Check Exists
      • Check Does Not Exist
      • Check Enabled
      • Check Disabled
      • Check Clickable
      • Check Not Clickable
      • Check Focused
      • Check Not Focused
      • Check Selected
      • Check Not Selected
      • Check Text
      • Check Value
      • Check Value Store
      • Check Attribute
      • Check Computed Label
      • Check Computed Role
      • Check Computed Style
      • Check Count
      • Check Title
      • Check Address
      • Check Cookie
      • Check LocalStorage
      • Check SessionStorage
      • Check Links
      • Check SFTP File Exists
      • Check SFTP File Does Not Exist
      • Check SFTP File Count
      • Check GTM Event
      • Check JSON Value
      • Check JSON Schema
    • Runner
      • Pause
      • Wait For Element To Be Displayed
      • Wait For Element To Not Be Displayed
      • Wait For Element To Be Visible
      • Wait For Element To Not Be Visible
      • Wait For Element To Exist
      • Wait For Element To Not Exist
      • Wait For Element To Be Enabled
      • Wait For Element To Be Disabled
      • Wait For Element To Be Clickable
      • Wait For Element To Not Be Clickable
      • Wait For Element Text
      • Switch Window
      • Switch Frame
      • Switch To Parent Frame
      • Add Header
      • Set Header
      • Remove All Headers
      • Stop When Element Is Displayed
      • Stop When Element Not Displayed
      • Stop When Value
      • Generate File
      • Generate Image
      • Condition
    • Change
      • Element Snapshot
      • Element Position
    • Mail
      • Open Inbox
      • Close Inbox
      • Select Email
      • Open Email
      • Wait For Email
    • Validator
      • Accessibility
      • Performance
      • Best Practices
      • SEO
      • PWA
      • Pa11y
      • Axe
    • Data
      • Alias Value
      • Set Value
      • Store Element Text
      • Store Element HTML
      • Store Element Value
      • Store Element Count
      • Store Element Attribute
      • Set Cookie
      • Delete Cookie
      • Delete Cookies
      • Set LocalStorage
      • Delete LocalStorage
      • Delete All LocalStorage
      • Set SessionStorage
      • Delete SessionStorage
      • Delete All SessionStorage
      • Calculate Value
      • Replace Value
    • Express
      • DoesQA Run
      • Adyen Widget
      • Adyen PayPal
    • Integration
      • SFTP List
      • GET
      • PUT
      • POST
      • DELETE
      • Slack Send
      • SFTP Upload
    • Utility
      • Flow Comment
      • Test Comment
      • Name Test
      • Debug Value
      • Debug Element
      • Replace Text
      • Screenshot
      • Tag Test
      • Start HAR Recording
      • End HAR Recording
      • Start Console Recording
      • End Console Recording
    • Node Group
  • Node Configuration
    • Comparison Type
    • Value Standardization
    • Failed Status
    • Timeout Override
  • Elements
    • Creating Elements
    • Selector Types
      • CSS
      • XPath
      • Visible Text
      • Test ID
  • Values
    • Values (Value Store)
    • Creating Values
    • Dynamic Values
  • Configuration
    • Whitelisting IPs
    • Max Concurrency
    • CI / CD
    • Schedules
    • Block Hostnames
    • Notifications
      • Webhook
      • Email
      • Slack
    • MFA
    • Recipes
Powered by GitBook
On this page
  1. Elements
  2. Selector Types

XPath

Use XPath expressions to navigate and select elements within the XML or HTML document.

XPath is a powerful selector type that allows you to navigate the DOM using a path-like syntax. Unlike CSS, XPath supports more advanced queries such as traversing up the DOM, selecting elements based on partial text, and targeting based on multiple conditions. XPath is useful when CSS selectors are insufficient or too limiting, but they can be more verbose and harder to maintain.

Examples:

  • //button[@id="submit-button"]

  • //div[contains(@class, "product-card")]

  • //ul/li[1]

  • //label[text()="Email"]/following-sibling::input

PreviousCSSNextVisible Text

Last updated 1 day ago