Click Menu Item").click
4.6.4嵌套框架
ie.frame("frame1").frame(:name, "nested_frame")
5 新窗口
ie2 = Watir::IE.attach(:url, 'mytestsite')
ie3 = Watir::IE.attach(:title, 'Test New Window')
也可以使用正则表达式
ie4 = Watir::IE.attach(:title, /Test New/)
注意:不要把新窗口分配到你的ie变量,最好给新窗口一个不同的名字
5.验证结果
比较好的方法是在测试案例中假如验证点
5.1对象存在
使用Watir方法contains_text
ie.contains_text("Reached test verification point.")