Commit caf14eb5 authored by Tails developers's avatar Tails developers
Browse files

Close GNOME notifications.

They can block sikuli from finding what it is looking for.
parent 42038baa
......@@ -11,6 +11,7 @@ Feature: Browsing the web using Iceweasel
And Tor has built a circuit
And Iceweasel has autostarted and is not loading a web page
And the time has synced
And I have closed all annoying notifications
And I save the background snapshot if it does not exist
Scenario: Opening check.torproject.org in Iceweasel will show the green onion and the congratualtions message.
......
......@@ -53,6 +53,20 @@ Given /^Iceweasel has autostarted and is not loading a web page$/ do
@screen.type("about:blank" + Sikuli::KEY_RETURN)
end
Given /^I have closed all annoying notifications$/ do
next if @background_restored
begin
# note that we cannot use find_all as the resulting matches will
# have the positions from before we start closing notificatios,
# but closing them will change the positions.
while match = @screen.find("GnomeNotificationX.png")
@screen.click(match.x + match.width/2, match.y + match.height/2)
end
rescue Sikuli::ImageNotFound
# noop
end
end
Given /^I save the background snapshot if it does not exist$/ do
if !@background_restored
@vm.save_snapshot(@background_snapshot)
......
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