0

I'm prototyping a script in irb and I'm running into a NoMethod error for '.use' when using the window switching api on tabs. Anything as simple as

b.windows.last.use


b.windows[2].use

Will not be respected and throw aNoMethodError: undefined method 'use' for nil:NilClass error while the window remains tabbed. If I drag the tab out to a separate window and run the same command it works as expected. Is this a known issue?

4

1 回答 1

0

请确保您要使用的窗口是真正的浏览器新窗口,而不是选项卡,您可以使用本规范中描述的这些方法。我不确定 webdriver 是否支持将选项卡捕获为浏览器。

于 2013-07-20T12:32:54.743 回答