Changes: Added the check that launcher can be found to perf tests

RevBy:TrustMe
pull/1/head
Olli Leppanen 16 years ago
parent 5c63c83aac
commit 6078a8171d

@ -71,13 +71,13 @@ system("initctl stop xsession/mprogressindicator")
while appOnTop.attribute('objectName') != 'meegotouchhome'
# Killing the topmost application with xkill
system "DISPLAY=:0 xkill &"
sleep(0.5)
sut.tap_screen(50, 50)
# fullName = appOnTop.attribute('FullName')
# puts "Now killing #{fullName} from the top"
# system "pkill #{fullName}"
appOnTop = sut.application()
# system "DISPLAY=:0 xkill &"
# sleep(0.5)
# sut.tap_screen(50, 50)
fullName = appOnTop.attribute('FullName')
puts "Now killing #{fullName} from the top"
system "pkill #{fullName}"
appOnTop = sut.application()
end
# Application grid should be now visible
@ -91,8 +91,19 @@ end
sleep(2)
if @meegoHome.test_object_exists?("LauncherButton", :text => appName)
icon = @meegoHome.LauncherButton(:name => "LauncherButton", :text => appName)
grid = nil
if @meegoHome.test_object_exists?("Launcher" )
grid = @meegoHome.Launcher
elsif @meegoHome.test_object_exists?("SwipeLauncher" )
grid = @meegoHome.SwipeLauncher
else
raise "Launcher not found!"
exit 1
end
while icon.attribute('visibleOnScreen') == 'false' || @meegoHome.LauncherButton(:name => "LauncherButton", :text => appName).attribute('y').to_i > 400
@meegoHome.Launcher.MPannableViewport( :name => 'SwipePage' ).MWidget( :name => 'glass' ).gesture(:Up, 1, 300)
grid.MPannableViewport( :name => 'SwipePage' ).MWidget( :name => 'glass' ).gesture(:Up, 1, 300)
sleep(0.2)
icon.refresh
end
@ -108,5 +119,5 @@ else
raise "Application not found in Application grid"
exit 1
end

Loading…
Cancel
Save