码迷,mamicode.com
首页 > 编程语言 > 详细

python的frame切换

时间:2019-06-17 20:45:36      阅读:174      评论:0      收藏:0      [点我收藏+]

标签:sele   定位   http   web   rom   col   默认   chrome   ***   

python的frame切换

from
selenium import webdriver driver = webdriver.Chrome() driver.get("https://www.***.cn") #有id的,用id定位,id=iframe1 driver.switch_to.frame("iframe1") #无id的,用index索引定位,index=1 driver.switch_to.frame(1) #切换回默认 driver.switch_to.default_content() driver.quit()

 

python的frame切换

标签:sele   定位   http   web   rom   col   默认   chrome   ***   

原文地址:https://www.cnblogs.com/tester-go/p/11041873.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!