Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pikender/4417707 to your computer and use it in GitHub Desktop.
Save pikender/4417707 to your computer and use it in GitHub Desktop.
Debug Javascript Enabled Cucumber Features - Enable Firebug in Firefox
- Start Firefox ProfileManager on Ubuntu
CMD: /usr/lib/firefox/firefox -ProfileManager
- Create Profile
- Let's say, profile name is WebDriver
- Select the WebDriver Profile
- Start Firefox
- Install Firebug
- Close Firefox
- File: features/support/env.rb
- Comment below line
Capybara.default_driver = :selenium
- Uncomment and Add below code
Capybara.register_driver :selenium do |app|
Capybara::Selenium::Driver.new(app, :browser => :firefox, :profile => "WebDriver")
end
Now when javascript enabled cucumber features are launched and you pause the browser, you can debug JS in the available Firebug Console
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment