How to click on elements within an iframe to enable the captcha through the audio using Selenium and Python
问题 I want to, click on the button to resolve the captcha through the audio, but selenium does not detect the specified "id". browser.get("https://www.google.com/recaptcha/api2/demo") mainWin = browser.current_window_handle iframe = browser.find_elements_by_tag_name("iframe")[0] browser.switch_to_frame(iframe) CheckBox = WebDriverWait(browser, 10).until(EC.presence_of_element_located((By.ID ,"recaptcha-anchor"))).click() sleep(4) audio = WebDriverWait(browser, 10).until(EC.presence_of_element