Removed js error checks.
This commit is contained in:
parent
5878b239dc
commit
fd003053cf
1 changed files with 0 additions and 24 deletions
|
@ -52,35 +52,11 @@ class TestCase < Test::Unit::TestCase
|
|||
end
|
||||
end
|
||||
local_browser.manage.timeouts.implicit_wait = 3 # seconds
|
||||
|
||||
browser_instance_js_on_start(local_browser)
|
||||
end
|
||||
|
||||
def browser_instance_js_on_start(instance)
|
||||
instance.execute_script('
|
||||
window.jsErrors = [];
|
||||
window.onerror = function(errorMessage) {
|
||||
window.jsErrors.push(errorMessage);
|
||||
};');
|
||||
end
|
||||
|
||||
def browser_instance_js_on_teardown(instance)
|
||||
result = instance.execute_script( 'return window.jsErrors;' )
|
||||
if result
|
||||
puts 'JS ERRORS: ' + result.inspect
|
||||
else
|
||||
puts 'JS ERRORS: -none-'
|
||||
end
|
||||
end
|
||||
|
||||
def teardown
|
||||
return if !@browsers
|
||||
|
||||
# show js errors
|
||||
@browsers.each{ |local_browser|
|
||||
browser_instance_js_on_teardown(local_browser)
|
||||
}
|
||||
|
||||
# only shut down browser type once on local webdriver tests
|
||||
# otherwise this error will happen "Errno::ECONNREFUSED: Connection refused - connect(2)"
|
||||
if !ENV['REMOTE_URL']
|
||||
|
|
Loading…
Reference in a new issue