-
Hey Michael, I'm used to running python in interactive mode so that I can select elements quickly without having to re-run my script. This lets me confirm i've selected the element I'm looking for on the webpage and run commands on the go. I've tried running my script with python -i script.py and it works but the driver closes automatically. This leads me to my next question. How do I prevent the window from closing after executing the script. In selenium, this is done by options.add_experimental_option('detach', True) - what is the equivalent in SeleniumBase? I'm currently using the SB syntax and my code is as follows:
Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Duplicate of #1814 (comment). Use a breakpoint to keep the browser window open: breakpoint() Breakpoint common controls: When you're done with the browser window, use |
Beta Was this translation helpful? Give feedback.
Duplicate of #1814 (comment).
Use a breakpoint to keep the browser window open:
breakpoint()
Breakpoint common controls:
n
= next,c
= continue,s
= step.When you're done with the browser window, use
c
and hit Enter so that SeleniumBase can safely close the browser and terminate used resources such as drivers.