akephalos
akephalos copied to clipboard
How to replace `switch_to`
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
Curious about this too! C
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!