fix handler_utils.input_sequentially (#2724)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user