Attach method not working with Watir-WebDriver

918 views
Skip to first unread message

Usman Hussain

unread,
Sep 23, 2010, 9:30:09 AM9/23/10
to Watir General
Hi Guys im trying to access a pop up within firefox and i thought id
try the Attach method.

Does anyone know if this is packaged in watir-webdriver?

the error im getting when runningmy script is:
undefined method `attach' for Watir::Browser:Class
(NoMethodError)

any helpp would be much appreciated.

Kind regards,
Usman Hussain

Jari Bakken

unread,
Sep 23, 2010, 9:37:21 AM9/23/10
to watir-...@googlegroups.com
On Thu, Sep 23, 2010 at 3:30 PM, Usman Hussain <usmanh...@gmail.com> wrote:
> Hi Guys im trying to access a pop up within firefox and i thought id
> try the Attach method.
>
> Does anyone know if this is packaged in watir-webdriver?
>
> the error im getting when runningmy script is:
>     undefined method `attach' for Watir::Browser:Class
> (NoMethodError)
>

We don't support this currently, blocked on this issue in WebDriver:

http://code.google.com/p/selenium/issues/detail?id=18

We do have some window handling though, you can e.g. do:

browser.window(:title => "annoying popup").use do
browser.button(:id => "close").click
end

Check out the spec for more examples:

http://github.com/jarib/watirspec/blob/watir2/window_switching_spec.rb


> any helpp would be much appreciated.
>
> Kind regards,
> Usman Hussain
>

> --
> Before posting, please read http://watir.com/support. In short: search before you ask, be nice.
>
> You received this message because you are subscribed to http://groups.google.com/group/watir-general
> To post: watir-...@googlegroups.com
> To unsubscribe: watir-genera...@googlegroups.com
>

Reply all
Reply to author
Forward
0 new messages