I know this is a very specific toolset to be using and doesn’t affect many people, however it took me some time to get it working so it seems that it may be worth documenting. If you are working on a project that uses rails + cucumber + capybara accessible + poltergeist for automated in browser tests and want the ability to use the poltergeist remote debugging feature then you are in luck. Add the following to your
Capybara.register_driver :poltergeist_debug do |app| driver = Capybara::Poltergeist::Driver.new(app, inspector: true) adaptor = Capybara::Accessible::SeleniumDriverAdapter.new Capybara::Accessible.setup(driver, adaptor) end
Once the above code is inserted you can then follow the instructions on the poltergeist wiki on how to attach to the remote debugger.