For undetected-chromedriver
, there's a solution in this thread: https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/1477#issuecomment-1680867979
Until a direct fix is available (meaning that undetected-chromedriver
starts using the updated driver locations), you can use SeleniumBase's UC Mode as an alternative, which has a slightly modified version of undetected-chromedriver
.
First pip install seleniumbase
, and then run the following script with python
:
from seleniumbase import Driver
import time
driver = Driver(uc=True)
driver.get("https://nowsecure.nl/#relax")
time.sleep(6)
driver.quit()
SeleniumBase also has other formats with its own API:
from seleniumbase import SB
with SB(uc=True) as sb:
sb.open("https://nowsecure.nl/#relax")
sb.sleep(3)
if not sb.is_text_visible("OH YEAH, you passed!", "h1"):
sb.get_new_driver(undetectable=True)
sb.open("https://nowsecure.nl/#relax")
sb.sleep(3)
sb.assert_text("OH YEAH, you passed!", "h1", timeout=3)