introduce a way to reload the page (#1597)

This commit is contained in:
Shuchang Zheng
2025-01-19 19:24:39 -08:00
committed by GitHub
parent 0c02bdef19
commit 39bb4558bf
3 changed files with 39 additions and 1 deletions

View File

@@ -25,6 +25,7 @@ class ActionType(StrEnum):
SOLVE_CAPTCHA = "solve_captcha"
TERMINATE = "terminate"
COMPLETE = "complete"
RELOAD_PAGE = "reload_page"
def is_web_action(self) -> bool:
return self in [
@@ -161,6 +162,11 @@ class DecisiveAction(Action):
errors: list[UserDefinedError] = []
# TODO: consider to implement this as a WebAction in the future
class ReloadPageAction(Action):
action_type: ActionType = ActionType.RELOAD_PAGE
class ClickAction(WebAction):
action_type: ActionType = ActionType.CLICK
file_url: str | None = None