agentql/examples/python/xpath at main · tinyfish-io/agentql · GitHub
Skip to content

Latest commit

 

History

History

Folders and files

README.md

title Get an element's XPath
description Get XPath of an element that was fetched with AgentQL.
updated 2025-03-05

Example script: getting an element's XPath with AgentQL

This example demonstrates how to get XPath of an element that was fetched with AgentQL.

Run the script

pip install playwright-dompath
  • Save this python file locally as main.py
  • Run the following command from the project's folder:
python3 main.py

Play with the query

Install the AgentQL Debugger Chrome extension to play with the AgentQL query. Learn more about the AgentQL query language