Added rescue to exception to ignore expection.
This commit is contained in:
parent
ea21efab56
commit
ea5f6d3606
1 changed files with 11 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
ENV['RAILS_ENV'] = 'test'
|
ENV['RAILS_ENV'] = 'test'
|
||||||
# rubocop:disable Next, CyclomaticComplexity, PerceivedComplexity
|
# rubocop:disable Next, CyclomaticComplexity, PerceivedComplexity, HandleExceptions
|
||||||
require File.expand_path('../../config/environment', __FILE__)
|
require File.expand_path('../../config/environment', __FILE__)
|
||||||
require 'selenium-webdriver'
|
require 'selenium-webdriver'
|
||||||
|
|
||||||
|
@ -754,6 +754,8 @@ class TestCase < Test::Unit::TestCase
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
rescue
|
||||||
|
# try again
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
|
@ -808,6 +810,8 @@ wait untill text in selector disabppears
|
||||||
sleep 1
|
sleep 1
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
rescue
|
||||||
|
# try again
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
sleep 1
|
sleep 1
|
||||||
|
@ -850,6 +854,8 @@ wait untill text in selector disabppears
|
||||||
else
|
else
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
rescue
|
||||||
|
# try again
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
sleep 1
|
sleep 1
|
||||||
|
@ -1191,6 +1197,8 @@ wait untill text in selector disabppears
|
||||||
if text =~ /(Discard your unsaved changes.|Verwerfen der)/
|
if text =~ /(Discard your unsaved changes.|Verwerfen der)/
|
||||||
found = true
|
found = true
|
||||||
end
|
end
|
||||||
|
rescue
|
||||||
|
# try again
|
||||||
end
|
end
|
||||||
sleep 1
|
sleep 1
|
||||||
end
|
end
|
||||||
|
@ -1213,6 +1221,8 @@ wait untill text in selector disabppears
|
||||||
if !text || text.empty?
|
if !text || text.empty?
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
rescue
|
||||||
|
# try again
|
||||||
end
|
end
|
||||||
sleep 1
|
sleep 1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue