From 958c1ce736e09c4967da9253501da740cb8b3a9a Mon Sep 17 00:00:00 2001 From: Oskari Timperi Date: Thu, 24 Mar 2011 12:50:11 +0200 Subject: [PATCH] Changes: Fix get-coordinates.rb RevBy: TrustMe --- .../Harmattan/TestScripts/get-coordinates.rb | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/tests/Harmattan/TestScripts/get-coordinates.rb b/tests/Harmattan/TestScripts/get-coordinates.rb index 274e1fa..55a422f 100755 --- a/tests/Harmattan/TestScripts/get-coordinates.rb +++ b/tests/Harmattan/TestScripts/get-coordinates.rb @@ -132,27 +132,17 @@ 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 +if @meegoHome.test_object_exists?(:name => "LauncherButton", :text => appName) + icon = @meegoHome.SwipeLauncherButton(:name => "LauncherButton", :text => appName) while icon.attribute('visibleOnScreen') == 'false' || icon.attribute('y').to_i > 400 - grid.MPannableViewport( :name => 'SwipePage' ).MWidget( :name => 'glass' ).gesture(:Up, 1, 300) + @meegoHome.MPannableViewport( :name => 'SwipePage' ).MWidget( :name => 'glass' ).gesture(:Up, 1, 300) sleep(0.2) icon.refresh end - xpos = @meegoHome.LauncherButton(:name => "LauncherButton", :text => appName).attribute('x') + xpos = @meegoHome.SwipeLauncherButton(:name => "LauncherButton", :text => appName).attribute('x') xpos = xpos.to_i + 59 - ypos = @meegoHome.LauncherButton(:name => "LauncherButton", :text => appName).attribute('y') + ypos = @meegoHome.SwipeLauncherButton(:name => "LauncherButton", :text => appName).attribute('y') ypos = ypos.to_i + 58 @pos = "#{xpos}x#{ypos}"