Reputation: 127
In our application on particular operation it proceed & open other IE instance to show entered data. I wanted to close that IE instance I am unable to handle that instance Any solution?
popup have title but it open in other instance of IE if i need to close that popup & again come to my original instance what should i do.
i also use this commands
browser.window(:title => "annoying popup").use do
browser.button(:id => "close").click
but its showing
1) Error:
test_1(Work_login):
NoMethodError: undefined method `window' for #<Watir::IE:0x1dae700> this error
Upvotes: 0
Views: 1144
Reputation: 6660
browser.window(:how, 'what').use
is a method only supported by Watir-Webdriver.
If you are using Watir (which I presume since you did not include the watir-webdriver tag) then that is why you are getting the error you see regarding 'undefined method'. You need to use
browser.attach(:how, 'what')
Upvotes: 1