akephalos icon indicating copy to clipboard operation
akephalos copied to clipboard

How to replace `switch_to`

Open nathanvda opened this issue 14 years ago • 2 comments

When using the selenium, we wrote something like

page.driver.browser.switch_to.window('online_manuals')

to swich to a newly opened window (online_manuals). Instead I get this error:

undefined method `switch_to' for #<Akephalos::Client:0x1e06de8> (NoMethodError)

Is this functionality available in Akephalos? If so, how should i go about it then. Or, if this should need to be implemented, can you give me some pointers where I should get started to add this functionality?

Kind regards,

Nathan

nathanvda avatar May 09 '11 10:05 nathanvda

Curious about this too! C

cforcey avatar Aug 09 '11 20:08 cforcey

Sounds like a great feature :)

Checking the docs: http://htmlunit.sourceforge.net/apidocs/index.html

You may need to use

  • WebClient.html#openWindow
  • [WebClient.html#setCurrentWindow]((http://htmlunit.sourceforge.net/apidocs/com/gargoylesoftware/htmlunit/WebClient.html#openWindow)

Feel free to open a pull request when you start working on this, that way when can discuss blockers and api design.

https://github.com/Nerian/akephalos2

And the code implementing that feature should go here: https://github.com/Nerian/akephalos2/blob/master/lib/akephalos/capybara.rb#L334

Thanks!

Nerian avatar Oct 16 '11 10:10 Nerian