Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enables firebug usage in selenium #254

Merged
merged 3 commits into from
Jul 17, 2013
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added features/support/firebug-1.11.4.xpi
Binary file not shown.
27 changes: 27 additions & 0 deletions features/support/selenium_with_firebug.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Capybara.register_driver :selenium_with_firebug do |app|
Capybara::Selenium::Driver
profile = Selenium::WebDriver::Firefox::Profile.new
profile.add_extension(File.expand_path("../firebug-1.11.4.xpi", __FILE__))

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about adding something like profile.add_extension(File.expand_path(../firepath.xpi", FILE))
to also have a nice way for testing xpath and css selectors to get the cukes right?

# Prevent "Welcome!" tab
profile["extensions.firebug.currentVersion"] = "999"

# Enable for all sites.
profile["extensions.firebug.allPagesActivation"] = "on"

# Enable all features.
['console', 'net', 'script'].each do |feature|
profile["extensions.firebug.#{feature}.enableSites"] = true
end

profile['intl.accept_languages'] = 'en,en-us'

Capybara::Selenium::Driver.new(app,
:browser => :firefox,
:profile => profile)
end

Before '@firebug' do
Capybara.current_driver = :selenium_with_firebug
end