-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[nodriver]How to select the frame or click 'Verify you are human' #1943
Comments
That is most probably because the iframe is hidden under a shadow root. |
great!!!any posibility to pass this shadow root????thanks |
` async def switch_to_frame(browser, frame): async def main():
if name == "main": |
May I ask if you have resolved it? |
For many elements a position could not be determined since they are either nested or in a different origin |
Thank you, I've found a solution and can now determine the element's position. |
Good you found it, better to share your solution :) |
Glad to hear that the problem is solved. please share the solution :) |
Sorry, I haven't had much time lately. I'll provide the code I wrote two months ago; I just tried it, and it still works.
You can use the following code to click 'Verify you are human'. |
url: https://masiro.me
I tried the following code:
checkbox = await page.wait_for(text="cf-chl-widget-", timeout=10) print(checkbox) await checkbox.mouse_move() await checkbox.mouse_click() print(checkbox)
The element information is:
<input type="hidden" name="cf-turnstile-response" id="cf-chl-widget-805o7_response"></input>
However, checkbox.mouse_move() reported the following error:
could not find position for <input type="hidden" name="cf-turnstile-response" id="cf-chl-widget-805o7_response"></input>
also:
iframes = await page.select_all('iframe')
but error:
time ran out while waiting for iframe
The text was updated successfully, but these errors were encountered: