Selenium and Chrome verions:
import selenium selenium.version '4.10.0'
Chrome Version: 114.0.5735.91 (Official Build) (64-bit)
This code used to work for me just fine:
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
My_Link = "......"
DRIVER_PATH = 'I://Decoded//chromedriver.exe'
s=Service(DRIVER_PATH)
browser = webdriver.Chrome(service=s)
browser.get(My_Link)
browser.find_element(By.NAME,"USER").send_keys(r)
browser.find_element(By.NAME,"PASSWORD").send_keys(d)
browser.find_element(By.CSS_SELECTOR,".ButtonSm").click()
cookies= browser.get_cookies()
It's now giving me this error:
WebDriverException Traceback (most recent call last)
<ipython-input-10-b6bb484d2c6a> in <module>
1
2
----> 3 cookies= browser.get_cookies()
WebDriverException: Message: unknown error: Runtime.callFunctionOn threw exception: TypeError: JSON.stringify is not a function
at buildError (<anonymous>:323:18)
(Session info: chrome=114.0.5735.91)
Stacktrace:
Backtrace:
GetHandleVerifier [0x010CA813+48355]
(No symbol) [0x0105C4B1]
Any idea what is causing this exception pls ?
I tried microsoft edge, same issue.