class QUnit::Selenium::TestRunner
Public Class Methods
new(driver = nil)
click to toggle source
# File lib/qunit/selenium/test_runner.rb, line 7 def initialize(driver = nil) @driver = driver || ::Selenium::WebDriver.for(:firefox) end
Public Instance Methods
open(url, options = {})
click to toggle source
# File lib/qunit/selenium/test_runner.rb, line 11 def open(url, options = {}) timeout = options[:timeout] || 10 force_refresh = options[:force_refresh] || false @driver.get url @driver.navigate.refresh if force_refresh TestRun.new(@driver).tap do |run| ::Selenium::WebDriver::Wait.new(timeout: timeout).until do run.completed? end end.result end