Skip to content

Commit

Permalink
spec: use specific finders instead of :css
Browse files Browse the repository at this point in the history
  • Loading branch information
meh committed Jan 27, 2014
1 parent f08eec4 commit 042f857
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/runner.rb
Expand Up @@ -37,8 +37,8 @@
end

begin
Selenium::WebDriver::Wait.new(timeout: 30, interval: 1).until {
browser.find_element(:css, '.rspec-report')
Selenium::WebDriver::Wait.new(timeout: 60, interval: 10).until {
browser.find_element(:class, 'rspec-report')
}
rescue Selenium::WebDriver::Error::TimeOutError
puts "\rThe specs failed loading."
Expand All @@ -55,11 +55,11 @@
Selenium::WebDriver::Wait.new(timeout: 1200, interval: 30).until {
print '.'

not browser.find_element(:css, 'p#totals').text.strip.empty?
not browser.find_element(:id, 'totals').text.strip.empty?
}

totals = browser.find_element(:css, 'p#totals').text
duration = browser.find_element(:css, 'p#duration').find_element(:css, 'strong').text
totals = browser.find_element(:id, 'totals').text
duration = browser.find_element(:id, 'duration').find_element(:tag_name, 'strong').text

print "\r#{totals} in #{duration}"

Expand Down

0 comments on commit 042f857

Please sign in to comment.