Open target URL during Chrome startup

This commit is contained in:
2026-08-03 00:42:09 +03:30
parent 9f986255b3
commit 71790cf0ad
5 changed files with 71 additions and 13 deletions
+2 -2
View File
@@ -73,7 +73,7 @@ def run_otp(phone: str, cfg_id: int | None = None) -> None:
target_url: str = flow_cfg.get("target_url") or "" if flow_cfg else ""
t0 = time.monotonic()
try:
with driver_session() as driver:
with driver_session(initial_url=target_url) as driver:
OTPLoginScenario(driver, phone, otp_resolver, target_url).run()
result = DynamicFlow(driver, flow_cfg).run() if flow_cfg else None
except Exception as exc:
@@ -91,7 +91,7 @@ def run_fresh(cfg_id: int | None = None) -> None:
target_url: str = flow_cfg.get("target_url") or "" if flow_cfg else ""
t0 = time.monotonic()
try:
with driver_session() as driver:
with driver_session(initial_url=target_url) as driver:
FreshSessionScenario(driver, target_url).run()
result = DynamicFlow(driver, flow_cfg).run() if flow_cfg else None
except Exception as exc: