fix task v2 block goto url issue (#1899)

This commit is contained in:
Shuchang Zheng
2025-03-06 18:27:19 -08:00
committed by GitHub
parent e720177735
commit fd934dcfe6
4 changed files with 45 additions and 18 deletions

View File

@@ -46,6 +46,10 @@ class SkyvernFrame:
LOG.exception("Timeout to evaluate expression", expression=expression)
raise TimeoutError("timeout to evaluate expression")
@staticmethod
async def get_url(frame: Page | Frame) -> str:
return await SkyvernFrame.evaluate(frame=frame, expression="() => document.location.href")
@staticmethod
async def take_screenshot(
page: Page,