This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lib/app/page/_header.rb | |
module App | |
module Page | |
module Header | |
def sections | |
ul(:id => "sch_scopes").lis | |
end | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it "runs specs in a loop" do | |
test_framework = double('TestFramework') | |
test_framework.should_receive(:preload) | |
test_framework.should_receive(:reset) | |
test_framework.should_not_receive(:additional_options=) | |
test_framework.should_receive(:run_tests).with(["some_specs"], STDERR, STDOUT) | |
test_framework.should_receive(:options_str).with(["some_specs"], nil).and_return("some_specs") | |
Readline.should_receive(:readline).with("> 'some_specs' or: ").and_return(" \n") | |
Spork.should_receive(:exec_each_run) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source :rubygems | |
# load WatirSplash and it's dependencies | |
gem "watirsplash", "2.1.1" | |
platforms :mingw, :mswin do | |
gem "watir", "2.0.1" | |
gem "win32screenshot", "~>1.0.5", :require => "win32/screenshot" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\my_project\ui-test>bundle install | |
Fetching source index for http://rubygems.org/ | |
... | |
Using watirsplash | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NoMethodError: undefined method `autoit' for Watir:Module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WatirSplash::Util.framework = "firewatir" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "watir" | |
describe "Google" do | |
before :all do | |
@browser = Watir::Browser.new | |
@browser.goto "http://google.com/ncr" | |
end | |
it "allows to search" do | |
search_field = @browser.text_field(:name => "q") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\Users\jarmo\Desktop\minu\projects\Ruby\watir-webdriver>set WATIR_WEBDRIVER_BROWSER=ie | |
C:\Users\jarmo\Desktop\minu\projects\Ruby\watir-webdriver>rspec spec\watirspec\browser_spec.rb | |
..FFFFFFFFFFFFFFFFFFFF.FF | |
Failures: | |
1) Browser#html returns the DOM of the page as an HTML string | |
Failure/Error: html = browser.html.downcase # varies between browsers | |
Selenium::WebDriver::Error::NoSuchDriverError: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[30, 39] in c:/ruby/lib/ruby/gems/1.8/gems/selenium-webdriver-0.1.3.dev/lib/selenium/webdriver/common/file_reaper.rb | |
30 FileUtils.rm_rf tmp_files.delete(file) | |
31 end | |
32 | |
33 def reap! | |
34 require "ruby-debug"; debugger; | |
=> 35 tmp_files.each { |file| FileUtils.rm_rf(file) } if reap? | |
36 end | |
37 end | |
38 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ff.links.find_all {|link| link.class_name == "firm"}.each do |link| | |
puts link.href | |
puts link.span(:class => "firm_title").text | |
puts "===========" | |
end |