-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Problem with Running non Headless #1584
Comments
The same problem. |
try this one |
Selenium 4.13 does not support headless methods, it's why you got this error message:
|
thanks man |
options = uc.ChromeOptions() driver.get("https://google.com") |
For anyone still having problems, you can still downgrade to selenium 4.12.0: |
Will try downgrading Selenium. FWIW, I get this error even though I'm not explicitly using headless. I am using a bunch of flags, see below, and the StackOverflow posts explaining the source of each option. One of those must be setting headless, but I'm not sure which one.
|
Can't have this: (
...due to this change in
Here are some alternatives:
from seleniumbase import Driver
import time
driver = Driver(uc=True)
driver.get("https://nowsecure.nl/#relax")
time.sleep(6)
driver.quit() Here's another, more advanced example with retries and clicks (using the from seleniumbase import SB
with SB(uc=True) as sb:
sb.driver.get("https://nowsecure.nl/#relax")
sb.sleep(2)
if not sb.is_text_visible("OH YEAH, you passed!", "h1"):
sb.get_new_driver(undetectable=True)
sb.driver.get("https://nowsecure.nl/#relax")
sb.sleep(2)
if not sb.is_text_visible("OH YEAH, you passed!", "h1"):
if sb.is_element_visible('iframe[src*="challenge"]'):
with sb.frame_switch('iframe[src*="challenge"]'):
sb.click("span.mark")
sb.sleep(4)
sb.activate_demo_mode()
sb.assert_text("OH YEAH, you passed!", "h1", timeout=3) |
How do I solve this error , I update the chromedriver but I still get the same problem |
|
seems to have been resolved in 783b839 |
An error occurred: 'ChromeOptions' object has no attribute 'headless'
None
The text was updated successfully, but these errors were encountered: