Answer the question
In order to leave comments, you need to log in
Why did Google Chrome stop loading cookies in autotest?
In the autotest, when entering the site, in order to avoid the authorization procedure via SMS, previously saved cookies were loaded. Everything worked stably for a very long time. Yesterday. suddenly, when trying to load a cookie, an error began to appear:
selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: invalid 'expiry'
It is worth noting that if you just change the browser in which the test will be run without changing the cookie loading code, then everything works successfully. But in Google Chrome, the algorithm stopped working.
browser = webdriver.Chrome()
browser.maximize_window()
browser.get('https://test.ru')
with open("cookie.pkl", "rb") as cookiefile:
cookies = pickle.load(cookiefile)
for cookie in cookies:
browser.add_cookie(cookie)
return browser
Answer the question
In order to leave comments, you need to log in
As a temporary solution, I use the previous version of chromedriver (it works with the latest chrome, despite the version mismatch).
It would be interesting to hear the opinion of experts on what to do with it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question