首页 > 其他 > 详细

切换句柄

时间:2020-01-17 17:14:19      阅读:93      评论:0      收藏:0      [点我收藏+]
#切换句柄(2个标签)
handles = driver.window_handles
current_handles = driver.current_window_handle
for handle in handles:
if handle != current_handles:
driver.switch_to.window(handle)

# 切换句柄(3个标签)
sencond_handle = driver.current_window_handle
handles = driver.window_handles
for handle in handles:
if handle !=sencond_handle and handle != current_handles:
driver.switch_to.window(handle)

切换句柄

原文:https://www.cnblogs.com/wenjing2019/p/12206438.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!