Skip to content

Init driver before start #973

Answered by mdmintz
AndrejSayadov asked this question in Q&A
Discussion options

You must be logged in to vote

You should always use self.driver.quit() instead of self.driver.close(), because otherwise you might leave open running processes. That being said, running the above code from your example will lose all the SeleniumBase settings that are set when the browser is launched. In your particular case, you may want to fork/clone SeleniumBase and then go into seleniumbase/core/browser_launcher.py and replace from selenium import webdriver with from seleniumwire import webdriver so that you can run your specific seleniumwire code. But if you don't care about the SeleniumBase default options, then you can probably do what you're trying to do now if you include from seleniumwire import webdriver in …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants