Skip to content

Instantly share code, notes, and snippets.

@divamtbf
Created January 20, 2017 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save divamtbf/8c9fb2b021347e8ac1796f5b9d19bb72 to your computer and use it in GitHub Desktop.
Save divamtbf/8c9fb2b021347e8ac1796f5b9d19bb72 to your computer and use it in GitHub Desktop.
DIVA_menu_nav_RubyRunGenerated
loadTestDB
module DIVA_menu_nav
def self.After_click(loopTime)
tcase = TestCase.new("After_click")
tcase << TestAction.new(:scriptAction_1) do
waitsecond(2)
allow_popup
waitsecond(15)
pressHome
waitsecond(2)
end
tcase.run(loopTime)
end
def self.mainLoop(loopTime)
WebSocketXServer.setAutoUpdate(false)
index = $mainResumeMainLoop
$mainResumeMainLoop = 0
writelog("mainLoop::#{index}::Resume") if index > 0
while index < loopTime
$curMainLoopNum = index
$POWERLOG = true
waitsecond(2)
if rand(100) < 0
$x1 = 210
$x2 = 550
$x3 = 890
$x4 = 1230
$y1 = 325
$y2 = 743
$y3 = 1161
$y4 = 1579
$y5 = 1997
$page_num = 7
end
if rand(100) < 0
pressHome
click($x1,$y5)
After_click 1
click($x2,$y5)
After_click 1
click($x3,$y5)
After_click 1
click($x4,$y5)
After_click 1
end
if rand(100) < 0
swipe_horizontal 40
waitsecond(2)
end
if rand(100) < 0
click($x1,$y1)
After_click 1
click($x2,$y1)
After_click 1
click($x3,$y1)
After_click 1
click($x4,$y1)
After_click 1
click($x1,$y2)
After_click 1
click($x2,$y2)
After_click 1
click($x3,$y2)
After_click 1
click($x4,$y2)
After_click 1
click($x1,$y3)
After_click 1
click($x2,$y3)
After_click 1
click($x3,$y3)
After_click 1
click($x4,$y3)
After_click 1
click($x1,$y4)
After_click 1
click($x2,$y4)
After_click 1
click($x3,$y4)
After_click 1
click($x4,$y4)
After_click 1
click($x1,$y5)
After_click 1
click($x2,$y5)
After_click 1
click($x3,$y5)
After_click 1
click($x4,$y5)
After_click 1
end
if rand(100) < 0
swipe_horizontal 40
waitsecond(2)
end
if rand(100) < 0
click($x1,$y1)
After_click 1
click($x2,$y1)
After_click 1
click($x3,$y1)
After_click 1
click($x4,$y1)
After_click 1
click($x1,$y2)
After_click 1
click($x2,$y2)
After_click 1
click($x3,$y2)
After_click 1
click($x4,$y2)
After_click 1
click($x1,$y3)
After_click 1
click($x2,$y3)
After_click 1
click($x3,$y3)
After_click 1
click($x4,$y3)
After_click 1
click($x1,$y4)
After_click 1
click($x2,$y4)
After_click 1
click($x3,$y4)
After_click 1
click($x4,$y4)
After_click 1
click($x1,$y5)
After_click 1
click($x2,$y5)
After_click 1
click($x3,$y5)
After_click 1
click($x4,$y5)
After_click 1
end
if rand(100) < 0
swipe_horizontal 40
waitsecond(2)
end
if rand(100) < 0
click($x1,$y1)
After_click 1
click($x2,$y1)
After_click 1
click($x3,$y1)
After_click 1
click($x4,$y1)
After_click 1
click($x1,$y2)
After_click 1
click($x2,$y2)
After_click 1
click($x3,$y2)
After_click 1
click($x4,$y2)
After_click 1
click($x1,$y3)
After_click 1
click($x2,$y3)
After_click 1
click($x3,$y3)
After_click 1
click($x4,$y3)
After_click 1
click($x1,$y4)
After_click 1
click($x2,$y4)
After_click 1
click($x3,$y4)
After_click 1
click($x4,$y4)
After_click 1
click($x1,$y5)
After_click 1
click($x2,$y5)
After_click 1
click($x3,$y5)
After_click 1
click($x4,$y5)
After_click 1
end
if rand(100) < 0
swipe_horizontal 40
waitsecond(2)
end
if rand(100) < 0
click($x1,$y1)
After_click 1
click($x2,$y1)
After_click 1
click($x3,$y1)
After_click 1
click($x4,$y1)
After_click 1
click($x5,$y1)
After_click 1
click($x1,$y2)
After_click 1
click($x2,$y2)
After_click 1
click($x3,$y2)
After_click 1
click($x4,$y2)
After_click 1
click($x5,$y2)
After_click 1
click($x1,$y3)
After_click 1
click($x2,$y3)
After_click 1
click($x3,$y3)
After_click 1
click($x4,$y3)
After_click 1
click($x5,$y3)
After_click 1
click($x1,$y4)
After_click 1
click($x2,$y4)
After_click 1
click($x3,$y4)
After_click 1
click($x4,$y4)
After_click 1
click($x5,$y4)
After_click 1
click($x1,$y5)
After_click 1
click($x2,$y5)
After_click 1
click($x3,$y5)
After_click 1
click($x4,$y5)
After_click 1
click($x5,$y5)
After_click 1
end
if rand(100) < 0
swipe_horizontal 40
waitsecond(2)
end
if rand(100) < 0
click($x1,$y1)
After_click 1
click($x2,$y1)
After_click 1
click($x3,$y1)
After_click 1
click($x4,$y1)
After_click 1
click($x1,$y2)
After_click 1
click($x2,$y2)
After_click 1
click($x3,$y2)
After_click 1
click($x4,$y2)
After_click 1
click($x1,$y3)
After_click 1
click($x2,$y3)
After_click 1
click($x3,$y3)
After_click 1
click($x4,$y3)
After_click 1
click($x1,$y4)
After_click 1
click($x2,$y4)
After_click 1
click($x3,$y4)
After_click 1
click($x4,$y4)
After_click 1
click($x1,$y5)
After_click 1
click($x2,$y5)
After_click 1
click($x3,$y5)
After_click 1
click($x4,$y5)
After_click 1
end
if rand(100) < 0
swipe_horizontal 40
waitsecond(2)
end
if rand(100) < 0
click($x1,$y1)
After_click 1
click($x2,$y1)
After_click 1
click($x3,$y1)
After_click 1
click($x4,$y1)
After_click 1
click($x1,$y2)
After_click 1
click($x2,$y2)
After_click 1
click($x3,$y2)
After_click 1
click($x4,$y2)
After_click 1
click($x1,$y3)
After_click 1
click($x2,$y3)
After_click 1
click($x3,$y3)
After_click 1
click($x4,$y3)
After_click 1
click($x1,$y4)
After_click 1
click($x2,$y4)
After_click 1
click($x3,$y4)
After_click 1
click($x4,$y4)
After_click 1
click($x1,$y5)
After_click 1
click($x2,$y5)
After_click 1
click($x3,$y5)
After_click 1
click($x4,$y5)
After_click 1
end
if rand(100) < 0
swipe_horizontal 40
waitsecond(2)
end
if rand(100) < 0
click($x1,$y1)
After_click 1
click($x2,$y1)
After_click 1
click($x3,$y1)
After_click 1
click($x4,$y1)
After_click 1
click($x1,$y2)
After_click 1
click($x2,$y2)
After_click 1
click($x3,$y2)
After_click 1
click($x4,$y2)
After_click 1
click($x1,$y3)
After_click 1
click($x2,$y3)
After_click 1
click($x3,$y3)
After_click 1
click($x4,$y3)
After_click 1
click($x1,$y4)
After_click 1
click($x2,$y4)
After_click 1
click($x3,$y4)
After_click 1
click($x4,$y4)
After_click 1
click($x1,$y5)
After_click 1
click($x2,$y5)
After_click 1
click($x3,$y5)
After_click 1
click($x4,$y5)
After_click 1
end
if rand(100) < 0
$actionParamInput = "none"
idle_wait 1
waitsecond(2)
end
$actionParamInput = "none"
Menu_nav 1
sendStatus("Done::mainLoop::Loop::#{index}")
writelog("Finish::Loop::#{$curMainLoopNum}")
saveLogFileToGist if $saveLogToGist
index += 1
end
$engineStatus = "Idle"
resetStatus
sendStatus("Finish::mainLoop::END")
end
def self.FirstPage(loopTime)
tcase = TestCase.new("FirstPage")
tcase << TestAction.new(:pressHome_39) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:pressHome_39_1_1) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_38_1) do
click(172,1716)
waitsecond(15)
pressHome
waitsecond(2)
click(424,1716)
waitsecond(15)
pressHome
waitsecond(2)
click(736,1716)
waitsecond(15)
pressHome
waitsecond(2)
click(964,1716)
waitsecond(15)
pressHome
waitsecond(2)
click(1276,1716)
waitsecond(15)
pressHome
waitsecond(2)
waitsecond(2)
end
tcase.run(loopTime)
end
def self.OtherPage(loopTime)
tcase = TestCase.new("OtherPage")
tcase << TestAction.new(:swipeRight_2) do
swipe_horizontal 50
end
tcase << TestAction.new(:scriptAction_3) do
takeScreenShot
end
tcase << TestAction.new(:scriptAction_38_1) do
click(112,132)
waitsecond(15)
pressHome
waitsecond(2)
click(274,132)
waitsecond(15)
pressHome
waitsecond(2)
click(436,132)
waitsecond(15)
pressHome
waitsecond(2)
click(608,132)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_FolderIconName_21) do
$ruiObj = RUIObject.new.with('objectid', 480794151).with('selfid', 449657317).with('textdescid', 1187159180).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'com.lge.launcher3:id/folder_icon_name')
.with('text', 'LG')
$ruiObj.isNotExist
ifFailJumpTo(:pressHome_14)
end
tcase << TestAction.new(:scriptAction_38_1_1) do
click(112,320)
waitsecond(15)
pressHome
waitsecond(2)
click(274,320)
waitsecond(15)
pressHome
waitsecond(2)
click(436,320)
waitsecond(15)
pressHome
waitsecond(2)
click(608,320)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_FolderIconName_21_1) do
$ruiObj = RUIObject.new.with('objectid', 480794151).with('selfid', 449657317).with('textdescid', 1187159180).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'com.lge.launcher3:id/folder_icon_name')
.with('text', 'LG')
$ruiObj.isNotExist
ifFailJumpTo(:pressHome_14)
end
tcase << TestAction.new(:scriptAction_38_1_1_1) do
click(112,508)
waitsecond(15)
pressHome
waitsecond(2)
click(274,508)
waitsecond(15)
pressHome
waitsecond(2)
click(436,508)
waitsecond(15)
pressHome
waitsecond(2)
click(608,508)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_FolderIconName_21_1_1) do
$ruiObj = RUIObject.new.with('objectid', 480794151).with('selfid', 449657317).with('textdescid', 1187159180).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'com.lge.launcher3:id/folder_icon_name')
.with('text', 'LG')
$ruiObj.isNotExist
ifFailJumpTo(:pressHome_14)
end
tcase << TestAction.new(:scriptAction_38_1_1_1_1) do
click(112,686)
waitsecond(15)
pressHome
waitsecond(2)
click(274,686)
waitsecond(15)
pressHome
waitsecond(2)
click(436,686)
waitsecond(15)
pressHome
waitsecond(2)
click(608,686)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_FolderIconName_21_1_1_1) do
$ruiObj = RUIObject.new.with('objectid', 480794151).with('selfid', 449657317).with('textdescid', 1187159180).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'com.lge.launcher3:id/folder_icon_name')
.with('text', 'LG')
$ruiObj.isNotExist
ifFailJumpTo(:pressHome_14)
end
tcase << TestAction.new(:scriptAction_38_1_1_1_1_1) do
click(112,874)
waitsecond(15)
pressHome
waitsecond(2)
click(274,874)
waitsecond(15)
pressHome
waitsecond(2)
click(436,874)
waitsecond(15)
pressHome
waitsecond(2)
click(608,874)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_FolderIconName_21_1_1_1_1) do
$ruiObj = RUIObject.new.with('objectid', 480794151).with('selfid', 449657317).with('textdescid', 1187159180).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'com.lge.launcher3:id/folder_icon_name')
.with('text', 'LG')
$ruiObj.isNotExist
ifFailJumpTo(:pressHome_14)
end
tcase << TestAction.new(:TextView_FolderIconName_21_1_1_1_1_1) do
$ruiObj = RUIObject.new.with('objectid', 480794151).with('selfid', 449657317).with('textdescid', 1187159180).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'com.lge.launcher3:id/folder_icon_name')
.with('text', 'LG')
$ruiObj.isExist
ifFailJumpTo(:swipeRight_2)
end
tcase << TestAction.new(:pressHome_14) do
pressHome
end
tcase.run(loopTime)
end
def self.OtherPage_ori(loopTime)
tcase = TestCase.new("OtherPage_ori")
tcase << TestAction.new(:swipeRight_2) do
swipe_horizontal 50
end
tcase << TestAction.new(:scriptAction_38_1) do
$checkGallery = 0
until $checkGallery === true
click(216,244)
waitsecond(2)
pressHome
waitsecond(1)
click(436,244)
waitsecond(2)
pressHome
waitsecond(1)
click(740,244)
waitsecond(2)
pressHome
waitsecond(1)
click(996,244)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,244)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
if $checkGallery === true
break
end
click(216,576)
waitsecond(2)
pressHome
waitsecond(1)
click(436,576)
waitsecond(2)
pressHome
waitsecond(1)
click(740,576)
waitsecond(2)
pressHome
waitsecond(1)
click(996,576)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,576)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
if $checkGallery === true
break
end
click(216,952)
waitsecond(2)
pressHome
waitsecond(1)
click(436,952)
waitsecond(2)
pressHome
waitsecond(1)
click(740,952)
waitsecond(2)
pressHome
waitsecond(1)
click(996,952)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,952)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
if $checkGallery === true
break
end
click(216,1324)
waitsecond(2)
pressHome
waitsecond(1)
click(436,1324)
waitsecond(2)
pressHome
waitsecond(1)
click(740,1324)
waitsecond(2)
pressHome
waitsecond(1)
click(996,1324)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,1324)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
if $checkGallery === true
break
end
click(216,1692)
waitsecond(2)
pressHome
waitsecond(1)
click(436,1692)
waitsecond(2)
pressHome
waitsecond(1)
click(740,1692)
waitsecond(2)
pressHome
waitsecond(1)
click(996,1692)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,1692)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
swipe_horizontal 50
end
end
tcase << TestAction.new(:TextView_Gallery_5_1) do
$ruiObj = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery')
$ruiObj.isNotExist
ifFailJumpTo(:pressHome_14)
end
tcase << TestAction.new(:scriptAction_38_1_1) do
$checkGallery = 0
until $checkGallery === true
click(216,244)
waitsecond(2)
pressHome
waitsecond(1)
click(436,244)
waitsecond(2)
pressHome
waitsecond(1)
click(740,244)
waitsecond(2)
pressHome
waitsecond(1)
click(996,244)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,244)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
if $checkGallery === true
break
end
click(216,576)
waitsecond(2)
pressHome
waitsecond(1)
click(436,576)
waitsecond(2)
pressHome
waitsecond(1)
click(740,576)
waitsecond(2)
pressHome
waitsecond(1)
click(996,576)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,576)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
if $checkGallery === true
break
end
click(216,952)
waitsecond(2)
pressHome
waitsecond(1)
click(436,952)
waitsecond(2)
pressHome
waitsecond(1)
click(740,952)
waitsecond(2)
pressHome
waitsecond(1)
click(996,952)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,952)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
if $checkGallery === true
break
end
click(216,1324)
waitsecond(2)
pressHome
waitsecond(1)
click(436,1324)
waitsecond(2)
pressHome
waitsecond(1)
click(740,1324)
waitsecond(2)
pressHome
waitsecond(1)
click(996,1324)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,1324)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
if $checkGallery === true
break
end
click(216,1692)
waitsecond(2)
pressHome
waitsecond(1)
click(436,1692)
waitsecond(2)
pressHome
waitsecond(1)
click(740,1692)
waitsecond(2)
pressHome
waitsecond(1)
click(996,1692)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,1692)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
swipe_horizontal 50
end
end
tcase << TestAction.new(:TextView_Gallery_5_1_1) do
$ruiObj = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery')
$ruiObj.isNotExist
ifFailJumpTo(:pressHome_14)
end
tcase << TestAction.new(:scriptAction_38_1_1_1) do
$checkGallery = 0
until $checkGallery === true
click(216,244)
waitsecond(2)
pressHome
waitsecond(1)
click(436,244)
waitsecond(2)
pressHome
waitsecond(1)
click(740,244)
waitsecond(2)
pressHome
waitsecond(1)
click(996,244)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,244)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
if $checkGallery === true
break
end
click(216,576)
waitsecond(2)
pressHome
waitsecond(1)
click(436,576)
waitsecond(2)
pressHome
waitsecond(1)
click(740,576)
waitsecond(2)
pressHome
waitsecond(1)
click(996,576)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,576)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
if $checkGallery === true
break
end
click(216,952)
waitsecond(2)
pressHome
waitsecond(1)
click(436,952)
waitsecond(2)
pressHome
waitsecond(1)
click(740,952)
waitsecond(2)
pressHome
waitsecond(1)
click(996,952)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,952)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
if $checkGallery === true
break
end
click(216,1324)
waitsecond(2)
pressHome
waitsecond(1)
click(436,1324)
waitsecond(2)
pressHome
waitsecond(1)
click(740,1324)
waitsecond(2)
pressHome
waitsecond(1)
click(996,1324)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,1324)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
if $checkGallery === true
break
end
click(216,1692)
waitsecond(2)
pressHome
waitsecond(1)
click(436,1692)
waitsecond(2)
pressHome
waitsecond(1)
click(740,1692)
waitsecond(2)
pressHome
waitsecond(1)
click(996,1692)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,1692)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
swipe_horizontal 50
end
end
tcase << TestAction.new(:TextView_Gallery_5_1_1_1) do
$ruiObj = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery')
$ruiObj.isNotExist
ifFailJumpTo(:pressHome_14)
end
tcase << TestAction.new(:scriptAction_38_1_1_1_1) do
$checkGallery = 0
until $checkGallery === true
click(216,244)
waitsecond(2)
pressHome
waitsecond(1)
click(436,244)
waitsecond(2)
pressHome
waitsecond(1)
click(740,244)
waitsecond(2)
pressHome
waitsecond(1)
click(996,244)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,244)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
if $checkGallery === true
break
end
click(216,576)
waitsecond(2)
pressHome
waitsecond(1)
click(436,576)
waitsecond(2)
pressHome
waitsecond(1)
click(740,576)
waitsecond(2)
pressHome
waitsecond(1)
click(996,576)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,576)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
if $checkGallery === true
break
end
click(216,952)
waitsecond(2)
pressHome
waitsecond(1)
click(436,952)
waitsecond(2)
pressHome
waitsecond(1)
click(740,952)
waitsecond(2)
pressHome
waitsecond(1)
click(996,952)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,952)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
if $checkGallery === true
break
end
click(216,1324)
waitsecond(2)
pressHome
waitsecond(1)
click(436,1324)
waitsecond(2)
pressHome
waitsecond(1)
click(740,1324)
waitsecond(2)
pressHome
waitsecond(1)
click(996,1324)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,1324)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
if $checkGallery === true
break
end
click(216,1692)
waitsecond(2)
pressHome
waitsecond(1)
click(436,1692)
waitsecond(2)
pressHome
waitsecond(1)
click(740,1692)
waitsecond(2)
pressHome
waitsecond(1)
click(996,1692)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,1692)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
swipe_horizontal 50
end
end
tcase << TestAction.new(:TextView_Gallery_5_1_1_1_1) do
$ruiObj = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery')
$ruiObj.isNotExist
ifFailJumpTo(:pressHome_14)
end
tcase << TestAction.new(:scriptAction_38_1_1_1_1_1) do
$checkGallery = 0
until $checkGallery === true
click(216,244)
waitsecond(2)
pressHome
waitsecond(1)
click(436,244)
waitsecond(2)
pressHome
waitsecond(1)
click(740,244)
waitsecond(2)
pressHome
waitsecond(1)
click(996,244)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,244)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
if $checkGallery === true
break
end
click(216,576)
waitsecond(2)
pressHome
waitsecond(1)
click(436,576)
waitsecond(2)
pressHome
waitsecond(1)
click(740,576)
waitsecond(2)
pressHome
waitsecond(1)
click(996,576)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,576)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
if $checkGallery === true
break
end
click(216,952)
waitsecond(2)
pressHome
waitsecond(1)
click(436,952)
waitsecond(2)
pressHome
waitsecond(1)
click(740,952)
waitsecond(2)
pressHome
waitsecond(1)
click(996,952)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,952)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
if $checkGallery === true
break
end
click(216,1324)
waitsecond(2)
pressHome
waitsecond(1)
click(436,1324)
waitsecond(2)
pressHome
waitsecond(1)
click(740,1324)
waitsecond(2)
pressHome
waitsecond(1)
click(996,1324)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,1324)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
if $checkGallery === true
break
end
click(216,1692)
waitsecond(2)
pressHome
waitsecond(1)
click(436,1692)
waitsecond(2)
pressHome
waitsecond(1)
click(740,1692)
waitsecond(2)
pressHome
waitsecond(1)
click(996,1692)
waitsecond(2)
pressHome
waitsecond(1)
click(1280,1692)
waitsecond(2)
pressHome
waitsecond(1)
$checkGallery = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery').exists?
swipe_horizontal 50
end
end
tcase << TestAction.new(:TextView_Gallery_5) do
$ruiObj = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery')
$ruiObj.isNotExist
ifFailJumpTo(:pressHome_14)
end
tcase << TestAction.new(:TextView_Gallery_5_1) do
$ruiObj = RUIObject.new.with('objectid', 70668614).with('selfid', -2112895374).with('textdescid', -1611398154).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('content-desc', 'Gallery')
.with('text', 'Gallery')
$ruiObj.isExist
ifFailJumpTo(:swipeRight_2)
end
tcase << TestAction.new(:pressHome_14) do
pressHome
end
tcase.run(loopTime)
end
def self.Page1(loopTime)
tcase = TestCase.new("Page1")
tcase << TestAction.new(:scriptAction_38_1) do
swipe_horizontal 50
takeScreenShot
waitsecond(1)
click(172,200)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
waitsecond(1)
click(424,200)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
waitsecond(1)
click(736,200)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
waitsecond(1)
click(964,200)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
waitsecond(1)
click(1276,200)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_38_1_1) do
swipe_horizontal 50
waitsecond(1)
click(172,624)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
waitsecond(1)
click(424,624)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
waitsecond(1)
click(736,624)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
waitsecond(1)
click(964,624)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
waitsecond(1)
click(1276,624)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_38_1_1_1) do
swipe_horizontal 50
waitsecond(1)
click(172,972)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
waitsecond(1)
click(424,972)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
waitsecond(1)
click(736,972)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
waitsecond(1)
click(964,972)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
waitsecond(1)
click(1276,972)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_38_1_1_1_1) do
swipe_horizontal 50
waitsecond(1)
click(172,1348)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
waitsecond(1)
click(424,1348)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
waitsecond(1)
click(736,1348)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
waitsecond(1)
click(964,1348)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
waitsecond(1)
click(1276,1348)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_38_1_1_1_1_1) do
swipe_horizontal 50
waitsecond(1)
click(172,1700)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
waitsecond(1)
click(424,1700)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
waitsecond(1)
click(736,1700)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
waitsecond(1)
click(964,1700)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
waitsecond(1)
click(1276,1700)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase.run(loopTime)
end
def self.Page2(loopTime)
tcase = TestCase.new("Page2")
tcase << TestAction.new(:scriptAction_38_1) do
swipe_horizontal 50
swipe_horizontal 50
takeScreenShot
waitsecond(1)
click(172,200)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(424,200)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(736,200)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(964,200)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(1276,200)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_38_1_1) do
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(172,624)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(424,624)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(736,624)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(964,624)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(1276,624)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_38_1_1_1) do
swipe_horizontal 50
swipe_horizontal 50
click(172,972)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
click(424,972)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
click(736,972)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
click(964,972)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
click(1276,972)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_38_1_1_1_1) do
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(172,1348)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(424,1348)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(736,1348)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(964,1348)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(1276,1348)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_38_1_1_1_1_1) do
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(172,1700)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(424,1700)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(736,1700)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(964,1700)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(1276,1700)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase.run(loopTime)
end
def self.Page3(loopTime)
tcase = TestCase.new("Page3")
tcase << TestAction.new(:scriptAction_38_1) do
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
takeScreenShot
waitsecond(1)
click(172,200)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(424,200)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(736,200)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(964,200)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(1276,200)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_38_1_1) do
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(172,624)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(424,624)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(736,624)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(964,624)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(1276,624)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_38_1_1_1) do
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(172,972)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(424,972)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(736,972)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(964,972)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(1276,972)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_38_1_1_1_1) do
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(172,1348)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(424,1348)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(736,1348)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(964,1348)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(1276,1348)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_38_1_1_1_1_1) do
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(172,1700)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(424,1700)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(736,1700)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(964,1700)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(1276,1700)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase.run(loopTime)
end
def self.Page4(loopTime)
tcase = TestCase.new("Page4")
tcase << TestAction.new(:scriptAction_38_1) do
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
takeScreenShot
waitsecond(1)
click(172,200)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(424,200)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(736,200)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(964,200)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(1276,200)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_38_1_1) do
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(172,624)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(424,624)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(736,624)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(964,624)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(1276,624)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_38_1_1_1) do
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(172,972)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(424,972)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(736,972)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(964,972)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(1276,972)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_38_1_1_1_1) do
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(172,1348)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(424,1348)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(736,1348)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(964,1348)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(1276,1348)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_38_1_1_1_1_1) do
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(172,1700)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(424,1700)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(736,1700)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(964,1700)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(1276,1700)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase.run(loopTime)
end
def self.Page5(loopTime)
tcase = TestCase.new("Page5")
tcase << TestAction.new(:scriptAction_38_1) do
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
takeScreenShot
waitsecond(1)
click(172,200)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(424,200)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(736,200)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(964,200)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(1276,200)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_38_1_1) do
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(172,624)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(424,624)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(736,624)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(964,624)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(1276,624)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_38_1_1_1) do
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(172,972)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(424,972)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(736,972)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(964,972)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(1276,972)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_38_1_1_1_1) do
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(172,1348)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(424,1348)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(736,1348)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(964,1348)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(1276,1348)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_38_1_1_1_1_1) do
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(172,1700)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(424,1700)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(736,1700)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(964,1700)
waitsecond(15)
pressHome
waitsecond(2)
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
waitsecond(1)
click(1276,1700)
waitsecond(15)
pressHome
waitsecond(2)
end
tcase.run(loopTime)
end
def self.Page_swipe(loopTime)
tcase = TestCase.new("Page_swipe")
tcase << TestAction.new(:scriptAction_1) do
case $page_num
when "2"
swipe_horizontal 50
when "3"
swipe_horizontal 50
swipe_horizontal 50
when "4"
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
when "5"
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
puts "5"
when "6"
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
when "7"
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
swipe_horizontal 50
else
swipe_horizontal 50
end
waitsecond(2)
end
tcase.run(loopTime)
end
def self.android_ExpHandler(loopTime)
tcase = TestCase.new("android_ExpHandler")
tcase << TestAction.new(:scriptAction_1) do
$err = "system popup detected::#{takeScreenShot}::screenshot saved"
$myTestResult = false
puts $err
logcat($err)
writelog($err)
uiObj("Button").click if uiObj("Button").exists
waitsecond(1)
end
tcase.run(loopTime)
end
def self.idle_wait(loopTime)
tcase = TestCase.new("idle_wait")
tcase << TestAction.new(:wait32second_1) do
waitsecond(300)
end
tcase << TestAction.new(:wait32second_1_1) do
waitsecond(300)
end
tcase << TestAction.new(:wait32second_1_1_1) do
waitsecond(300)
end
tcase << TestAction.new(:wait32second_1_1_1_1) do
waitsecond(300)
end
tcase << TestAction.new(:wait32second_1_1_1_1_1) do
waitsecond(300)
end
tcase << TestAction.new(:wait32second_1_1_1_1_1_1) do
waitsecond(300)
end
tcase.run(loopTime)
end
def self.startTest(loopTime)
tcase = TestCase.new("startTest")
tcase << TestAction.new(:blankaction) do
waitsecond(0)
end
tcase.run(loopTime)
end
def self.Menu_nav(loopTime)
tcase = TestCase.new("Menu_nav")
tcase << TestAction.new(:scriptAction_2) do
puts "MenuNavi db list size: #{db('MenuNavi').length}"
for i in 0..db('MenuNavi').length-1
gotoApp(db('MenuNavi')[i])
waitsecond(10)
pressHome
end
end
tcase.run(loopTime)
end
def self.exception_handler
puts "Module Exception Hanlder..."
if ($lastPackageName == "android")
android_ExpHandler(1)
end
end
def self.run(loop)
mainLoop loop
end
end
$exceptionPackageNameList = []
$exceptionPackageNameList_exclude = []
$exceptionPackageNameList << "android"
def exception_handler
DIVA_menu_nav.exception_handler
end
$curProjectLogFile = $useLastLogFile
$curProjectLogFile = "DIVA_menu_nav_#{getTimeStamp}.log" if $useLastLogFile.nil?
$useLastLogFile = nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment