use type instead of press (#3334)

This commit is contained in:
LawyZheng
2025-09-01 10:13:49 +08:00
committed by GitHub
parent 687bf1e2c7
commit ae8fda4ed5
2 changed files with 2 additions and 2 deletions

View File

@@ -32,7 +32,7 @@ async def input_sequentially(locator: Locator, text: str, timeout: float = setti
text = text[length - TEXT_PRESS_MAX_LENGTH :]
for char in text:
await locator.press(char, delay=TEXT_INPUT_DELAY, timeout=timeout)
await locator.type(char, delay=TEXT_INPUT_DELAY, timeout=timeout)
async def keypress(page: Page, keys: list[str], hold: bool = False, duration: float = 0) -> None:

View File

@@ -573,7 +573,7 @@ class SkyvernElement:
async def press_fill(self, text: str, timeout: float = settings.BROWSER_ACTION_TIMEOUT_MS) -> None:
for char in text:
await self.get_locator().press(char, delay=TEXT_INPUT_DELAY, timeout=timeout)
await self.get_locator().type(char, delay=TEXT_INPUT_DELAY, timeout=timeout)
async def input(self, text: str, timeout: float = settings.BROWSER_ACTION_TIMEOUT_MS) -> None:
if self.get_tag_name().lower() not in COMMON_INPUT_TAGS: