Skip to content

Commit 042f857

Browse files
committedJan 27, 2014
spec: use specific finders instead of :css
1 parent f08eec4 commit 042f857

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎spec/runner.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
end
3838

3939
begin
40-
Selenium::WebDriver::Wait.new(timeout: 30, interval: 1).until {
41-
browser.find_element(:css, '.rspec-report')
40+
Selenium::WebDriver::Wait.new(timeout: 60, interval: 10).until {
41+
browser.find_element(:class, 'rspec-report')
4242
}
4343
rescue Selenium::WebDriver::Error::TimeOutError
4444
puts "\rThe specs failed loading."
@@ -55,11 +55,11 @@
5555
Selenium::WebDriver::Wait.new(timeout: 1200, interval: 30).until {
5656
print '.'
5757

58-
not browser.find_element(:css, 'p#totals').text.strip.empty?
58+
not browser.find_element(:id, 'totals').text.strip.empty?
5959
}
6060

61-
totals = browser.find_element(:css, 'p#totals').text
62-
duration = browser.find_element(:css, 'p#duration').find_element(:css, 'strong').text
61+
totals = browser.find_element(:id, 'totals').text
62+
duration = browser.find_element(:id, 'duration').find_element(:tag_name, 'strong').text
6363

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

0 commit comments

Comments
 (0)
Please sign in to comment.