Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- loadTestDB
- module Hplus_videoEditing
- def self.Delete_video(loopTime)
- tcase = TestCase.new("Delete_video")
- tcase << TestAction.new(:pressHome_1) do
- pressHome
- waitsecond(2)
- end
- tcase << TestAction.new(:TextView_Gallery_2) do
- $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', -2112895374).with('textdescid', -740073602).with('uniqueparentid', 0)
- .with('uitreeindex', 26)
- .with('classname', 'TextView')
- .with('content-desc', 'Gallery')
- .with('text', 'Gallery')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:TextView_ActionDelete_3) do
- $ruiObj = RUIObject.new.with('objectid', -1071203962).with('selfid', -340367424).with('textdescid', -1190220699).with('uniqueparentid', 0)
- .with('uitreeindex', 4)
- .with('classname', 'TextView')
- .with('resource-id', 'com.android.gallery3d:id/action_delete')
- .with('content-desc', 'Delete')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:Button_Button1_4) do
- $ruiObj = RUIObject.new.with('objectid', 95721616).with('selfid', 982364851).with('textdescid', -1653186491).with('uniqueparentid', 0)
- .with('uitreeindex', 2)
- .with('classname', 'Button')
- .with('resource-id', 'android:id/button1')
- .with('text', 'DELETE')
- $ruiObj.click
- waitsecond(2)
- end
- tcase.run(loopTime)
- end
- def self.Finish(loopTime)
- tcase = TestCase.new("Finish")
- tcase << TestAction.new(:pressBack_1) do
- pressBack
- waitsecond(2)
- end
- tcase << TestAction.new(:pressBack_1_1) do
- pressBack
- waitsecond(2)
- end
- tcase.run(loopTime)
- end
- def self.Frame_Speed_1(loopTime)
- tcase = TestCase.new("Frame_Speed_1")
- tcase << TestAction.new(:TextView_Edit_2) do
- $ruiObj = RUIObject.new.with('objectid', -428282449).with('selfid', 1160143396).with('textdescid', -197620933).with('uniqueparentid', 0)
- .with('uitreeindex', 12)
- .with('classname', 'TextView')
- .with('content-desc', 'Edit')
- $ruiObj.click
- waitsecond(8)
- end
- tcase << TestAction.new(:View_PreviewSurface_2_1) do
- $ruiObj = RUIObject.new.with('objectid', -936430728).with('selfid', -549442069).with('textdescid', 1035418536).with('uniqueparentid', 0)
- .with('uitreeindex', 33)
- .with('classname', 'android.view.View')
- .with('resource-id', 'com.lge.videostudio:id/preview_surface')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:drag_280_2020_4) do
- $UIDev.drag(280,2020,450,2020,20)
- waitsecond(2)
- end
- tcase << TestAction.new(:TextView_x12_6_1) do
- $ruiObj = RUIObject.new.with('objectid', 225520138).with('selfid', -535057657).with('textdescid', 1875101437).with('uniqueparentid', 0)
- .with('uitreeindex', 12)
- .with('classname', 'TextView')
- .with('text', 'x12')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:drag_1152_2024_6) do
- $UIDev.drag(1152,2024,952,2024,20)
- waitsecond(2)
- end
- tcase << TestAction.new(:TextView_x2_8_1) do
- $ruiObj = RUIObject.new.with('objectid', 225520138).with('selfid', 1091118732).with('textdescid', 1030318480).with('uniqueparentid', 0)
- .with('uitreeindex', 16)
- .with('classname', 'TextView')
- .with('text', 'x2')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:ImageButton_TrimAreaPlayPause_8) do
- $ruiObj = RUIObject.new.with('objectid', -1568366829).with('selfid', 571059935).with('textdescid', -50611199).with('uniqueparentid', 0)
- .with('uitreeindex', 30)
- .with('classname', 'ImageButton')
- .with('resource-id', 'com.lge.videostudio:id/trim_area_play_pause')
- .with('content-desc', 'Play')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:wait32second_9) do
- waitsecond(102)
- end
- tcase << TestAction.new(:Button_TrimAreaSave_10) do
- $ruiObj = RUIObject.new.with('objectid', -2139312908).with('selfid', 893316343).with('textdescid', -1979207657).with('uniqueparentid', 0)
- .with('uitreeindex', 32)
- .with('classname', 'Button')
- .with('resource-id', 'com.lge.videostudio:id/trim_area_save')
- .with('text', 'SAVE')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:wait32second_11) do
- waitsecond(270)
- end
- tcase << TestAction.new(:TextView_SizeSlash_5) do
- $ruiObj = RUIObject.new.with('objectid', -896702750).with('selfid', -1833838425).with('textdescid', -2027981442).with('uniqueparentid', 0)
- .with('uitreeindex', 1)
- .with('classname', 'TextView')
- .with('resource-id', 'com.lge.videostudio:id/size_slash')
- .with('text', '')
- $ruiObj.click
- 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
- $actionParamInput = "none"
- Delete_video 1
- waitsecond(2)
- $actionParamInput = "none"
- Recoding_Video 1
- waitsecond(2)
- $actionParamInput = "none"
- Starting_Editing_Video 1
- waitsecond(2)
- $actionParamInput = "none"
- Frame_Speed 1
- waitsecond(2)
- $actionParamInput = "none"
- Frame_Speed_1 1
- waitsecond(2)
- $actionParamInput = "none"
- Finish 1
- waitsecond(2)
- 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.Trim_frame(loopTime)
- tcase = TestCase.new("Trim_frame")
- tcase.run(loopTime)
- end
- def self.startTest(loopTime)
- tcase = TestCase.new("startTest")
- tcase.run(loopTime)
- end
- def self.Recoding_Video(loopTime)
- tcase = TestCase.new("Recoding_Video")
- tcase << TestAction.new(:pressHome_1) do
- pressHome
- waitsecond(2)
- end
- tcase << TestAction.new(:TextView_Camera_2) do
- $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', -1103134098).with('textdescid', 1803325250).with('uniqueparentid', 0)
- .with('uitreeindex', 25)
- .with('classname', 'TextView')
- .with('content-desc', 'Camera')
- .with('text', 'Camera')
- $ruiObj.click
- waitsecond(4)
- end
- tcase << TestAction.new(:Button_OkButton_2) do
- $ruiObj = RUIObject.new.with('objectid', -658747592).with('selfid', -286954065).with('textdescid', 333963238).with('uniqueparentid', 0)
- .with('uitreeindex', 18)
- .with('classname', 'Button')
- .with('resource-id', 'com.lge.camera:id/ok_button')
- .with('text', 'TURN ON')
- $ruiObj.click
- waitsecond(4)
- end
- tcase << TestAction.new(:ImageButton_ShutterTopComp_3) do
- $ruiObj = RUIObject.new.with('objectid', -1272519145).with('selfid', -1818636331).with('textdescid', -1380226806).with('uniqueparentid', 0)
- .with('uitreeindex', 11)
- .with('classname', 'ImageButton')
- .with('resource-id', 'com.lge.camera:id/shutter_top_comp')
- .with('content-desc', 'Start recording')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:wait32second_4) do
- waitsecond(40)
- end
- tcase << TestAction.new(:ImageButton_ShutterTopComp_5) do
- $ruiObj = RUIObject.new.with('objectid', -1272519145).with('selfid', -1930433243).with('textdescid', -1819100772).with('uniqueparentid', 0)
- .with('uitreeindex', 10)
- .with('classname', 'ImageButton')
- .with('resource-id', 'com.lge.camera:id/shutter_top_comp')
- .with('content-desc', 'Stop recording')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:ImageButton_BackButton_7) do
- $ruiObj = RUIObject.new.with('objectid', -1549616416).with('selfid', -767978611).with('textdescid', -793468608).with('uniqueparentid', 0)
- .with('uitreeindex', 16)
- .with('classname', 'ImageButton')
- .with('resource-id', 'com.lge.camera:id/back_button')
- $ruiObj.click
- waitsecond(2)
- end
- tcase.run(loopTime)
- end
- def self.Starting_Editing_Video(loopTime)
- tcase = TestCase.new("Starting_Editing_Video")
- tcase << TestAction.new(:pressHome_1) do
- pressHome
- waitsecond(2)
- end
- tcase << TestAction.new(:TextView_Gallery_2) do
- $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', -2112895374).with('textdescid', -740073602).with('uniqueparentid', 0)
- .with('uitreeindex', 25)
- .with('classname', 'TextView')
- .with('content-desc', 'Gallery')
- .with('text', 'Gallery')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:ImageButton_Open_3) do
- $ruiObj = RUIObject.new.with('objectid', -1596683477).with('selfid', 1589392844).with('textdescid', 426502620).with('uniqueparentid', 0)
- .with('uitreeindex', 1)
- .with('classname', 'ImageButton')
- .with('content-desc', 'Open navigation drawer')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:CheckedTextView_DrawerItem_4) do
- $ruiObj = RUIObject.new.with('objectid', -401550358).with('selfid', 229733217).with('textdescid', 1081503090).with('uniqueparentid', 0).with('classresourceid', 396870609)
- .with('uitreeindex', 5)
- .with('classname', 'CheckedTextView')
- .with('resource-id', 'com.android.gallery3d:id/drawer_item')
- .with('text', 'Videos')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:clickXY_264_380_1) do
- click(264,380)
- waitsecond(2)
- end
- tcase << TestAction.new(:clickXY_152_548_4) do
- click(152,548)
- waitsecond(4)
- end
- tcase << TestAction.new(:TextView_ResolverText_40) do
- $ruiObj = RUIObject.new.with('objectid', 1736845148).with('selfid', 1334281818).with('textdescid', 234547305).with('uniqueparentid', 0).with('classresourceid', -472389065)
- .with('uitreeindex', 2)
- .with('classname', 'TextView')
- .with('resource-id', 'com.lge:id/resolver_text')
- .with('text', 'Video')
- $ruiObj.select('Similiar').click
- waitsecond(4)
- end
- tcase << TestAction.new(:Button_AllowButton_63) do
- $ruiObj = RUIObject.new.with('objectid', -1049422851).with('selfid', -808516471).with('textdescid', -374437087).with('uniqueparentid', 0).with('classresourceid', 771022871)
- .with('uitreeindex', 8)
- .with('classname', 'Button')
- .with('resource-id', 'com.lge:id/allow_button')
- .with('text', 'OK')
- $ruiObj.select('Similiar').click
- waitsecond(4)
- end
- tcase << TestAction.new(:Button_PermissionAllowButton_8) do
- $ruiObj = RUIObject.new.with('objectid', -886457929).with('selfid', 1443382411).with('textdescid', 270556320).with('uniqueparentid', 0)
- .with('uitreeindex', 3)
- .with('classname', 'Button')
- .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
- .with('text', 'ALLOW')
- $ruiObj.select('Similiar').click
- waitsecond(4)
- end
- tcase << TestAction.new(:clickXY_1112_508_1_1) do
- click(1112,508)
- waitsecond(2)
- end
- tcase << TestAction.new(:TextView_Edit_2) do
- $ruiObj = RUIObject.new.with('objectid', -428282449).with('selfid', 1160143396).with('textdescid', -197620933).with('uniqueparentid', 0)
- .with('uitreeindex', 12)
- .with('pretext', '20160621134206')
- .with('classname', 'TextView')
- .with('content-desc', 'Edit')
- $ruiObj.click
- waitsecond(8)
- end
- tcase << TestAction.new(:Button_PermissionAllowButton_10) do
- $ruiObj = RUIObject.new.with('objectid', -886457929).with('selfid', 1443382411).with('textdescid', 270556320).with('uniqueparentid', 0)
- .with('uitreeindex', 3)
- .with('classname', 'Button')
- .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
- .with('text', 'ALLOW')
- $ruiObj.click
- waitsecond(8)
- end
- tcase.run(loopTime)
- end
- def self.Frame_Speed(loopTime)
- tcase = TestCase.new("Frame_Speed")
- tcase << TestAction.new(:View_PreviewSurface_2) do
- $ruiObj = RUIObject.new.with('objectid', -936430728).with('selfid', -549442069).with('textdescid', 1035418536).with('uniqueparentid', 0)
- .with('uitreeindex', 33)
- .with('classname', 'android.view.View')
- .with('resource-id', 'com.lge.videostudio:id/preview_surface')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:drag_280_2020_4) do
- $UIDev.drag(280,2020,450,2020,20)
- waitsecond(2)
- end
- tcase << TestAction.new(:TextView_x14_5) do
- $ruiObj = RUIObject.new.with('objectid', 225520138).with('selfid', -535057655).with('textdescid', 1875101499).with('uniqueparentid', 0)
- .with('uitreeindex', 10)
- .with('classname', 'TextView')
- .with('text', 'x14')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:drag_1152_2024_6) do
- $UIDev.drag(1152,2024,952,2024,20)
- waitsecond(2)
- end
- tcase << TestAction.new(:TextView_x14_7) do
- $ruiObj = RUIObject.new.with('objectid', 225520138).with('selfid', -535057655).with('textdescid', 1875101499).with('uniqueparentid', 0)
- .with('uitreeindex', 10)
- .with('classname', 'TextView')
- .with('text', 'x14')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:ImageButton_TrimAreaPlayPause_8) do
- $ruiObj = RUIObject.new.with('objectid', -1568366829).with('selfid', 571059935).with('textdescid', -50611199).with('uniqueparentid', 0)
- .with('uitreeindex', 30)
- .with('classname', 'ImageButton')
- .with('resource-id', 'com.lge.videostudio:id/trim_area_play_pause')
- .with('content-desc', 'Play')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:wait32second_9) do
- waitsecond(12)
- end
- tcase << TestAction.new(:Button_TrimAreaSave_10) do
- $ruiObj = RUIObject.new.with('objectid', -2139312908).with('selfid', 893316343).with('textdescid', -1979207657).with('uniqueparentid', 0)
- .with('uitreeindex', 32)
- .with('classname', 'Button')
- .with('resource-id', 'com.lge.videostudio:id/trim_area_save')
- .with('text', 'SAVE')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:wait32second_11) do
- waitsecond(600)
- end
- tcase.run(loopTime)
- end
- def self.exception_handler
- puts "Module Exception Hanlder..."
- end
- def self.run(loop)
- mainLoop loop
- end
- end
- $exceptionPackageNameList = []
- $exceptionPackageNameList_exclude = []
- def exception_handler
- Hplus_videoEditing.exception_handler
- end
- $curProjectLogFile = $useLastLogFile
- $curProjectLogFile = "Hplus_videoEditing_#{getTimeStamp}.log" if $useLastLogFile.nil?
- $useLastLogFile = nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement