From e8b6c6061674ad1ea5bac2ecf4d43b2d979066ec Mon Sep 17 00:00:00 2001 From: Lucas Tierney Date: Fri, 24 Feb 2017 08:16:37 -0600 Subject: [PATCH] [rb] add IE testing to appveyor --- appveyor.yml | 16 +++++++++++++++- .../webdriver/spec_support/test_environment.rb | 7 +++++++ scripts/appveyor/script.bat | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100755 scripts/appveyor/script.bat diff --git a/appveyor.yml b/appveyor.yml index 85b013bc8f76f..5c714b5373b6c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,9 +1,23 @@ shallow_clone: true build: off +environment: + matrix: + - RUBY_VERSION: 22-x64 + TASK: build + - RUBY_VERSION: 200-x64 + TASK: //rb:ie-test install: - 'set JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0' - 'set PATH=%JAVA_HOME%;%PATH%' - 'set RUBY_HOME=C:\Ruby22-x64\bin' - 'set PATH=%RUBY_HOME%;%PATH%' +before_test: + - ruby -v + - gem -v + - bundle -v + - curl -fsS -o C:\Tools\WebDriver\IEServerDriver.zip http://selenium-release.storage.googleapis.com/3.1/IEDriverServer_Win32_3.1.0.zip + - 7z e C:\Tools\WebDriver\IEServerDriver.zip -oC:\Tools\WebDriver -aoa + - dir C:\Tools\WebDriver + test_script: - - cmd: './go build' + - cmd: scripts/appveyor/script.bat diff --git a/rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb b/rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb index ecce43e158a29..328b59ace876e 100644 --- a/rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb +++ b/rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb @@ -222,6 +222,13 @@ def create_ff_esr_driver(opt = {}) WebDriver::Driver.for :firefox, opt end + def create_ie_driver(opt = {}) + opt[:desired_capabilities] ||= WebDriver::Remote::Capabilities.ie + opt[:desired_capabilities]['requireWindowFocus'] = true + + WebDriver::Driver.for :ie, opt + end + def create_ff_nightly_driver(opt = {}) unless ENV['FF_NIGHTLY_BINARY'] raise StandardError, "ENV['FF_NIGHTLY_BINARY'] must be set to test Nightly Firefox" diff --git a/scripts/appveyor/script.bat b/scripts/appveyor/script.bat new file mode 100755 index 0000000000000..41d249f411dbf --- /dev/null +++ b/scripts/appveyor/script.bat @@ -0,0 +1 @@ +./go %TASK%