Skip to content

Commit bcf0fb5

Browse files
committed
Add "breakpoint" option for reconnecting in UC Mode
1 parent 77c0ccd commit bcf0fb5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

seleniumbase/undetected/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,12 @@ def reconnect(self, timeout=0.1):
427427
self.service.stop()
428428
except Exception:
429429
pass
430-
time.sleep(timeout)
430+
if isinstance(timeout, str):
431+
if timeout.lower() == "breakpoint":
432+
breakpoint() # To continue:
433+
pass # Type "c" & press ENTER!
434+
else:
435+
time.sleep(timeout)
431436
try:
432437
self.service.start()
433438
except Exception:

0 commit comments

Comments
 (0)