1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Fix selenium-webdriver derprecation notices in specs

This commit is contained in:
Thomas Walpole 2019-04-18 14:20:56 -07:00
parent 6126b358c4
commit a8395a695d
2 changed files with 12 additions and 2 deletions

View file

@ -5,7 +5,13 @@ require 'selenium-webdriver'
require 'shared_selenium_session'
require 'rspec/shared_spec_matchers'
::Selenium::WebDriver::IE.driver_path = 'C:\Tools\WebDriver\IEDriverServer.exe' if ENV['CI']
if ENV['CI']
if ::Selenium::WebDriver::Service.respond_to? :driver_path=
::Selenium::WebDriver::IE::Service
else
::Selenium::WebDriver::IE
end.driver_path = 'C:\Tools\WebDriver\IEDriverServer.exe'
end
def selenium_host
ENV.fetch('SELENIUM_HOST', '192.168.56.102')

View file

@ -7,7 +7,11 @@ require 'rspec/shared_spec_matchers'
SAFARI_DRIVER = :selenium_safari
::Selenium::WebDriver::Safari.driver_path = '/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver'
if ::Selenium::WebDriver::Service.respond_to? :driver_path=
::Selenium::WebDriver::Safari::Service
else
::Selenium::WebDriver::Safari
end.driver_path = '/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver'
browser_options = ::Selenium::WebDriver::Safari::Options.new
# browser_options.headless! if ENV['HEADLESS']