Instead of checking every change across a webpage, you can narrow your focus to a particular element. XPath-based monitoring makes it possible to watch individual components like stock indicators, pricing information, call-to-action buttons, or status messages with greater precision.
XPath helps Page Monitor focus on a particular element instead of scanning the whole page, which can improve accuracy and reduce unwanted alerts.
How to Monitor Dynamic Elements Using XPath
Follow these steps:
- Open the Auto Refresh Plus extension
- Go to the Monitor tab
- Select a monitoring mode such as:
- Alert on Keyword Found
- Alert on Keyword Lost
- In the monitoring input field, choose XPath Expression
- Enter your XPath expression
- Click Start
Page Monitor will use the XPath expression to locate and monitor the specified element during each refresh cycle.
When Should You Use XPath?
XPath is useful when:
- Monitoring a product price
- Tracking stock availability
- Watching a specific button or link
- Monitoring a notification area
- Tracking content inside a table or list
- Monitoring dynamic website elements
Instead of searching the entire page for text, XPath allows Auto Refresh Plus to focus only on the element you want to track.
Example XPath Expressions
Monitor an element by ID:
//*[@id='availability']Monitor a button containing specific text:
//button[contains(text(),'Add to Cart')]Monitor a specific price element:
//span[@class='price']The exact XPath required will depend on the structure of the website you are monitoring.
Need Help Creating XPath Expressions?
Creating XPath expressions can vary from website to website.
For common XPath examples and syntax reference, see:
https://autorefresh.io/expressions/#xpath-expressions
Important Notes
- XPath is intended for advanced monitoring scenarios
- XPath can be used alongside keyword-based monitoring
- If the website structure changes, the XPath expression may need to be updated
- For simpler use cases, plain text monitoring may be easier to configure
- XPath allows monitoring of specific elements rather than the entire page
Summary
Need to monitor a particular element on a webpage? Auto Refresh Plus includes XPath-based tracking, allowing you to pinpoint and watch specific content using an XPath expression. This approach is especially useful for complex layouts and dynamic websites where accurate monitoring of individual elements is essential.