切换到Selenium Webdriver中的Web对话框:Python

切换到Selenium Webdriver中的Web对话框:Python,第1张

切换到Selenium Webdriver中的Web对话框:Python

试试这个:

parent_h = browser.current_window_handle# click on the link that opens a new windowhandles = browser.window_handles # before the pop-up window closeshandles.remove(parent_h)browser.switch_to_window(handles.pop())# do stuff in the popup# popup window closesbrowser.switch_to_window(parent_h)# and you're back


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5015984.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-11-14
下一篇2022-11-14

发表评论

登录后才能评论

评论列表(0条)

    保存