diff --git a/.travis.yml b/.travis.yml index 6b7ff9f..fbd1039 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,10 @@ rvm: before_script: - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" + - "gem uninstall rake --force" + - "gem install rake -v 0.9.2.2" + - "bundle install" notifications: email: - - watirmark-dev@blackbaud.com \ No newline at end of file + - watirmark-dev@blackbaud.com diff --git a/lib/watirmark/session.rb b/lib/watirmark/session.rb index f13140f..c3b0e3c 100644 --- a/lib/watirmark/session.rb +++ b/lib/watirmark/session.rb @@ -62,15 +62,21 @@ def initialize end def default_chrome_profile + profile = Selenium::WebDriver::Chrome::Profile.new + download_directory = File.join(Configuration.instance.projectpath, "reports", "downloads") download_directory.gsub!("/", "\\") if Selenium::WebDriver::Platform.windows? - { - :download => { - :prompt_for_download => false, - :default_directory => download_directory - } - } + + profile['download.prompt_for_download'] = false + profile['download.default_directory'] = download_directory + + # Enable Flash + profile['profile.default_content_setting_values.plugins'] = 1 + profile['profile.content_settings.plugin_whitelist.adobe-flash-player'] = 1 + profile['profile.content_settings.exceptions.plugins.*,*.per_resource.adobe-flash-player'] = 1 + + profile end def default_firefox_profile @@ -202,7 +208,7 @@ def new_watir_browser when :sauce Watir::Browser.new use_sauce when :chrome - Watir::Browser.new :chrome, prefs: config.chrome_profile, http_client: client + Watir::Browser.new :chrome, prefs: config.chrome_profile, http_client: client, switches: %w[--disable-infobars] else Watir::Browser.new config.webdriver.to_sym, http_client: client end diff --git a/lib/watirmark/version.rb b/lib/watirmark/version.rb index 3d59652..0e1eea2 100644 --- a/lib/watirmark/version.rb +++ b/lib/watirmark/version.rb @@ -1,5 +1,5 @@ module Watirmark module Version - STRING = '5.29.4' + STRING = '5.29.5' end end