lib/jstd-runner/browser.rb in jstd-runner-0.0.2 vs lib/jstd-runner/browser.rb in jstd-runner-0.0.3
- old
+ new
@@ -37,26 +37,27 @@
end
def running?
Log.info "browser state: #{status}"
true
- rescue
+ rescue => ex
+ Log.warn "#{self}#running? caught #{ex.message}"
false
end
def status
- status_span.text
+ status_spans.map { |e| e.text }.inspect
end
private
- def status_span
+ def status_spans
unless @switched
- @browser.switch_to.frame("0")
+ @browser.switch_to.frame(@browser.find_element(:tag_name => "frame"))
@switched = true
end
- @browser.find_element(:tag_name => "span")
+ @browser.find_elements(:tag_name => "span")
end
end
end