Join GitHub today
undefined method `switch_to' #80
I'm trying to use this code:
It works with Selenium, but not when I use Poltergeist:
NoMethodError: undefined method `switch_to' for #<Capybara::RackTest::Browser:0x007fafff8841e8>
Is there other way to accept the
That's a Selenium-specific API, so no surprise it doesn't work with Poltergeist. Also, the error you've shown indicates you are using the RackTest driver rather than Poltergeist.
Poltergeist always returns
I want to retain the ability to use Firefox if needed, and I'm finding this rule works out alright:
Since Poltergeist can't dismiss a popup, though, I guess I can't test what happens when someone says no to the confirm dialog.