Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- loadTestDB
- module H1_TNTS_Concurrency
- def self.Browser(loopTime)
- tcase = TestCase.new("Browser")
- tcase << TestAction.new(:gotoApp_7) do
- gotoApp('Chrome')
- waitsecond(1)
- end
- tcase << TestAction.new(:scriptAction_2) do
- logStartTest("Browser")
- end
- tcase << TestAction.new(:clickXY_1096_204_2) do
- click(1096,204)
- waitsecond(1)
- end
- tcase << TestAction.new(:EditText_UrlBar_2) do
- $ruiObj = RUIObject.new.with('objectid', 882195433).with('selfid', 613381324).with('textdescid', 1578254679).with('uniqueparentid', 0)
- .with('uitreeindex', 215)
- .with('classname', 'EditText')
- .with('resource-id', 'com.android.chrome:id/url_bar')
- $ruiObj.inputtext('m.naver.com')
- waitsecond(1)
- end
- tcase << TestAction.new(:pressEnter_15) do
- pressEnter
- waitsecond(4)
- end
- tcase << TestAction.new(:clickXY_1112_204_2) do
- click(1112,204)
- waitsecond(2)
- end
- tcase << TestAction.new(:EditText_UrlBar_2_1) do
- $ruiObj = RUIObject.new.with('objectid', 882195433).with('selfid', 613381324).with('textdescid', 1578254679).with('uniqueparentid', 0)
- .with('uitreeindex', 215)
- .with('classname', 'EditText')
- .with('resource-id', 'com.android.chrome:id/url_bar')
- $ruiObj.inputtext('www.google.com')
- waitsecond(1)
- end
- tcase << TestAction.new(:pressEnter_17) do
- pressEnter
- waitsecond(4)
- end
- tcase << TestAction.new(:scriptAction_1_1) do
- $reload = RUIObject.new.with('objectid', -1298956826).with('selfid', 1403544531).with('textdescid', 1877548115).with('uniqueparentid', 0)
- .with('uitreeindex', 4)
- .with('classname', 'Button')
- .with('resource-id', 'reload-button')
- .with('content-desc', 'RELOAD').exists?
- $progressBar = RUIObject.new.with('objectid', 1158061653).with('selfid', 1366906829).with('textdescid', 1540172907).with('uniqueparentid', 0)
- .with('uitreeindex', 18)
- .with('classname', 'ImageView')
- .with('resource-id', 'com.android.chrome:id/progress').exists?
- if ($progressBar || $reload) == true
- $myTestResult = false
- else
- $myTestResult = true
- end
- if $myTestResult == false
- $myFailReason = "Page not loaded."
- end
- logStopTest("Browser")
- end
- tcase << TestAction.new(:pressBack_11) do
- pressBack
- end
- tcase << TestAction.new(:pressBack_12) do
- pressBack
- end
- tcase << TestAction.new(:pressHome_13) do
- pressHome
- end
- tcase.run(loopTime)
- end
- def self.Camera(loopTime)
- tcase = TestCase.new("Camera")
- tcase << TestAction.new(:gotoApp_1) do
- gotoApp('Camera')
- waitsecond(2)
- end
- tcase << TestAction.new(:scriptAction_2) do
- logStartTest("Camera")
- end
- tcase << TestAction.new(:Button_CancelButton_2) do
- $ruiObj = RUIObject.new.with('objectid', 1810541803).with('selfid', -1673499114).with('textdescid', -340525654).with('uniqueparentid', 0)
- .with('uitreeindex', 20)
- .with('classname', 'Button')
- .with('resource-id', 'com.lge.camera:id/cancel_button')
- .with('text', 'No')
- $ruiObj.click
- end
- tcase << TestAction.new(:ImageButton_QuickButtonMode_4) do
- $ruiObj = RUIObject.new.with('objectid', -1346945250).with('selfid', -244088842).with('textdescid', -393452279).with('uniqueparentid', 0)
- .with('uitreeindex', 5)
- .with('classname', 'ImageButton')
- .with('resource-id', 'com.lge.camera:id/quick_button_mode')
- .with('content-desc', 'Mode.')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:ImageButton_ModeMenuItemIcon_6) do
- $ruiObj = RUIObject.new.with('objectid', -314028000).with('selfid', -710823836).with('textdescid', -1144933376).with('uniqueparentid', 0)
- .with('uitreeindex', 17)
- .with('classname', 'ImageButton')
- .with('resource-id', 'com.lge.camera:id/mode_menu_item_icon')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:ImageButton_ShutterBottomComp_4) do
- $ruiObj = RUIObject.new.with('objectid', -216722415).with('selfid', -92772729).with('textdescid', 1720830782).with('uniqueparentid', 0)
- .with('uitreeindex', 5)
- .with('classname', 'ImageButton')
- .with('resource-id', 'com.lge.camera:id/shutter_bottom_comp')
- .with('content-desc', 'Shutter')
- $ruiObj.isExist
- waitsecond(1)
- end
- tcase << TestAction.new(:ImageButton_ShutterBottomComp_4_1) do
- $ruiObj = RUIObject.new.with('objectid', -216722415).with('selfid', -92772729).with('textdescid', 1720830782).with('uniqueparentid', 0)
- .with('uitreeindex', 5)
- .with('classname', 'ImageButton')
- .with('resource-id', 'com.lge.camera:id/shutter_bottom_comp')
- .with('content-desc', 'Shutter')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:scriptAction_2_1) do
- $myTestResult = checkLastExistResult
- if $myTestResult == false
- $myFailReason = "End button not found"
- end
- logStopTest("Camera")
- end
- tcase << TestAction.new(:pressBack_5) do
- pressBack
- end
- tcase << TestAction.new(:pressBack_6) do
- pressBack
- end
- tcase << TestAction.new(:pressHome_7) do
- pressHome
- end
- tcase.run(loopTime)
- end
- def self.Data(loopTime)
- tcase = TestCase.new("Data")
- tcase << TestAction.new(:scriptAction_2) do
- end
- tcase << TestAction.new(:gotoApp_2) do
- gotoApp('AndFTP')
- end
- tcase << TestAction.new(:home_check) do
- $ruiObj = RUIObject.new.with('objectid', 1579875351).with('selfid', -1965414104).with('textdescid', 1731495657).with('uniqueparentid', 0)
- .with('uitreeindex', 7)
- .with('classname', 'ImageView')
- .with('resource-id', 'lysesoft.andftp:id/cell_icon_image')
- $ruiObj.isNotExist
- ifFailJumpTo(:home_click)
- waitsecond(4)
- end
- tcase << TestAction.new(:ImageView_Home_9) do
- $ruiObj = RUIObject.new.with('objectid', -987150073).with('selfid', -1580646008).with('textdescid', -536881159).with('uniqueparentid', 0)
- .with('uitreeindex', 1)
- .with('classname', 'ImageView')
- .with('resource-id', 'android:id/home')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:home_check_again) do
- $ruiObj = RUIObject.new.with('objectid', 1579875351).with('selfid', -1965414104).with('textdescid', 1731495657).with('uniqueparentid', 0)
- .with('uitreeindex', 7)
- .with('classname', 'ImageView')
- .with('resource-id', 'lysesoft.andftp:id/cell_icon_image')
- $ruiObj.isExist
- ifFailJumpTo(:gotoApp_2)
- waitsecond(2)
- end
- tcase << TestAction.new(:home_click) do
- $ruiObj = RUIObject.new.with('objectid', 1579875351).with('selfid', -1965414104).with('textdescid', 1731495657).with('uniqueparentid', 0)
- .with('uitreeindex', 7)
- .with('classname', 'ImageView')
- .with('resource-id', 'lysesoft.andftp:id/cell_icon_image')
- $ruiObj.click
- waitsecond(8)
- end
- tcase << TestAction.new(:TextView_Device_4) do
- $ruiObj = RUIObject.new.with('objectid', -1040420566).with('selfid', -1121792188).with('textdescid', 1884807160).with('uniqueparentid', 0)
- .with('uitreeindex', 2)
- .with('classname', 'TextView')
- .with('content-desc', 'Device file browser')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:TextView_BrowserItemName_13) do
- $ruiObj = RUIObject.new.with('objectid', 607501065).with('selfid', 459470620).with('textdescid', -839577675).with('uniqueparentid', 0).with('classresourceid', -324157026)
- .with('uitreeindex', 18)
- .with('classname', 'TextView')
- .with('resource-id', 'lysesoft.andftp:id/browser_item_name')
- .with('text', '01 Concurrency')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:clickXY_388_616_10) do
- click(388,616)
- waitsecond(2)
- end
- tcase << TestAction.new(:TextView_Upload_2) do
- $ruiObj = RUIObject.new.with('objectid', -1040420566).with('selfid', -132299379).with('textdescid', 572528663).with('uniqueparentid', 0)
- .with('uitreeindex', 3)
- .with('classname', 'TextView')
- .with('content-desc', 'Upload')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:Button_Button1_8) do
- $ruiObj = RUIObject.new.with('objectid', 415387334).with('selfid', -1318451484).with('textdescid', 1038170474).with('uniqueparentid', 0)
- .with('uitreeindex', 5)
- .with('classname', 'Button')
- .with('resource-id', 'android:id/button1')
- .with('text', 'OK')
- $ruiObj.click
- waitsecond(4)
- end
- tcase << TestAction.new(:Button_Button1_2) do
- $ruiObj = RUIObject.new.with('objectid', 415387334).with('selfid', -1318451484).with('textdescid', 1038170474).with('uniqueparentid', 0)
- .with('uitreeindex', 7)
- .with('classname', 'Button')
- .with('resource-id', 'android:id/button1')
- .with('text', 'OK')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:pressHome_9) do
- pressHome
- end
- tcase << TestAction.new(:scriptAction_1) do
- logStopTest("Data")
- end
- tcase.run(loopTime)
- end
- def self.DataEnd(loopTime)
- tcase = TestCase.new("DataEnd")
- tcase << TestAction.new(:gotoApp_2_1) do
- gotoApp('AndFTP')
- end
- tcase << TestAction.new(:Button_ProgressCancel_2) do
- $ruiObj = RUIObject.new.with('objectid', -646559864).with('selfid', -1723240818).with('textdescid', 1120146478).with('uniqueparentid', 0)
- .with('uitreeindex', 5)
- .with('classname', 'Button')
- .with('resource-id', 'lysesoft.andftp:id/progress_cancel')
- .with('text', 'Cancel')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:Button_ProgressSelect_4) do
- $ruiObj = RUIObject.new.with('objectid', -184857078).with('selfid', 1303670098).with('textdescid', 1262548654).with('uniqueparentid', 0)
- .with('uitreeindex', 4)
- .with('classname', 'Button')
- .with('resource-id', 'lysesoft.andftp:id/progress_select')
- .with('text', 'OK')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:pressBack_3) do
- pressBack
- end
- tcase << TestAction.new(:pressBack_5) do
- pressBack
- end
- tcase << TestAction.new(:pressHome_9) do
- pressHome
- end
- tcase << TestAction.new(:scriptAction_1_1) do
- logStopTest("DataEnd")
- end
- tcase.run(loopTime)
- end
- def self.Emails(loopTime)
- tcase = TestCase.new("Emails")
- tcase << TestAction.new(:gotoApp_1) do
- gotoApp('Gmail')
- end
- tcase << TestAction.new(:scriptAction_2) do
- logStartTest("Emails")
- end
- tcase << TestAction.new(:ImageButton_ComposeButton_4) do
- $ruiObj = RUIObject.new.with('objectid', 2010391035).with('selfid', 1808564263).with('textdescid', -481574643).with('uniqueparentid', 0)
- .with('uitreeindex', 24)
- .with('pretext', 'Primary')
- .with('classname', 'ImageButton')
- .with('resource-id', 'com.google.android.gm:id/compose_button')
- .with('content-desc', 'Compose')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:MultiAutoCompleteTextView_To_2) do
- $ruiObj = RUIObject.new.with('objectid', 1412494739).with('selfid', -538836202).with('textdescid', -639413688).with('uniqueparentid', 0).with('classresourceid', 1488875515)
- .with('uitreeindex', 8)
- .with('classname', 'MultiAutoCompleteTextView')
- .with('resource-id', 'com.google.android.gm:id/to')
- .with('content-desc', 'To')
- $ruiObj.inputtext('dvgats1@yahoo.com')
- waitsecond(2)
- end
- tcase << TestAction.new(:pressEnter_2) do
- pressEnter
- waitsecond(2)
- end
- tcase << TestAction.new(:EditText_Subject_3) do
- $ruiObj = RUIObject.new.with('objectid', -1492734634).with('selfid', -477614756).with('textdescid', 969866634).with('uniqueparentid', 0).with('classresourceid', 927865352)
- .with('uitreeindex', 10)
- .with('classname', 'EditText')
- .with('resource-id', 'com.google.android.gm:id/subject')
- $ruiObj.inputtext('Concurrency Test')
- waitsecond(2)
- end
- tcase << TestAction.new(:EditText_Body_5) do
- $ruiObj = RUIObject.new.with('objectid', -472419783).with('selfid', 132829042).with('textdescid', -1760111353).with('uniqueparentid', 0).with('classresourceid', 52429382)
- .with('uitreeindex', 11)
- .with('classname', 'EditText')
- .with('resource-id', 'com.google.android.gm:id/body')
- $ruiObj.inputtext('This is concurrency tests sending email during call.')
- waitsecond(2)
- end
- tcase << TestAction.new(:TextView_Send_6) do
- $ruiObj = RUIObject.new.with('objectid', 1442003251).with('selfid', 2103341243).with('textdescid', -1481441995).with('uniqueparentid', 0)
- .with('uitreeindex', 3)
- .with('classname', 'TextView')
- .with('resource-id', 'com.google.android.gm:id/send')
- .with('content-desc', 'Send')
- $ruiObj.isExist
- waitsecond(2)
- end
- tcase << TestAction.new(:TextView_Send_6_1) do
- $ruiObj = RUIObject.new.with('objectid', 1442003251).with('selfid', 2103341243).with('textdescid', -1481441995).with('uniqueparentid', 0)
- .with('uitreeindex', 3)
- .with('classname', 'TextView')
- .with('resource-id', 'com.google.android.gm:id/send')
- .with('content-desc', 'Send')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:scriptAction_6) do
- logStopTest("Emails")
- end
- tcase << TestAction.new(:pressBack_7) do
- pressBack
- end
- tcase << TestAction.new(:pressBack_8) do
- pressBack
- end
- tcase << TestAction.new(:pressHome_9) do
- pressHome
- end
- tcase.run(loopTime)
- end
- def self.GPS(loopTime)
- tcase = TestCase.new("GPS")
- tcase << TestAction.new(:gotoApp_1) do
- gotoApp('Maps')
- waitsecond(2)
- end
- tcase << TestAction.new(:scriptAction_2) do
- logStartTest("GPS")
- end
- tcase << TestAction.new(:TextView_Accept_2) do
- $ruiObj = RUIObject.new.with('objectid', -2142217036).with('selfid', -411926495).with('textdescid', -336996923).with('uniqueparentid', 0).with('classresourceid', -938935918)
- .with('uitreeindex', 3)
- .with('classname', 'TextView')
- .with('text', 'Accept continue')
- $ruiObj.click
- noFailCheck
- waitsecond(2)
- end
- tcase << TestAction.new(:Button_Skip_3) do
- $ruiObj = RUIObject.new.with('objectid', 1318191317).with('selfid', 343772849).with('textdescid', -671073450).with('uniqueparentid', 0).with('classresourceid', 2001146706)
- .with('uitreeindex', 4)
- .with('classname', 'Button')
- .with('text', 'Skip')
- $ruiObj.click
- noFailCheck
- waitsecond(2)
- end
- tcase << TestAction.new(:ImageView_Clear_2) do
- $ruiObj = RUIObject.new.with('objectid', 1493645968).with('selfid', 59009363).with('textdescid', -602195619).with('uniqueparentid', 0)
- .with('uitreeindex', 10)
- .with('classname', 'ImageView')
- .with('content-desc', 'Clear')
- $ruiObj.click
- noFailCheck
- waitsecond(2)
- end
- tcase << TestAction.new(:clickXY_1092_228_4) do
- click(1092,228)
- waitsecond(2)
- end
- tcase << TestAction.new(:EditText_SearchOmniboxEditText_6) do
- $ruiObj = RUIObject.new.with('objectid', 1175672329).with('selfid', 1989833907).with('textdescid', 2086103863).with('uniqueparentid', 0)
- .with('uitreeindex', 14)
- .with('classname', 'EditText')
- .with('resource-id', 'com.google.android.apps.gmm:id/search_omnibox_edit_text')
- $ruiObj.inputtext('3225 N Harbor Dr')
- waitsecond(2)
- end
- tcase << TestAction.new(:pressEnter_2) do
- pressEnter
- waitsecond(2)
- end
- tcase << TestAction.new(:clickXY_1252_2024_4) do
- click(1252,2024)
- waitsecond(2)
- end
- tcase << TestAction.new(:clickXY_1264_2008_6) do
- click(1264,2008)
- waitsecond(2)
- end
- tcase << TestAction.new(:Button_Button1_2) do
- $ruiObj = RUIObject.new.with('objectid', -185981439).with('selfid', 2077687487).with('textdescid', 1763664120).with('uniqueparentid', 0)
- .with('uitreeindex', 6)
- .with('classname', 'Button')
- .with('resource-id', 'android:id/button1')
- .with('text', 'Yes')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:Button_Button1_8) do
- $ruiObj = RUIObject.new.with('objectid', -111119685).with('selfid', 924899888).with('textdescid', 2046338963).with('uniqueparentid', 0)
- .with('uitreeindex', 4)
- .with('classname', 'Button')
- .with('resource-id', 'android:id/button1')
- .with('text', 'Accept')
- $ruiObj.click
- noFailCheck
- waitsecond(2)
- end
- tcase << TestAction.new(:ImageView_Close_9) do
- $ruiObj = RUIObject.new.with('objectid', 500839813).with('selfid', 1990642820).with('textdescid', 903691479).with('uniqueparentid', 0)
- .with('uitreeindex', 0)
- .with('classname', 'ImageView')
- .with('content-desc', 'Close navigation')
- $ruiObj.click
- noFailCheck
- waitsecond(2)
- end
- tcase << TestAction.new(:scriptAction_4) do
- logStopTest("GPS")
- end
- tcase << TestAction.new(:pressBack_10) do
- pressBack
- end
- tcase << TestAction.new(:pressBack_11) do
- pressBack
- end
- tcase << TestAction.new(:pressHome_12) do
- pressHome
- end
- tcase.run(loopTime)
- end
- def self.MMS(loopTime)
- tcase = TestCase.new("MMS")
- tcase << TestAction.new(:gotoApp_1) do
- gotoApp('Messaging')
- waitsecond(1)
- end
- tcase << TestAction.new(:scriptAction_6) do
- logStartTest("MMS")
- end
- tcase << TestAction.new(:ImageView_Img1_2) do
- $ruiObj = RUIObject.new.with('objectid', 160312923).with('selfid', 468961841).with('textdescid', 339488965).with('uniqueparentid', 0)
- .with('uitreeindex', 5)
- .with('classname', 'ImageView')
- .with('resource-id', 'com.android.mms:id/img1')
- .with('content-desc', 'Compose button')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:ImageButton_Contacts_2) do
- $ruiObj = RUIObject.new.with('objectid', -2124182915).with('selfid', -358910880).with('textdescid', 1935590710).with('uniqueparentid', 0)
- .with('uitreeindex', 1)
- .with('classname', 'ImageButton')
- .with('content-desc', 'Contacts')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:MultiAutoCompleteTextView_2) do
- $ruiObj = RUIObject.new.with('objectid', 784817492).with('selfid', -1346021293).with('textdescid', -1440461492).with('uniqueparentid', 0).with('classresourceid', -1346021293)
- .with('uitreeindex', 0)
- .with('classname', 'MultiAutoCompleteTextView')
- $ruiObj.inputtext('A01')
- waitsecond(1)
- end
- tcase << TestAction.new(:clickXY_316_388_4) do
- click(316,388)
- waitsecond(1)
- end
- tcase << TestAction.new(:EditText_4) do
- $ruiObj = RUIObject.new.with('objectid', 188001303).with('selfid', 1666676343).with('textdescid', 1533073129).with('uniqueparentid', 0).with('classresourceid', 1666676343)
- .with('uitreeindex', 5)
- .with('classname', 'EditText')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:EditText_4_1) do
- $ruiObj = RUIObject.new.with('objectid', 188001303).with('selfid', 1666676343).with('textdescid', 1533073129).with('uniqueparentid', 0).with('classresourceid', 1666676343)
- .with('uitreeindex', 5)
- .with('classname', 'EditText')
- $ruiObj.inputtext('Testing "Concurrency tests"')
- waitsecond(1)
- end
- tcase << TestAction.new(:ImageButton_AttachbuttonRight_4) do
- $ruiObj = RUIObject.new.with('objectid', 874172794).with('selfid', -1211001229).with('textdescid', -704319221).with('uniqueparentid', 0)
- .with('uitreeindex', 13)
- .with('pretext', 'Nov 17 912 PM')
- .with('classname', 'ImageButton')
- .with('resource-id', 'com.android.mms:id/attachButton_right')
- .with('content-desc', 'Attach')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_Text1_3) do
- $ruiObj = RUIObject.new.with('objectid', -786651428).with('selfid', -1538867418).with('textdescid', 1602617353).with('uniqueparentid', 0).with('classresourceid', -1838901301)
- .with('uitreeindex', 2)
- .with('classname', 'TextView')
- .with('resource-id', 'com.android.mms:id/text1')
- .with('text', 'Image')
- $ruiObj.click
- waitsecond(4)
- end
- tcase << TestAction.new(:Button_PermissionAllowButton_2) do
- $ruiObj = RUIObject.new.with('objectid', 973397371).with('selfid', 1444367499).with('textdescid', -1740624804).with('uniqueparentid', 0)
- .with('uitreeindex', 3)
- .with('classname', 'Button')
- .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
- .with('text', 'Allow')
- $ruiObj.click
- end
- tcase << TestAction.new(:clickXY_224_664_6) do
- click(224,664)
- waitsecond(4)
- end
- tcase << TestAction.new(:Button_SendButton_7) do
- $ruiObj = RUIObject.new.with('objectid', -1077299784).with('selfid', -721945045).with('textdescid', 214167495).with('uniqueparentid', 0)
- .with('uitreeindex', 10)
- .with('classname', 'Button')
- .with('resource-id', 'com.android.mms:id/send_button')
- .with('text', 'Send
- MMS')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:scriptAction_8) do
- logStopTest("MMS")
- end
- tcase << TestAction.new(:pressBack_10) do
- pressBack
- end
- tcase << TestAction.new(:pressBack_11) do
- pressBack
- end
- tcase << TestAction.new(:pressHome_12) do
- pressHome
- end
- tcase.run(loopTime)
- end
- def self.Multimedia(loopTime)
- tcase = TestCase.new("Multimedia")
- tcase << TestAction.new(:gotoApp_1) do
- gotoApp('Gallery')
- waitsecond(1)
- end
- tcase << TestAction.new(:scriptAction_2) do
- logStartTest("Multimedia")
- end
- tcase << TestAction.new(:ImageButton_Open_1) do
- $ruiObj = RUIObject.new.with('objectid', 1547446343).with('selfid', 1589392844).with('textdescid', -1415314368).with('uniqueparentid', 0)
- .with('uitreeindex', 0)
- .with('classname', 'ImageButton')
- .with('content-desc', 'Open navigation drawer')
- $ruiObj.click
- noFailCheck
- waitsecond(1)
- end
- tcase << TestAction.new(:CheckedTextView_DrawerItem_2) do
- $ruiObj = RUIObject.new.with('objectid', -401550358).with('selfid', 229733217).with('textdescid', 1081503090).with('uniqueparentid', 0).with('classresourceid', 396870609)
- .with('uitreeindex', 4)
- .with('classname', 'CheckedTextView')
- .with('resource-id', 'com.android.gallery3d:id/drawer_item')
- .with('text', 'Videos')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:clickXY_492_388_6) do
- click(492,388)
- waitsecond(1)
- end
- tcase << TestAction.new(:clickXY_492_388_6_1) do
- click(492,388)
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_Alwaysusetext_5) do
- $ruiObj = RUIObject.new.with('objectid', -722377990).with('selfid', -1976941555).with('textdescid', -2025483539).with('uniqueparentid', 0).with('classresourceid', 1039916726)
- .with('uitreeindex', 6)
- .with('classname', 'TextView')
- .with('resource-id', 'com.lge:id/alwaysUseText')
- .with('text', 'Use as default app')
- $ruiObj.click
- end
- tcase << TestAction.new(:TextView_ResolverText_2) do
- $ruiObj = RUIObject.new.with('objectid', -686048727).with('selfid', 1334281818).with('textdescid', 2007893244).with('uniqueparentid', 0).with('classresourceid', -472389065)
- .with('uitreeindex', 2)
- .with('classname', 'TextView')
- .with('resource-id', 'com.lge:id/resolver_text')
- .with('text', 'Video')
- $ruiObj.click
- end
- tcase << TestAction.new(:Button_AllowButton_4) 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.click
- end
- tcase << TestAction.new(:Button_PermissionAllowButton_9) do
- $ruiObj = RUIObject.new.with('objectid', 973397371).with('selfid', 1444367499).with('textdescid', -1740624804).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(32)
- end
- tcase << TestAction.new(:scriptAction_4) do
- logStopTest("Multimedia")
- end
- tcase << TestAction.new(:pressBack_4) do
- pressBack
- end
- tcase << TestAction.new(:pressBack_5) do
- pressBack
- end
- tcase << TestAction.new(:pressHome_6) do
- pressHome
- end
- tcase.run(loopTime)
- end
- def self.SMS(loopTime)
- tcase = TestCase.new("SMS")
- tcase << TestAction.new(:gotoApp_1) do
- gotoApp('Messaging')
- end
- tcase << TestAction.new(:scriptAction_2) do
- logStartTest("SMS")
- end
- tcase << TestAction.new(:ImageView_Img1_2) do
- $ruiObj = RUIObject.new.with('objectid', 160312923).with('selfid', 468961841).with('textdescid', 339488965).with('uniqueparentid', 0)
- .with('uitreeindex', 6)
- .with('classname', 'ImageView')
- .with('resource-id', 'com.android.mms:id/img1')
- .with('content-desc', 'Compose button')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:MultiAutoCompleteTextView_3) do
- $ruiObj = RUIObject.new.with('objectid', 784817492).with('selfid', -1346021293).with('textdescid', -1440461492).with('uniqueparentid', 0).with('classresourceid', -1346021293)
- .with('uitreeindex', 0)
- .with('classname', 'MultiAutoCompleteTextView')
- $ruiObj.inputtext('A01 a01')
- waitsecond(1)
- end
- tcase << TestAction.new(:clickXY_232_380_5) do
- click(232,380)
- waitsecond(1)
- end
- tcase << TestAction.new(:EditText_4) do
- $ruiObj = RUIObject.new.with('objectid', 188001303).with('selfid', 1666676343).with('textdescid', 1533073129).with('uniqueparentid', 0).with('classresourceid', 1666676343)
- .with('uitreeindex', 10)
- .with('classname', 'EditText')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:EditText_Enter_8) do
- $ruiObj = RUIObject.new.with('objectid', -158768307).with('selfid', -454502120).with('textdescid', -842188788).with('uniqueparentid', 0).with('classresourceid', 1666676343)
- .with('uitreeindex', 10)
- .with('classname', 'EditText')
- .with('content-desc', 'Enter message')
- $ruiObj.inputtext('Testing "Concurrency tests"')
- noFailCheck
- waitsecond(1)
- end
- tcase << TestAction.new(:Button_SendButton_6) do
- $ruiObj = RUIObject.new.with('objectid', -1077299784).with('selfid', -817858366).with('textdescid', 231002384).with('uniqueparentid', 0)
- .with('uitreeindex', 13)
- .with('classname', 'Button')
- .with('resource-id', 'com.android.mms:id/send_button')
- .with('text', 'Send')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:scriptAction_2_1) do
- logStopTest("SMS")
- end
- tcase << TestAction.new(:pressBack_10) do
- pressBack
- end
- tcase << TestAction.new(:pressBack_11) do
- pressBack
- end
- tcase << TestAction.new(:pressHome_12) do
- pressHome
- end
- tcase.run(loopTime)
- end
- def self.Video(loopTime)
- tcase = TestCase.new("Video")
- tcase << TestAction.new(:gotoApp_1) do
- gotoApp('Camera')
- waitsecond(1)
- end
- tcase << TestAction.new(:scriptAction_2) do
- logStartTest("Video")
- end
- tcase << TestAction.new(:ImageButton_QuickButtonCleanView_2) do
- $ruiObj = RUIObject.new.with('objectid', 2094475324).with('selfid', -1659256094).with('textdescid', 1888606697).with('uniqueparentid', 0)
- .with('uitreeindex', 4)
- .with('classname', 'ImageButton')
- .with('resource-id', 'com.lge.camera:id/quick_button_clean_view')
- .with('content-desc', 'View')
- $ruiObj.click
- noFailCheck
- waitsecond(1)
- end
- tcase << TestAction.new(:ImageButton_QuickNormalImageView_3) do
- $ruiObj = RUIObject.new.with('objectid', -1828351537).with('selfid', -62449628).with('textdescid', -1345909955).with('uniqueparentid', 0)
- .with('uitreeindex', 6)
- .with('classname', 'ImageButton')
- .with('resource-id', 'com.lge.camera:id/quick_normal_image_view')
- .with('content-desc', 'Basic')
- $ruiObj.click
- noFailCheck
- waitsecond(1)
- end
- tcase << TestAction.new(:ImageButton_ShutterTopComp_2) do
- $ruiObj = RUIObject.new.with('objectid', -1799776401).with('selfid', -1818636331).with('textdescid', -839551902).with('uniqueparentid', 0)
- .with('uitreeindex', 8)
- .with('classname', 'ImageButton')
- .with('resource-id', 'com.lge.camera:id/shutter_top_comp')
- .with('content-desc', 'Start recording')
- $ruiObj.click
- noFailCheck
- waitsecond(4)
- end
- tcase << TestAction.new(:ImageButton_ShutterTopComp_4) do
- $ruiObj = RUIObject.new.with('objectid', -1799776401).with('selfid', -1930433243).with('textdescid', 415097668).with('uniqueparentid', 0)
- .with('uitreeindex', 4)
- .with('classname', 'ImageButton')
- .with('resource-id', 'com.lge.camera:id/shutter_top_comp')
- .with('content-desc', 'Stop recording')
- $ruiObj.click
- noFailCheck
- waitsecond(1)
- end
- tcase << TestAction.new(:scriptAction_2_1) do
- logStopTest("Video")
- end
- tcase << TestAction.new(:pressBack_5) do
- pressBack
- end
- tcase << TestAction.new(:pressBack_6) do
- pressBack
- end
- tcase << TestAction.new(:pressHome_7) do
- pressHome
- end
- tcase.run(loopTime)
- end
- def self.Voice(loopTime)
- tcase = TestCase.new("Voice")
- tcase << TestAction.new(:pressHome_1) do
- pressHome
- end
- tcase << TestAction.new(:scriptAction_2) do
- logStartTest("Voice")
- end
- tcase << TestAction.new(:scriptAction_4) do
- UiDevice.getInstance.openNotification()
- waitsecond(1)
- end
- tcase << TestAction.new(:clickXY_1080_632_2) do
- click(1080,632)
- waitsecond(1)
- end
- tcase << TestAction.new(:gotoApp_2) do
- gotoApp('Phone')
- waitsecond(4)
- end
- tcase << TestAction.new(:Button_Endbutton_9) do
- $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
- .with('uitreeindex', 8)
- .with('classname', 'Button')
- .with('resource-id', 'com.android.incallui:id/endButton')
- .with('text', 'End')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_Tabtext_2) do
- $ruiObj = RUIObject.new.with('objectid', -66640566).with('selfid', 566119687).with('textdescid', 1718553658).with('uniqueparentid', 0)
- .with('uitreeindex', 2)
- .with('classname', 'TextView')
- .with('resource-id', 'com.android.contacts:id/tabText')
- .with('text', 'Dial')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:ImageButton_Btndelete_2) do
- $ruiObj = RUIObject.new.with('objectid', 1208458233).with('selfid', 194799554).with('textdescid', -91453704).with('uniqueparentid', 0)
- .with('uitreeindex', 31)
- .with('classname', 'ImageButton')
- .with('resource-id', 'com.android.contacts:id/btnDelete')
- .with('content-desc', 'Backspace')
- $ruiObj.longClick
- waitsecond(1)
- end
- tcase << TestAction.new(:EditText_Digits_2) do
- $ruiObj = RUIObject.new.with('objectid', 1211786433).with('selfid', -1326421482).with('textdescid', -1089326209).with('uniqueparentid', 0)
- .with('uitreeindex', 8)
- .with('classname', 'EditText')
- .with('resource-id', 'com.android.contacts:id/digits')
- $ruiObj.inputtext('18003310500')
- waitsecond(1)
- end
- tcase << TestAction.new(:ImageButton_Btnlogscall_7) do
- $ruiObj = RUIObject.new.with('objectid', -1934426254).with('selfid', -2053967649).with('textdescid', -911487124).with('uniqueparentid', 0)
- .with('uitreeindex', 25)
- .with('pretext', '2')
- .with('classname', 'ImageButton')
- .with('resource-id', 'com.android.contacts:id/btnLogsCall')
- .with('content-desc', 'Call')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:scriptAction_2_1) do
- logStopTest("Voice")
- end
- tcase.run(loopTime)
- end
- def self.VoiceRecord(loopTime)
- tcase = TestCase.new("VoiceRecord")
- tcase << TestAction.new(:gotoApp_1) do
- gotoApp('Tools')
- end
- tcase << TestAction.new(:scriptAction_2_1) do
- logStartTest("Voice")
- end
- tcase << TestAction.new(:TextView_Voice_2) do
- $ruiObj = RUIObject.new.with('objectid', -665293804).with('selfid', -1818622386).with('textdescid', -1786248436).with('uniqueparentid', 0)
- .with('uitreeindex', 4)
- .with('classname', 'TextView')
- .with('content-desc', 'Voice Recorder')
- .with('text', 'Voice Recorder')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:Button_ButtonAccept_4) do
- $ruiObj = RUIObject.new.with('objectid', -1893332536).with('selfid', -555982152).with('textdescid', 1605427616).with('uniqueparentid', 0)
- .with('uitreeindex', 8)
- .with('classname', 'Button')
- .with('resource-id', 'com.lge:id/button_accept')
- .with('text', 'Accept')
- $ruiObj.click
- end
- tcase << TestAction.new(:Button_Recordbutton_5) do
- $ruiObj = RUIObject.new.with('objectid', 1732501589).with('selfid', 570253989).with('textdescid', -801139812).with('uniqueparentid', 0)
- .with('uitreeindex', 15)
- .with('classname', 'Button')
- .with('resource-id', 'com.lge.voicerecorder:id/recordButton')
- .with('content-desc', 'Record')
- $ruiObj.click
- end
- tcase << TestAction.new(:wait12second_2) do
- waitsecond(12)
- end
- tcase << TestAction.new(:ImageView_Stopimage_10) do
- $ruiObj = RUIObject.new.with('objectid', 1366997146).with('selfid', 670796736).with('textdescid', -572761402).with('uniqueparentid', 0)
- .with('uitreeindex', 18)
- .with('classname', 'ImageView')
- .with('resource-id', 'com.lge.voicerecorder:id/stopImage')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:Button_Playbutton_13) do
- $ruiObj = RUIObject.new.with('objectid', 1279473370).with('selfid', -1475026465).with('textdescid', 318711386).with('uniqueparentid', 0)
- .with('uitreeindex', 19)
- .with('classname', 'Button')
- .with('resource-id', 'com.lge.voicerecorder:id/playButton')
- .with('content-desc', 'Play')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:wait12second_8) do
- waitsecond(12)
- end
- tcase << TestAction.new(:TextView_Delete_15) do
- $ruiObj = RUIObject.new.with('objectid', -1857314789).with('selfid', 1644806947).with('textdescid', 449535344).with('uniqueparentid', 0)
- .with('uitreeindex', 3)
- .with('classname', 'TextView')
- .with('content-desc', 'Delete')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_Customtitle_18) do
- $ruiObj = RUIObject.new.with('objectid', -588258928).with('selfid', 1550783101).with('textdescid', -1546678125).with('uniqueparentid', 0)
- .with('uitreeindex', 1)
- .with('classname', 'TextView')
- .with('resource-id', 'com.lge.voicerecorder:id/customtitle')
- .with('text', 'Select all')
- $ruiObj.click
- end
- tcase << TestAction.new(:Button_Listdeletebutton_21) do
- $ruiObj = RUIObject.new.with('objectid', -73263271).with('selfid', -1086917555).with('textdescid', -1490152978).with('uniqueparentid', 0)
- .with('uitreeindex', 9)
- .with('classname', 'Button')
- .with('resource-id', 'com.lge.voicerecorder:id/listDeleteButton')
- .with('text', 'Delete')
- $ruiObj.click
- end
- tcase << TestAction.new(:Button_Button1_18) do
- $ruiObj = RUIObject.new.with('objectid', 1555335400).with('selfid', 1012902611).with('textdescid', -579238787).with('uniqueparentid', 0)
- .with('uitreeindex', 2)
- .with('classname', 'Button')
- .with('resource-id', 'android:id/button1')
- .with('text', 'Delete')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:scriptAction_2_1_1) do
- logStopTest("VoiceRecord")
- end
- tcase << TestAction.new(:pressBack_16) do
- pressBack
- waitsecond(1)
- end
- tcase << TestAction.new(:pressBack_19) do
- pressBack
- waitsecond(1)
- end
- tcase << TestAction.new(:pressHome_20) do
- pressHome
- waitsecond(1)
- end
- tcase.run(loopTime)
- end
- def self.Youtube(loopTime)
- tcase = TestCase.new("Youtube")
- tcase << TestAction.new(:gotoApp_1) do
- gotoApp('YouTube')
- waitsecond(1)
- end
- tcase << TestAction.new(:scriptAction_2) do
- logStartTest("Youtube")
- end
- tcase << TestAction.new(:TextView_DoneButton_2) do
- $ruiObj = RUIObject.new.with('objectid', -1205593873).with('selfid', -1917900695).with('textdescid', 1076943437).with('uniqueparentid', 0)
- .with('uitreeindex', 2)
- .with('classname', 'TextView')
- .with('resource-id', 'com.google.android.youtube:id/done_button')
- .with('text', 'Done')
- $ruiObj.click
- waitsecond(4)
- end
- tcase << TestAction.new(:clickXY_700_1256_7) do
- click(700,1256)
- waitsecond(8)
- end
- tcase << TestAction.new(:scriptAction_2_1) do
- logStopTest("Youtube")
- end
- tcase << TestAction.new(:pressBack_5) do
- pressBack
- end
- tcase << TestAction.new(:pressBack_6) do
- pressBack
- end
- tcase << TestAction.new(:pressHome_7) do
- pressHome
- end
- tcase.run(loopTime)
- end
- def self.endcall(loopTime)
- tcase = TestCase.new("endcall")
- tcase << TestAction.new(:scriptAction_3) do
- UiDevice.getInstance.openNotification()
- waitsecond(2)
- end
- tcase << TestAction.new(:swipeDown_2) do
- swipe_vertical 500
- waitsecond(2)
- end
- tcase << TestAction.new(:clickXY_1136_628_1) do
- click(1136,628)
- waitsecond(2)
- end
- tcase.run(loopTime)
- end
- def self.ltecall_ExpHandler(loopTime)
- tcase = TestCase.new("ltecall_ExpHandler")
- tcase << TestAction.new(:wait1second_1) do
- waitsecond(1)
- end
- tcase << TestAction.new(:scriptAction_2) do
- puts "Detected Incomming Call"
- $UIDev.swipe(200,$UIDev.getDisplayHeight-300,$UIDev.getDisplayWidth-50,$UIDev.getDisplayHeight-300,10)
- waitsecond(2)
- end
- tcase << TestAction.new(:wait2second_3) do
- waitsecond(2)
- end
- tcase.run(loopTime)
- end
- def self.startTest(loopTime)
- tcase = TestCase.new("startTest")
- tcase << TestAction.new(:pressBack_1) do
- pressBack
- end
- tcase << TestAction.new(:pressBack_2) do
- pressBack
- end
- tcase << TestAction.new(:pressHome_3) do
- pressHome
- end
- tcase.run(loopTime)
- end
- def self.wifi(loopTime)
- tcase = TestCase.new("wifi")
- tcase << TestAction.new(:gotoApp_1) do
- gotoApp('Settings')
- end
- tcase << TestAction.new(:TextView_Title_25) do
- $ruiObj = RUIObject.new.with('objectid', 773617948).with('selfid', -2078686330).with('textdescid', 405839511).with('uniqueparentid', 0)
- .with('uitreeindex', 3)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/title')
- .with('text', 'Networks')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_Title_2) do
- $ruiObj = RUIObject.new.with('objectid', 2008023572).with('selfid', -589731018).with('textdescid', 498664031).with('uniqueparentid', 0).with('classresourceid', 490183159)
- .with('uitreeindex', 9)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/title')
- .with('text', 'WiFi')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_Title_6_1) do
- $ruiObj = RUIObject.new.with('objectid', 274971481).with('selfid', -71636208).with('textdescid', 341957782).with('uniqueparentid', 0).with('classresourceid', 490183159)
- .with('uitreeindex', 6)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/title')
- .with('text', 'QCTCOMP')
- $ruiObj.isNotExist
- ifFailJumpTo(:TextView_Title_6)
- waitsecond(1)
- end
- tcase << TestAction.new(:Switch_OFF_2) do
- $ruiObj = RUIObject.new.with('objectid', 1178284996).with('selfid', -533646533).with('textdescid', -1104515187).with('uniqueparentid', 0)
- .with('uitreeindex', 2)
- .with('classname', 'Switch')
- .with('text', 'OFF')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:TextView_Title_6) do
- $ruiObj = RUIObject.new.with('objectid', 274971481).with('selfid', -71636208).with('textdescid', 341957782).with('uniqueparentid', 0).with('classresourceid', 490183159)
- .with('uitreeindex', 6)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/title')
- .with('text', 'QCTCOMP')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:EditText_Password_4) do
- $ruiObj = RUIObject.new.with('objectid', -976316462).with('selfid', -2120332491).with('textdescid', -201039218).with('uniqueparentid', 0).with('classresourceid', -714852383)
- .with('uitreeindex', 2)
- .with('classname', 'EditText')
- .with('resource-id', 'com.lge.wifisettings:id/password')
- $ruiObj.inputtext('12abcdef34')
- waitsecond(1)
- end
- tcase << TestAction.new(:Button_Button1_8) do
- $ruiObj = RUIObject.new.with('objectid', 972638584).with('selfid', 736098498).with('textdescid', -870791618).with('uniqueparentid', 0)
- .with('uitreeindex', 7)
- .with('classname', 'Button')
- .with('resource-id', 'android:id/button1')
- .with('text', 'Connect')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:pressBack_12) do
- pressBack
- end
- tcase << TestAction.new(:pressBack_13) do
- pressBack
- end
- tcase << TestAction.new(:pressHome_14) do
- pressHome
- end
- tcase.run(loopTime)
- end
- def self.wifiOff(loopTime)
- tcase = TestCase.new("wifiOff")
- tcase << TestAction.new(:gotoApp_1) do
- gotoApp('Settings')
- end
- tcase << TestAction.new(:TextView_Title_21) do
- $ruiObj = RUIObject.new.with('objectid', 773617948).with('selfid', -2078686330).with('textdescid', 405839511).with('uniqueparentid', 0)
- .with('uitreeindex', 3)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/title')
- .with('text', 'Networks')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_Title_2) do
- $ruiObj = RUIObject.new.with('objectid', 2008023572).with('selfid', -589731018).with('textdescid', 498664031).with('uniqueparentid', 0).with('classresourceid', 490183159)
- .with('uitreeindex', 9)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/title')
- .with('text', 'WiFi')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_Title_6_1) do
- $ruiObj = RUIObject.new.with('objectid', 274971481).with('selfid', -71636208).with('textdescid', 341957782).with('uniqueparentid', 0).with('classresourceid', 490183159)
- .with('uitreeindex', 6)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/title')
- .with('text', 'QCTCOMP')
- $ruiObj.isExist
- ifFailJumpTo(:pressBack_12)
- waitsecond(1)
- end
- tcase << TestAction.new(:Switch_ON_4) do
- $ruiObj = RUIObject.new.with('objectid', 1178284996).with('selfid', 1645353587).with('textdescid', -1975291963).with('uniqueparentid', 0)
- .with('uitreeindex', 2)
- .with('classname', 'Switch')
- .with('text', 'ON')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:pressBack_12) do
- pressBack
- end
- tcase << TestAction.new(:pressBack_13) do
- pressBack
- end
- tcase << TestAction.new(:pressHome_14) do
- pressHome
- 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"
- startTest 1
- $POWERLOG = true
- $actionParamInput = "none"
- Voice 1
- $actionParamInput = "none"
- Browser 1
- $actionParamInput = "none"
- Youtube 1
- $actionParamInput = "none"
- Voice 1
- $actionParamInput = "none"
- Emails 1
- $actionParamInput = "none"
- Voice 1
- $actionParamInput = "none"
- SMS 1
- $actionParamInput = "none"
- MMS 1
- $actionParamInput = "none"
- Voice 1
- $actionParamInput = "none"
- GPS 1
- $actionParamInput = "none"
- Voice 1
- $actionParamInput = "none"
- Camera 1
- $actionParamInput = "none"
- Video 1
- if rand(100) < 0
- $actionParamInput = "none"
- wifi 1
- end
- $actionParamInput = "none"
- Data 1
- $actionParamInput = "none"
- Browser 1
- $actionParamInput = "none"
- Youtube 1
- $actionParamInput = "none"
- Emails 1
- $actionParamInput = "none"
- SMS 1
- $actionParamInput = "none"
- MMS 1
- $actionParamInput = "none"
- Camera 1
- $actionParamInput = "none"
- Video 1
- $actionParamInput = "none"
- Multimedia 1
- $actionParamInput = "none"
- DataEnd 1
- $actionParamInput = "none"
- Voice 1
- $actionParamInput = "none"
- Data 1
- $actionParamInput = "none"
- Camera 1
- $actionParamInput = "none"
- Video 1
- $actionParamInput = "none"
- Multimedia 1
- $actionParamInput = "none"
- DataEnd 1
- if rand(100) < 0
- $actionParamInput = "none"
- wifiOff 1
- end
- $actionParamInput = "none"
- VoiceRecord 5
- 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.exception_handler
- puts "Module Exception Hanlder..."
- if ($lastPackageName == "ltecall")
- ltecall_ExpHandler(1)
- end
- end
- def self.run(loop)
- mainLoop loop
- end
- end
- $exceptionPackageNameList = []
- $exceptionPackageNameList_exclude = []
- $exceptionPackageNameList << "ltecall"
- def exception_handler
- H1_TNTS_Concurrency.exception_handler
- end
- $curProjectLogFile = $useLastLogFile
- $curProjectLogFile = "H1_TNTS_Concurrency_#{getTimeStamp}.log" if $useLastLogFile.nil?
- $useLastLogFile = nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement