Error connecting to new window

I am trying to find the best way to connect to a new browser. I have used the following successfully.

browser.attach(:title, "title")

      

I read on the Watir development group that the preferred way to do this is:

browser.attach(:title=>"title")

      

This syntax seems to work for all other elements besides the attach method. The error method I am getting is ArgumentError: wrong number of arguments (1 for 2)

.

My tests are working fine, I'm just wondering if the attach method supports both ways to do it.

+2


a source to share


2 answers


I noticed the same thing recently. I think this is a mistake. Would you create a ticket?



http://jira.openqa.org/browse/WTR

+1


a source


popup = Watir::Browser.attach(:url,'whatever')

      



seemed to work for me. Or did I also use ie2 instead of the popup?

-1


a source







All Articles