Skip to content

Commit fb35078

Browse files
author
maebahesioru
committed
fix: re-expand advanced settings panel if parameter inputs not visible
1 parent 8633d16 commit fb35078

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

src/browser/page_controller.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,12 @@ def extract_float(s):
596596
await self._check_disconnect(check_client_disconnected, f'设置 {param_name} - 尝试 {attempt + 1}')
597597

598598
if attempt == 0:
599-
await expect_async(locator).to_be_visible(timeout=5000)
599+
try:
600+
await expect_async(locator).to_be_visible(timeout=5000)
601+
except Exception:
602+
# Panel might be collapsed - try to expand and retry visibility
603+
await self._ensure_advanced_settings_expanded(check_client_disconnected)
604+
await expect_async(locator).to_be_visible(timeout=5000)
600605
await asyncio.sleep(DELAY_AFTER_TOGGLE)
601606

602607
if attempt == 0:
@@ -715,7 +720,11 @@ async def _adjust_stop_sequences(self, stop_sequences, page_params_cache: dict,
715720
except Exception:
716721
break
717722
if normalized_requested_stops:
718-
await expect_async(stop_input_locator).to_be_visible(timeout=5000)
723+
try:
724+
await expect_async(stop_input_locator).to_be_visible(timeout=5000)
725+
except Exception:
726+
await self._ensure_advanced_settings_expanded(check_client_disconnected)
727+
await expect_async(stop_input_locator).to_be_visible(timeout=5000)
719728
await stop_input_locator.scroll_into_view_if_needed(timeout=3000)
720729
for seq in normalized_requested_stops:
721730
await stop_input_locator.click(timeout=3000)

0 commit comments

Comments
 (0)