-
Notifications
You must be signed in to change notification settings - Fork 1.4k
-
I've always used the SB context manager in the past, but on my current project I found the standalone driver more convenient i.e.
sb = sb_cdp.Chrome(url, lang="en")
However, I'm unsure how to close the cdp connection and quit the browser in the same way the context manager does after the yield. I've seen other discussions mention using sb.driver.quit()
, but this method doesn't appear to be available for the Chrome instance. Looking at the code it seems that sb.driver.stop()
could be the equivalent?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions
I would use sb.driver.stop()
, as that will quit the browser, and should free up resources used.
Replies: 2 comments
-
I would use sb.driver.stop()
, as that will quit the browser, and should free up resources used.
Beta Was this translation helpful? Give feedback.
All reactions
-
Any method for from seleniumbase import Driver
mode?
Beta Was this translation helpful? Give feedback.