Commit 071c0c0b authored by anonym's avatar anonym
Browse files

Also retry when failing to open a page in the chroot browsers.

parent f4304c83
......@@ -100,16 +100,19 @@ When /^I open the address "([^"]*)" in the (.*)$/ do |address, browser|
@screen.type('v', Sikuli::KeyModifier.CTRL)
@screen.type(Sikuli::Key.ENTER)
end
open_address.call
recovery_on_failure = Proc.new do
@screen.type(Sikuli::Key.ESC)
@screen.waitVanish('BrowserReloadButton.png', 3)
open_address.call
end
if browser == "Tor Browser"
recovery_on_failure = Proc.new do
@screen.type(Sikuli::Key.ESC)
@screen.waitVanish('BrowserReloadButton.png', 3)
open_address.call
end
retry_tor(recovery_on_failure) do
@screen.wait('BrowserReloadButton.png', 120)
end
retry_method = method(:retry_tor)
else
retry_method = Proc.new { |p, &b| retry_action(10, recovery_proc: p, &b) }
end
open_address.call
retry_method.call(recovery_on_failure) do
@screen.wait('BrowserReloadButton.png', 120)
end
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment