Skip to content

Commit 385a1fd

Browse files
author
maebahesioru
committed
fix: increase focus timeout and parameter setting wait time
- shortcut submission: textarea focus timeout 5s -> 15s - timeouts: SLEEP_LONG 0.5s -> 1.0s for more reliable parameter setting
1 parent d1bd87b commit 385a1fd

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/browser/page_controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ async def _try_shortcut_submit(self, prompt_textarea_locator, check_client_disco
12121212
user_agent_data_platform = 'Other'
12131213
is_mac_determined = 'mac' in user_agent_data_platform.lower()
12141214
shortcut_modifier = 'Meta' if is_mac_determined else 'Control'
1215-
await prompt_textarea_locator.focus(timeout=5000)
1215+
await prompt_textarea_locator.focus(timeout=15000)
12161216
await self._check_disconnect(check_client_disconnected, 'After Input Focus')
12171217
original_content = await prompt_textarea_locator.input_value(timeout=2000) or ''
12181218
self.logger.info(f'[{self.req_id}] - Attempting {shortcut_modifier}+Enter...')

src/config/timeouts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
SLEEP_TICK = 0.1
2626
SLEEP_SHORT = 0.15
2727
SLEEP_MEDIUM = 0.25
28-
SLEEP_LONG = 0.5
28+
SLEEP_LONG = 1.0
2929
SLEEP_RETRY = 1.0
3030
SLEEP_NAVIGATION = 2.0
3131
SLEEP_VIDEO_POLL = 5.0

0 commit comments

Comments
 (0)