Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- loadTestDB
- module H1_Menu_nav
- 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)
- $actionParamInput = "none"
- FirstPage 1
- waitsecond(2)
- $actionParamInput = "none"
- OtherPage 1
- waitsecond(2)
- if rand(100) < 0
- $actionParamInput = "none"
- Menu_nav 1
- waitsecond(2)
- end
- 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.Menu_nav(loopTime)
- tcase = TestCase.new("Menu_nav")
- tcase << TestAction.new(:scriptAction_7) do
- $appCounter = 0;
- end
- tcase << TestAction.new(:scriptAction_2) do
- until $appCounter > 100
- $appCounter += 1
- gotoApp(db('MenuNavi')[$appCounter-1])
- waitsecond(2)
- pressHome
- end
- 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.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.startTest(loopTime)
- tcase = TestCase.new("startTest")
- tcase.run(loopTime)
- 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(216,1692)
- waitsecond(15)
- pressHome
- waitsecond(2)
- click(436,1692)
- waitsecond(15)
- pressHome
- waitsecond(2)
- click(740,1692)
- waitsecond(15)
- pressHome
- waitsecond(2)
- click(1280,1692)
- 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(216,244)
- waitsecond(15)
- pressHome
- waitsecond(2)
- click(436,244)
- waitsecond(15)
- pressHome
- waitsecond(2)
- click(740,244)
- waitsecond(15)
- pressHome
- waitsecond(2)
- click(1280,244)
- waitsecond(15)
- pressHome
- waitsecond(2)
- end
- tcase << TestAction.new(:TextView_Play_2) do
- $ruiObj = RUIObject.new.with('objectid', 70668614).with('selfid', 809278702).with('textdescid', 957369146).with('uniqueparentid', 0)
- .with('uitreeindex', 11)
- .with('classname', 'TextView')
- .with('content-desc', 'Play Store')
- .with('text', 'Play Store')
- $ruiObj.isNotExist
- ifFailJumpTo(:pressHome_14)
- end
- tcase << TestAction.new(:scriptAction_38_1_1) do
- click(216,576)
- waitsecond(15)
- pressHome
- waitsecond(2)
- click(436,576)
- waitsecond(15)
- pressHome
- waitsecond(2)
- click(740,576)
- waitsecond(15)
- pressHome
- waitsecond(2)
- click(1280,576)
- waitsecond(15)
- pressHome
- waitsecond(2)
- end
- tcase << TestAction.new(:TextView_Play_2_1) do
- $ruiObj = RUIObject.new.with('objectid', 70668614).with('selfid', 809278702).with('textdescid', 957369146).with('uniqueparentid', 0)
- .with('uitreeindex', 11)
- .with('classname', 'TextView')
- .with('content-desc', 'Play Store')
- .with('text', 'Play Store')
- $ruiObj.isNotExist
- ifFailJumpTo(:pressHome_14)
- end
- tcase << TestAction.new(:scriptAction_38_1_1_1) do
- click(216,952)
- waitsecond(15)
- pressHome
- waitsecond(2)
- click(436,952)
- waitsecond(15)
- pressHome
- waitsecond(2)
- click(740,952)
- waitsecond(15)
- pressHome
- waitsecond(2)
- click(1280,952)
- waitsecond(15)
- pressHome
- waitsecond(2)
- end
- tcase << TestAction.new(:TextView_Play_2_1_1) do
- $ruiObj = RUIObject.new.with('objectid', 70668614).with('selfid', 809278702).with('textdescid', 957369146).with('uniqueparentid', 0)
- .with('uitreeindex', 11)
- .with('classname', 'TextView')
- .with('content-desc', 'Play Store')
- .with('text', 'Play Store')
- $ruiObj.isNotExist
- ifFailJumpTo(:pressHome_14)
- end
- tcase << TestAction.new(:scriptAction_38_1_1_1_1) do
- click(216,1324)
- waitsecond(15)
- pressHome
- waitsecond(2)
- click(436,1324)
- waitsecond(15)
- pressHome
- waitsecond(2)
- click(740,1324)
- waitsecond(15)
- pressHome
- waitsecond(2)
- click(1280,1324)
- waitsecond(15)
- pressHome
- waitsecond(2)
- end
- tcase << TestAction.new(:TextView_Play_2_1_1_1) do
- $ruiObj = RUIObject.new.with('objectid', 70668614).with('selfid', 809278702).with('textdescid', 957369146).with('uniqueparentid', 0)
- .with('uitreeindex', 11)
- .with('classname', 'TextView')
- .with('content-desc', 'Play Store')
- .with('text', 'Play Store')
- $ruiObj.isNotExist
- ifFailJumpTo(:pressHome_14)
- end
- tcase << TestAction.new(:scriptAction_38_1_1_1_1_1) do
- click(216,1692)
- waitsecond(15)
- pressHome
- waitsecond(2)
- click(436,1692)
- waitsecond(15)
- pressHome
- waitsecond(2)
- click(740,1692)
- waitsecond(15)
- pressHome
- waitsecond(2)
- click(1280,1692)
- waitsecond(15)
- pressHome
- waitsecond(2)
- end
- tcase << TestAction.new(:TextView_Play_2_1_1_1_1) do
- $ruiObj = RUIObject.new.with('objectid', 70668614).with('selfid', 809278702).with('textdescid', 957369146).with('uniqueparentid', 0)
- .with('uitreeindex', 11)
- .with('classname', 'TextView')
- .with('content-desc', 'Play Store')
- .with('text', 'Play Store')
- $ruiObj.isNotExist
- ifFailJumpTo(:pressHome_14)
- end
- tcase << TestAction.new(:TextView_Play_2_1_1_1_1_1) do
- $ruiObj = RUIObject.new.with('objectid', 70668614).with('selfid', 809278702).with('textdescid', 957369146).with('uniqueparentid', 0)
- .with('uitreeindex', 11)
- .with('classname', 'TextView')
- .with('content-desc', 'Play Store')
- .with('text', 'Play Store')
- $ruiObj.isExist
- ifFailJumpTo(:swipeRight_2)
- end
- tcase << TestAction.new(:pressHome_14) do
- pressHome
- 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
- H1_Menu_nav.exception_handler
- end
- $curProjectLogFile = $useLastLogFile
- $curProjectLogFile = "H1_Menu_nav_#{getTimeStamp}.log" if $useLastLogFile.nil?
- $useLastLogFile = nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement