AgentQL
The agentql
module provides utility methods to convert Playwright's Page
to AgentQL's Page
, which gives access to AgentQL's querying API.
The following example creates a page, navigates it to a URL, and queries for web elements:
Methods
wrap
Casts a Playwright Sync Page
object to an AgentQL Page
type to get access to AgentQL's querying API. See AgentQL Page
reference for API details.
Usage
python
page = agentql.wrap(browser.new_page())
Arguments
page
Playwright's Page
Returns
wrap_async
Casts a Playwright Async Page
object to an AgentQL Page
type to get access to the AgentQL's querying API. See AgentQL Page
reference for API details.
Usage
python
page = agentql.wrap_async(browser.new_page())
Arguments
page
Playwright's Page