When a new browser window is opened, you can then ‘use’ the new window.
browser.window(:title => "annoying popup").use do browser.button(:id => "close").click end
See the Window Switching Spec for more examples.
When a new browser window is opened, you can then ‘use’ the new window.
browser.window(:title => "annoying popup").use do browser.button(:id => "close").click end
See the Window Switching Spec for more examples.