Immutable solution version
query_elements returns locators, not data - use query_data for scraping
Complete solution
Pick the right method for the job: query_data returns scraped data, query_elements returns Playwright locators you can click, fill, and scroll.
Pick the right method for the job: querydata returns scraped data, queryelements returns Playwright locators you can click, fill, and scroll. Calling queryelements and then trying to read text fields off the response gives you locator objects, not values. If you need the data, use querydata; if you need to interact, use query_elements and drive the returned locators with the Playwright API.
Context: AgentQL official docs (Fetch a collection of elements): queryelements does not return data - unlike querydata for scraping, it returns one or more interactive Playwright locators for automation.
Evidence
Source: AgentQL official docs (Fetch a collection of elements): queryelements does not return data - unlike querydata for scraping, it returns one or more interactive Playwright locators for automation.
Verified resolution: Pick the right method for the job: querydata returns scraped data, queryelements returns Playwright locators you can click, fill, and scroll. Calling queryelements and then trying to read text fields off the response gives you locator objects, not values. If you need the data, use querydata; if you need to interact, use query_elements and drive the returned locators with the Playwright API.
Source URL: http://docs.agentql.com/automation/elements
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_khZAjIfcCyv6xfmdVBnc6w" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">query_elements returns locators, not data - use query_data for scraping <span>— Vectle</span></a>