Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chrome web driver: --ignore-certificate-errors #326

Closed
HughGrant opened this issue Jun 25, 2014 · 2 comments
Closed

chrome web driver: --ignore-certificate-errors #326

HughGrant opened this issue Jun 25, 2014 · 2 comments

Comments

@HughGrant
Copy link

--ignore-certificate-errors
how to get rid of this warning

@MrSimonC
Copy link

MrSimonC commented Jul 4, 2014

This took me an hour of searching to work this one out!

in this file:
C:\Python27\Lib\site-packages\splinter\driver\webdriver\chrome.py
add:

#added from https://code.google.com/p/chromedriver/issues/detail?id=799
options.add_experimental_option("excludeSwitches", ["ignore-certificate-errors"])

so that your code looks something like this:

class WebDriver(BaseWebDriver):
    driver_name = "Chrome"
    def __init__(self, user_agent=None, wait_time=2, **kwargs):
        options = Options()
        if user_agent is not None:
            options.add_argument("--user-agent=" + user_agent)
        #added from https://code.google.com/p/chromedriver/issues/detail?id=799
        options.add_experimental_option("excludeSwitches", ["ignore-certificate-errors"])
        self.driver = Chrome(chrome_options=options, **kwargs)
        self.element_class = WebDriverElement
        self._cookie_manager = CookieManager(self.driver)
        super(WebDriver, self).__init__(wait_time)

as you might have guessed by now, you can read more about the problem here:
https://code.google.com/p/chromedriver/issues/detail?id=799

@HughGrant
Copy link
Author

@MrSimonC thanks mate. it works for me and I can fully customize my configuration now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants