seleniumbase / SeleniumBase

📊 Blazing fast Python framework for web crawling, scraping, testing, and reporting. Supports pytest. Stealth abilities: UC Mode and CDP Mode.
https://seleniumbase.io
MIT License
5.43k stars 982 forks source link

checkbox not clicking, it stuck on sb.uc_gui_click_captcha() #3223

Closed praveenyadav3011 closed 3 weeks ago

praveenyadav3011 commented 3 weeks ago

raw_gui_click.py from example not working, it stuck on

# import sys
# from seleniumbase import SB

# agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/126.0.0.0"
# if "linux" in sys.platform or "win32" in sys.platform:
    # agent = None  # Use the default UserAgent

with SB(uc=True, test=True, rtf=True, agent=agent) as sb:
     url = "https://seleniumbase.io/apps/turnstile"
     sb.activate_cdp_mode(url)
     sb.uc_gui_click_captcha()  # Only if needed
     sb.assert_element('label[for="user_login"]')
     sb.assert_element('input[data-testid*="username"]')
     sb.assert_element('input[data-testid*="password"]')
     sb.set_messenger_theme(location="bottom_center")
     sb.post_message("SeleniumBase wasn't detected!")
Prompt-Coder commented 3 weeks ago

Exactly why I came here as well. Haven't been working since yesterday I think.

Also all other functions stopped working, this code was working for me until 2 days ago:

def login(self): """ Automate login to Keymaster using SeleniumBase. Handle captcha if possible or use alternative methods. """ self.driver = Driver(uc=True) # Use undetected-chromedriver mode # UC Mode for avoiding detection try: url = "https://keymaster.fivem.net/login?return_url=/assets" self.driver.open(url)

        # Handle the reCAPTCHA automatically using built-in methods
        self.driver.uc_gui_click_captcha()

        input("Press Enter to continue after handling the reCAPTCHA...")
        # Wait for CAPTCHA processing
        self.driver.sleep(2)

        # Click the "Sign in" button
        self.driver.click('a[href^="https://forum.cfx.re/session/sso_provider"]')

        # Wait for any further processing to complete
        self.driver.sleep(2)

        # Input the email or username
        self.driver.type('#login-account-name', self.username)

        Now it doesn't see no captcha, no sso provider button no login button
praveenyadav3011 commented 3 weeks ago

Exactly why I came here as well. Haven't been working since yesterday I think.

Also all other functions stopped working, this code was working for me until 2 days ago:

def login(self): """ Automate login to Keymaster using SeleniumBase. Handle captcha if possible or use alternative methods. """ self.driver = Driver(uc=True) # Use undetected-chromedriver mode # UC Mode for avoiding detection try: url = "https://keymaster.fivem.net/login?return_url=/assets" self.driver.open(url)

        # Handle the reCAPTCHA automatically using built-in methods
        self.driver.uc_gui_click_captcha()

        input("Press Enter to continue after handling the reCAPTCHA...")
        # Wait for CAPTCHA processing
        self.driver.sleep(2)

        # Click the "Sign in" button
        self.driver.click('a[href^="https://forum.cfx.re/session/sso_provider"]')

        # Wait for any further processing to complete
        self.driver.sleep(2)

        # Input the email or username
        self.driver.type('#login-account-name', self.username)

        Now it doesn't see no captcha, no sso provider button no login button
praveenyadav3011 commented 3 weeks ago

i am closing this, it is working