-
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
How does nodriver switch iframes? Does the “.switch_to.frame” function exist? #1856
Comments
Did you found solution? |
same problem |
I made custom function for this component which work for me: async def switch_to_frame(self, frame):
iframe_tab: uc.Tab = next(
filter(
lambda x: str(x.target.target_id) == str(frame.frame_id), self.browser.targets
)
)
return iframe_tab``` |
do you know why i can't find my iframe in the browser.targets? i'm already using --disable-web-security |
Same issue for me, have you found a solution? |
Yeah, i just used tab.evaluate to run javascript and do it in javascript. let iframe = document.querySelector("YOUR_IFRAME_SELECTOR")
let iframe_tab = iframe.contentWindow.document.body;
//run your code using iframe_tab instead of document (ex. iframe_tab.querySelector("#payment")) |
I want to click a button in an iframe, with selenium I use switch_to.frame for switching, but I don't find it in nodriver?
The text was updated successfully, but these errors were encountered: