|
|
|
|
@ -125,6 +125,7 @@ system "mcetool --unblank-screen > /dev/null"
|
|
|
|
|
|
|
|
|
|
# Application grid should be now visible
|
|
|
|
|
if options[:grid]
|
|
|
|
|
puts "Exiting as grid is true"
|
|
|
|
|
exit 0;
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
@ -132,27 +133,34 @@ end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sleep(2)
|
|
|
|
|
if @meegoHome.test_object_exists?(:text => appName)
|
|
|
|
|
icon = @meegoHome.SwipeLauncherButton(:text => appName)
|
|
|
|
|
|
|
|
|
|
while icon.attribute('visibleOnScreen') == 'false' || icon.attribute('y').to_i > 400
|
|
|
|
|
@meegoHome.SwipePannableViewport( :name => 'SwipePage' ).MWidget( :name => 'glass' ).gesture(:Up, 1, 350)
|
|
|
|
|
sleep(0.2)
|
|
|
|
|
icon.refresh
|
|
|
|
|
end
|
|
|
|
|
xpos = @meegoHome.SwipeLauncherButton(:text => appName).attribute('x')
|
|
|
|
|
xpos = xpos.to_i + 59
|
|
|
|
|
ypos = @meegoHome.SwipeLauncherButton(:text => appName).attribute('y')
|
|
|
|
|
ypos = ypos.to_i + 58
|
|
|
|
|
@pos = "#{xpos}x#{ypos}"
|
|
|
|
|
#run loop 4 times (4 seconds)
|
|
|
|
|
4.times do
|
|
|
|
|
if @meegoHome.test_object_exists?(:text => appName)
|
|
|
|
|
icon = @meegoHome.SwipeLauncherButton(:text => appName)
|
|
|
|
|
|
|
|
|
|
puts @pos
|
|
|
|
|
exit 0
|
|
|
|
|
else
|
|
|
|
|
#icon does not
|
|
|
|
|
#raise error and exit
|
|
|
|
|
raise "Application not found in Application grid"
|
|
|
|
|
exit 1
|
|
|
|
|
while icon.attribute('visibleOnScreen') == 'false' || icon.attribute('y').to_i > 400
|
|
|
|
|
@meegoHome.SwipePannableViewport( :name => 'SwipePage' ).MWidget( :name => 'glass' ).gesture(:Up, 1, 350)
|
|
|
|
|
sleep(0.2)
|
|
|
|
|
icon.refresh
|
|
|
|
|
end
|
|
|
|
|
xpos = @meegoHome.SwipeLauncherButton(:text => appName).attribute('x')
|
|
|
|
|
xpos = xpos.to_i + 59
|
|
|
|
|
ypos = @meegoHome.SwipeLauncherButton(:text => appName).attribute('y')
|
|
|
|
|
ypos = ypos.to_i + 58
|
|
|
|
|
@pos = "#{xpos}x#{ypos}"
|
|
|
|
|
|
|
|
|
|
puts @pos
|
|
|
|
|
exit 0 #exit gracefully
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
sleep(1)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
#icon does not exist
|
|
|
|
|
#raise error and exit
|
|
|
|
|
puts "app not found"
|
|
|
|
|
raise "Application not found in Application grid"
|
|
|
|
|
exit 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|