-
Hi, I replaced the former turnstile click by "driver.uc_gui_handle_cf()", and I get this error: "module 'seleniumbase.config' has no attribute 'headless'" when the turnstile challenge is on. from seleniumbase import Driver |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
UC Mode no longer works in Headless Mode, as it needs a GUI Display for UC Mode now needs a special X11 virtual display to run on Linux, which is included with the Try the example: from seleniumbase import SB
with SB(uc=True, test=True) as sb:
url = "https://www.virtualmanager.com/en/login"
sb.uc_open_with_reconnect(url, 4)
print(sb.get_page_title())
sb.uc_gui_handle_cf() # Ready if needed!
print(sb.get_page_title())
sb.assert_element('input[name*="email"]')
sb.assert_element('input[name*="login"]')
sb.set_messenger_theme(location="bottom_center")
sb.post_message("SeleniumBase wasn't detected!") |
Beta Was this translation helpful? Give feedback.
-
If I understand, even without headless mode, the Driver() method does not solve anymore turnstile, and needs a GUI Display for pyautogui to launch the driver.uc_gui_handle_cf() ? |
Beta Was this translation helpful? Give feedback.
-
Oh, did you mean this? File "SeleniumBase/seleniumbase/core/browser_launcher.py", line 552, in verify_pyautogui_has_a_headed_browser
if sb_config.headless or sb_config.headless2:
^^^^^^^^^^^^^^^^^^
AttributeError: module 'seleniumbase.config' has no attribute 'headless' Yeah, that's a bug with Next time, properly format your code, include the stack trace, and give your discussion a better title. |
Beta Was this translation helpful? Give feedback.
-
Exactly, that was my point.
There is this error:
|
Beta Was this translation helpful? Give feedback.
-
On Linux Ubuntu 20 Xfce env, after the update, the driver.uc_gui_handle_cf() is aborted and returns: It works perfectly after installing the package ! Thanks again, you are a wizard ! |
Beta Was this translation helpful? Give feedback.
UC Mode no longer works in Headless Mode, as it needs a GUI Display for
pyautogui
.UC Mode now needs a special X11 virtual display to run on Linux, which is included with the
SB()
andBaseCase
formats, but not the limitedDriver()
format.Try the example: