Yes, I know it shouldn't be, but I just need to run a little Capybara script in the controller.
The problem is that it opens the browser and that’s all, however I want to finish testing or run it in isolation.
So, for example, if I ran something like:
Capybara.current_driver = :selenium Capybara.app_host = 'https://www.google.com' Capybara.visit("/") Capybara.has_content?('foo') Capybara.reset_sessions!
The browser and session remain open.
If I close the browser and run the test again, it will select the exception "Connection refused - connect (2)."
I need to restart the entire rails application in order to be able to restart the test.
Is this a way to run and re-run several Capybara tests over and over without restarting?
Something hypothetical like this would be nice:
Capybara.new do
or is it at the end ... Capybara.shutdown
I can not find anything in the documents.
source share