Skip to content

Commit

Permalink
Run watirtests with IE on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins-CI committed Mar 25, 2014
1 parent dcd7052 commit 1eb39e7
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Gemfile.watir
Expand Up @@ -9,12 +9,12 @@ group :development, :test do
gem 'hoe'
gem 'hoe-travis'
gem 'minitest'
gem 'racc'
gem 'simplecov'
gem 'travis-lint'
end

group :test do

gem 'rspec'
gem 'watir'
gem 'watir-webdriver'
Expand Down
52 changes: 46 additions & 6 deletions Gemfile.watir.lock
Expand Up @@ -10,17 +10,18 @@ GEM
data_magic (0.17)
faker (>= 1.1.2)
yml_reader (>= 0.2)
debugger (1.6.5)
debugger (1.6.6)
columnize (>= 0.3.1)
debugger-linecache (~> 1.2.0)
debugger-ruby_core_source (~> 1.3.1)
debugger-ruby_core_source (~> 1.3.2)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.3.1)
debugger-ruby_core_source (1.3.2)
diff-lcs (1.2.5)
docile (1.1.3)
faker (1.2.0)
i18n (~> 0.5)
ffi (1.9.3)
ffi (1.9.3-x86-mingw32)
flexmock (1.3.3)
hashr (0.0.22)
hoe (3.9.0)
Expand All @@ -30,8 +31,15 @@ GEM
travis-lint (~> 1.2)
i18n (0.6.9)
method_source (0.8.2)
mini_magick (3.5.0)
subexec (~> 0.2.1)
mini_portile (0.5.3)
minitest (5.2.3)
multi_json (1.8.4)
nokogiri (1.6.1)
mini_portile (~> 0.5.0)
nokogiri (1.6.1-x86-mingw32)
mini_portile (~> 0.5.0)
page-object (0.9.6)
page_navigation (>= 0.9)
selenium-webdriver (>= 2.39.0)
Expand All @@ -42,11 +50,17 @@ GEM
coderay (~> 1.0)
method_source (~> 0.8)
slop (~> 3.4)
pry (0.9.12.6-x86-mingw32)
coderay (~> 1.0)
method_source (~> 0.8)
slop (~> 3.4)
win32console (~> 1.3)
pry-debugger (0.2.2)
debugger (~> 1.3)
pry (~> 0.9.10)
racc (1.4.11)
rake (10.1.1)
rautomation (0.14.0)
ffi
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
Expand All @@ -66,19 +80,46 @@ GEM
multi_json
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
slop (3.4.7)
slop (3.5.0)
subexec (0.2.3)
travis-lint (1.7.0)
hashr (~> 0.0.22)
watir (5.0.0)
commonwatir (~> 4)
watir-webdriver
watir (5.0.0-x86-mingw32)
commonwatir (~> 4)
watir-classic (~> 4.0)
watir-webdriver
watir-classic (4.0.1)
ffi (~> 1.0)
multi_json
nokogiri (>= 1.5.7.rc3)
rautomation (~> 0.7)
win32-process (>= 0.5.5)
win32screenshot (~> 1.0.9)
windows-pr (>= 0.6.6)
watir-webdriver (0.6.7)
selenium-webdriver (>= 2.18.0)
websocket (1.0.7)
win32-api (1.5.1-x86-mingw32)
win32-process (0.7.4)
ffi (>= 1.0.0)
win32console (1.3.2-x86-mingw32)
win32screenshot (1.0.10)
ffi (~> 1.0)
mini_magick (~> 3.5.0)
rautomation (~> 0.7)
windows-api (0.4.2)
win32-api (>= 1.4.5)
windows-pr (1.2.3)
win32-api (>= 1.4.5)
windows-api (>= 0.4.0)
yml_reader (0.2)

PLATFORMS
ruby
x86-mingw32

DEPENDENCIES
flexmock
Expand All @@ -88,7 +129,6 @@ DEPENDENCIES
page-object
pry
pry-debugger
racc
rake
rspec
simplecov
Expand Down
7 changes: 7 additions & 0 deletions run_ie_watir_tests.cmd
@@ -0,0 +1,7 @@
rem
echo zwei
set PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\C:\Program Files\TortoiseSVN\bin;C:\Program Files\GnuWin32\bin;E:\Programme\Git\cmd;E:\Programme\Git\bin;E:\Programme\git\bin;E:\Programme\Ruby193\bin
ruby -v
call bundle install --without debugger --gemfile Gemfile.watir
set ODDB_BROWSER=ie
rspec spec
15 changes: 11 additions & 4 deletions spec/spec_helper.rb
@@ -1,7 +1,16 @@
#!/usr/bin/env ruby
# encoding: utf-8

require 'watir-webdriver'
if RUBY_PLATFORM.match(/mingw/)
require 'watir'
browsers2test = [ :ie ]
else
browsers2test ||= [ ENV['ODDB_BROWSER'] ] if ENV['ODDB_BROWSER']
browsers2test = [ :chrome ] unless browsers2test and browsers2test.size > 0 # could be any combination of :ie, :firefox, :chrome
require 'watir-webdriver'
end
require 'page-object'
require 'fileutils'
require 'page-object'
require 'fileutils'
require 'pp'
Expand All @@ -12,8 +21,6 @@
ImageDest = File.join(Dir.pwd, 'images')
FileUtils.makedirs(ImageDest, :verbose => true) unless File.exists?(ImageDest)

browsers2test ||= [ ENV['ODDB_BROWSER'] ] if ENV['ODDB_BROWSER']
browsers2test = [ :chrome ] unless browsers2test and browsers2test.size > 0 # could be any combination of :ie, :firefox, :chrome
Browser2test = browsers2test
RegExpTwoMedis = /\/\d{13},\d{13}(\?|)$/
RegExpOneMedi = /\/\d{13}(\?|)$/
Expand All @@ -38,7 +45,7 @@ def logout

def waitForOddbToBeReady(browser = nil, url = OddbUrl, maxWait = 30)
unless browser
browser = Watir::Browser.new(Browser2test[0])
browser = Watir::Browser.new(Browser2test[0])
@browser = browser
end
startTime = Time.now
Expand Down

0 comments on commit 1eb39e7

Please sign in to comment.