题图授予IC
switch_to_frame()
switch_to_window()
对于一个现代的 web 应用,经常会出现框架(frame)或窗口(window)的应用。
有时候我们定位一个元素,定位器没有问题,但是就是定位不了,这时候就要检查这个元素是否在一个 frame 中。
seelnium webdriver 提供了一个switch_to_frame 方法,可以很轻松的来解决这个问题。
多层框架定位
frame.html
frame
href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstra
frame
height="600">