cache replay bug - if click locator is not found, fallback to us llm to find the locator (#4079)
This commit is contained in:
@@ -50,8 +50,12 @@ UPLOAD_GOAL = """- The intention to upload a file: {intention}.
|
|||||||
|
|
||||||
|
|
||||||
async def _get_element_id_by_selector(selector: str, page: Page) -> str | None:
|
async def _get_element_id_by_selector(selector: str, page: Page) -> str | None:
|
||||||
locator = page.locator(selector)
|
try:
|
||||||
element_id = await locator.get_attribute("unique_id")
|
locator = page.locator(selector)
|
||||||
|
element_id = await locator.get_attribute("unique_id", timeout=settings.BROWSER_ACTION_TIMEOUT_MS)
|
||||||
|
except Exception:
|
||||||
|
LOG.exception("Failed to get element id by selector", selector=selector)
|
||||||
|
return None
|
||||||
return element_id
|
return element_id
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user