尝试这个:
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
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)