From 44053fee6bb26b0f0856afce6dde98e30dcc3415 Mon Sep 17 00:00:00 2001 From: Jah-yee <166608075+Jah-yee@users.noreply.github.com> Date: Thu, 1 Oct 2026 16:26:15 +0800 Subject: [PATCH] fix: use search_btn to match GraphQL query attribute name In template_async.py, the GraphQL query defines the search button as 'search_btn' (line 42), but the element interaction code used 'search_button' (line 50). This caused an AttributeError at runtime since AgentQL's response object creates attributes matching query keys. Change 'search_button' to 'search_btn' to match the query definition. Fix #162. --- .templates/python/template_async.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.templates/python/template_async.py b/.templates/python/template_async.py index 18ec16ebc..bb5244b5e 100644 --- a/.templates/python/template_async.py +++ b/.templates/python/template_async.py @@ -47,7 +47,7 @@ async def fetch_data(context: BrowserContext, session_url): response = await page.query_elements(elements_query) # Update to use the actual query terms to interact with the elements await response.search_input.type("") - await response.search_button.click() + await response.search_btn.click() # Update the query to fetch the desired data from the page data_query = """