fix handler_utils.input_sequentially (#2724)

This commit is contained in:
Shuchang Zheng
2025-06-15 14:32:34 -07:00
committed by GitHub
parent 53ce34459a
commit 26f4273d62

View File

@@ -27,7 +27,7 @@ async def input_sequentially(locator: Locator, text: str, timeout: float = setti
if length > TEXT_PRESS_MAX_LENGTH:
# if the text is longer than TEXT_PRESS_MAX_LENGTH characters, we will locator.fill in initial texts until the last TEXT_PRESS_MAX_LENGTH characters
# and then type the last TEXT_PRESS_MAX_LENGTH characters with locator.press_sequentially
await locator.fill(text, timeout=timeout)
await locator.fill(text[: length - TEXT_PRESS_MAX_LENGTH], timeout=timeout)
text = text[length - TEXT_PRESS_MAX_LENGTH :]
await locator.press_sequentially(text, delay=TEXT_INPUT_DELAY, timeout=timeout)