selenium - iframe操作

# 5. Iframe操作

# iframe:一个网页里面嵌套了另一个html页面

# 方式1:driver.switch_to.frame(iframe_reference)
# iframe_reference的值:
# (1)iframe的name属性
# (2)iframe的WebElement属性
# (3)iframe的下标(在当前页面的第几个iframe)

# 方式2:frame_to_be_available_and_switch_to_it(iframe_reference)
# 此方法会判断iframe是否可用,并且会自动切换到iframe中

猜你喜欢

转载自www.cnblogs.com/gotesting/p/9908861.html