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

Added configuration option to pass startup switches to Selenium browsers #54

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions lib/webrat/core/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ def application_port_for_selenium
# Set the firefox profile for selenium to use
attr_accessor :selenium_firefox_profile

# Set Browser-specific options for Selenium session
attr_accessor :selenium_browser_options

# How many redirects to the same URL should be halted as an infinite redirect
# loop? Defaults to 10
attr_accessor :infinite_redirect_limit
Expand All @@ -87,6 +90,7 @@ def initialize # :nodoc:
self.selenium_browser_key = '*firefox'
self.selenium_browser_startup_timeout = 5
self.selenium_verbose_output = false
self.selenium_browser_options = {}

tmp_dir = Pathname.new(Dir.pwd).join("tmp")
self.saved_pages_dir = tmp_dir.exist? ? tmp_dir : Dir.pwd
Expand Down
2 changes: 1 addition & 1 deletion lib/webrat/selenium/selenium_session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def setup #:nodoc:
Webrat::Selenium::ApplicationServerFactory.app_server_instance.boot

create_browser
$browser.start
$browser.start_new_browser_session(Webrat.configuration.selenium_browser_options)

extend_selenium
define_location_strategies
Expand Down
Binary file modified vendor/selenium-server.jar
Binary file not shown.