Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- loadTestDB
- module JOAN_Concurrency
- def self.Browser(loopTime)
- tcase = TestCase.new("Browser")
- tcase << TestAction.new(:pressHome_2) do
- pressHome
- waitsecond(2)
- end
- tcase << TestAction.new(:TextView_PagedviewIcon_4) do
- $ruiObj = RUIObject.new.with('objectid', -637675849).with('selfid', -306872572).with('textdescid', -1011318327).with('uniqueparentid', 0)
- .with('uitreeindex', 9)
- .with('classname', 'TextView')
- .with('resource-id', 'com.lge.easyhome:id/pagedview_icon')
- .with('content-desc', 'Chrome')
- .with('text', 'Chrome')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:scriptAction_2) do
- logStartTest("Browser")
- end
- tcase << TestAction.new(:clickXY_9045_2115_6) do
- click(904.5,211.5)
- waitsecond(2)
- 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_9045_2115_8) do
- click(904.5,211.5)
- 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(:Button_OkButton_4) do
- $ruiObj = RUIObject.new.with('objectid', -860787377).with('selfid', -2071126929).with('textdescid', 278653811).with('uniqueparentid', 0)
- .with('uitreeindex', 26)
- .with('classname', 'Button')
- .with('resource-id', 'com.lge.camera:id/ok_button')
- .with('text', 'OK')
- $ruiObj.click
- waitsecond(2)
- end
- 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_8) do
- $ruiObj = RUIObject.new.with('objectid', 2138780457).with('selfid', 765132311).with('textdescid', -782727157).with('uniqueparentid', 0)
- .with('uitreeindex', 19)
- .with('classname', 'Button')
- .with('resource-id', 'com.lge.camera:id/cancel_button')
- .with('text', 'LATER')
- $ruiObj.click
- waitsecond(1)
- 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')
- waitsecond(2)
- end
- tcase << TestAction.new(:Button_Button1_24) do
- $ruiObj = RUIObject.new.with('objectid', 415387334).with('selfid', -522226736).with('textdescid', -233514014).with('uniqueparentid', 0)
- .with('uitreeindex', 6)
- .with('classname', 'Button')
- .with('resource-id', 'android:id/button1')
- .with('text', 'Close')
- $ruiObj.click
- waitsecond(1)
- 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)
- 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(:pressRecentApps_3) do
- pressRecentApps
- waitsecond(1)
- end
- tcase << TestAction.new(:clickXY_693_14895_5) do
- click(693,1489.5)
- waitsecond(1)
- 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(:pressRecentApps_7) do
- pressRecentApps
- waitsecond(1)
- end
- tcase << TestAction.new(:clickXY_7155_14985_9) do
- click(715.5,1498.5)
- 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')
- waitsecond(2)
- 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_25) do
- $ruiObj = RUIObject.new.with('objectid', 1308296701).with('selfid', 678761455).with('textdescid', 1902492099).with('uniqueparentid', 0).with('classresourceid', 1488875515)
- .with('uitreeindex', 9)
- .with('classname', 'MultiAutoCompleteTextView')
- .with('resource-id', 'com.google.android.gm:id/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(:View_Compose_4) do
- $ruiObj = RUIObject.new.with('objectid', -2101420856).with('selfid', -497970335).with('textdescid', 1027339414).with('uniqueparentid', 1227675605).with('classresourceid', 1815484335)
- .with('uitreeindex', 14)
- .with('classname', 'android.view.View')
- .with('content-desc', 'Compose email')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:scriptAction_10) do
- RUIObject.new.with('objectid', -2101420856).with('selfid', -497970335).with('textdescid', 1027339414).with('uniqueparentid', 1227675605).with('classresourceid', 1815484335)
- .with('uitreeindex', 14)
- .with('classname', 'android.view.View')
- .with('content-desc', 'Compose email').inputtext("This is concurrency tests sending email during call.")
- 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(:Button_Button1_8) do
- $ruiObj = RUIObject.new.with('objectid', 157034989).with('selfid', 1077689959).with('textdescid', 1509699438).with('uniqueparentid', 0).with('classresourceid', 1834539358)
- .with('uitreeindex', 3)
- .with('classname', 'Button')
- .with('resource-id', 'android:id/button1')
- .with('text', 'GOT IT')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:clickXY_12735_2295_6) do
- click(1273.5,2295)
- waitsecond(2)
- end
- tcase << TestAction.new(:gotoApp_1) do
- gotoApp('Maps')
- waitsecond(2)
- end
- tcase << TestAction.new(:scriptAction_2) do
- logStartTest("GPS")
- end
- tcase << TestAction.new(:Button_TutorialSideMenuGotIt_2) do
- $ruiObj = RUIObject.new.with('objectid', 1791083849).with('selfid', -1089246754).with('textdescid', 1043246794).with('uniqueparentid', 0)
- .with('uitreeindex', 3)
- .with('classname', 'Button')
- .with('resource-id', 'com.google.android.apps.maps:id/tutorial_side_menu_got_it')
- .with('text', 'GOT IT')
- $ruiObj.click
- waitsecond(1)
- 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_186_112_2) do
- click(186,112)
- waitsecond(2)
- end
- tcase << TestAction.new(:scriptAction_6) do
- RUIObject.new.with('objectid', -965423009).with('selfid', 373809078).with('textdescid', -456331271).with('uniqueparentid', 0)
- .with('uitreeindex', 2)
- .with('classname', 'TextView')
- .with('text', 'Search here').inputtext("3225 N Harbor Dr")
- waitsecond(2)
- end
- tcase << TestAction.new(:pressEnter_2) do
- pressEnter
- waitsecond(2)
- end
- tcase << TestAction.new(:clickXY_1260_2367_2) do
- click(1260,2367)
- 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(:ImageView_FabImg_4) do
- $ruiObj = RUIObject.new
- .with('classname', 'ImageView')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:gotoApp_1) do
- gotoApp('Messaging')
- waitsecond(2)
- end
- tcase << TestAction.new(:Button_PermissionAllowButton_4) do
- $ruiObj = RUIObject.new.with('objectid', -1492498299).with('selfid', 1443382411).with('textdescid', -1772738030).with('uniqueparentid', 0).with('classresourceid', -227364920)
- .with('uitreeindex', 5)
- .with('classname', 'Button')
- .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
- .with('text', 'ALLOW')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:Button_PermissionAllowButton_6) do
- $ruiObj = RUIObject.new.with('objectid', -1492498299).with('selfid', 1443382411).with('textdescid', -1772738030).with('uniqueparentid', 0).with('classresourceid', -227364920)
- .with('uitreeindex', 3)
- .with('classname', 'Button')
- .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
- .with('text', 'ALLOW')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:scriptAction_6) do
- logStartTest("MMS")
- end
- tcase << TestAction.new(:ImageView_FabImg_2) do
- $ruiObj = RUIObject.new.with('objectid', -820305049).with('selfid', 1638137891).with('textdescid', 1158507182).with('uniqueparentid', 0)
- .with('uitreeindex', 6)
- .with('classname', 'ImageView')
- .with('resource-id', 'com.android.mms:id/fab_img')
- .with('content-desc', 'New message')
- $ruiObj.click
- waitsecond(2)
- 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 a01')
- waitsecond(1)
- end
- tcase << TestAction.new(:clickXY_110_172_2) do
- click(110,172)
- 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_4) do
- $ruiObj = RUIObject.new.with('objectid', 1787472427).with('selfid', 422456329).with('textdescid', -15852201).with('uniqueparentid', 0)
- .with('uitreeindex', 2)
- .with('classname', 'TextView')
- .with('resource-id', 'com.android.mms:id/text1')
- .with('text', 'Picture')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:Button_PermissionAllowButton_8) do
- $ruiObj = RUIObject.new.with('objectid', -1492498299).with('selfid', 1443382411).with('textdescid', -1772738030).with('uniqueparentid', 0).with('classresourceid', -227364920)
- .with('uitreeindex', 4)
- .with('classname', 'Button')
- .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
- .with('text', 'ALLOW')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:ImageButton_Show_10) do
- $ruiObj = RUIObject.new.with('objectid', 1571666208).with('selfid', -929198491).with('textdescid', 2010273934).with('uniqueparentid', 0)
- .with('uitreeindex', 0)
- .with('classname', 'ImageButton')
- .with('content-desc', 'Show roots')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_Title_12) do
- $ruiObj = RUIObject.new.with('objectid', -1941383373).with('selfid', 4082754).with('textdescid', 50769842).with('uniqueparentid', 0).with('classresourceid', 490183159)
- .with('uitreeindex', 41)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/title')
- .with('text', 'Photos')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_Title_14) do
- $ruiObj = RUIObject.new.with('objectid', -2074516409).with('selfid', -1484513934).with('textdescid', 889140747).with('uniqueparentid', 0)
- .with('uitreeindex', 10)
- .with('classname', 'TextView')
- .with('resource-id', 'com.google.android.apps.photos:id/title')
- .with('text', '1M')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:clickXY_2295_7425_17) do
- click(229.5,742.5)
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_DoneButton_19) do
- $ruiObj = RUIObject.new.with('objectid', -958387193).with('selfid', -885365197).with('textdescid', 1900114073).with('uniqueparentid', 0)
- .with('uitreeindex', 11)
- .with('classname', 'TextView')
- .with('resource-id', 'com.google.android.apps.photos:id/done_button')
- .with('content-desc', 'Done')
- .with('text', 'DONE')
- $ruiObj.click
- waitsecond(2)
- 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(:Button_SendButtonText_21) do
- $ruiObj = RUIObject.new
- .with('classname', 'Button')
- .with('content-desc', 'Send')
- .with('text', 'Send')
- $ruiObj.click
- waitsecond(2)
- 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(:Button_Button1_2) do
- $ruiObj = RUIObject.new.with('objectid', 1034541174).with('selfid', -1318451484).with('textdescid', 730622746).with('uniqueparentid', 0)
- .with('uitreeindex', 4)
- .with('classname', 'Button')
- .with('resource-id', 'android:id/button1')
- .with('text', 'OK')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:pressRecentApps_5) do
- pressRecentApps
- waitsecond(1)
- end
- tcase << TestAction.new(:clickXY_702_1422_7) do
- click(702,1422)
- waitsecond(1)
- 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_180_1204_8) do
- click(180,1204)
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_ActionShare_16) do
- $ruiObj = RUIObject.new.with('objectid', 810661028).with('selfid', 1147601526).with('textdescid', 1124326531).with('uniqueparentid', 0)
- .with('uitreeindex', 4)
- .with('classname', 'TextView')
- .with('resource-id', 'com.android.gallery3d:id/action_share')
- .with('content-desc', 'Share')
- $ruiObj.isNotExist
- ifFailJumpTo(:clickXY_200_560_10)
- waitsecond(1)
- end
- tcase << TestAction.new(:clickXY_196_544_18) do
- click(196,544)
- waitsecond(1)
- end
- tcase << TestAction.new(:clickXY_200_560_10) do
- click(200,560)
- waitsecond(1)
- 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_6) 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(1)
- end
- tcase << TestAction.new(:TextView_Edit_20) do
- $ruiObj = RUIObject.new.with('objectid', -428282449).with('selfid', 1160143396).with('textdescid', -197620933).with('uniqueparentid', 0)
- .with('uitreeindex', 13)
- .with('classname', 'TextView')
- .with('content-desc', 'Edit')
- $ruiObj.isExist
- waitsecond(1)
- end
- tcase << TestAction.new(:scriptAction_4) do
- $myTestResult = checkLastExistResult
- if $myTestResult == false
- $myFailReason = "Failed to play video"
- end
- 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')
- waitsecond(2)
- 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(:ImageView_FabImg_2) do
- $ruiObj = RUIObject.new.with('objectid', -820305049).with('selfid', 1638137891).with('textdescid', 1158507182).with('uniqueparentid', 0)
- .with('uitreeindex', 5)
- .with('classname', 'ImageView')
- .with('resource-id', 'com.android.mms:id/fab_img')
- .with('content-desc', 'New message')
- $ruiObj.click
- waitsecond(2)
- 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_90_172_2) do
- click(90,172)
- waitsecond(1)
- end
- tcase << TestAction.new(:EditText_Enter_4) do
- $ruiObj = RUIObject.new.with('objectid', 1986611722).with('selfid', -454502120).with('textdescid', -628489015).with('uniqueparentid', 0).with('classresourceid', 1666676343)
- .with('uitreeindex', 5)
- .with('classname', 'EditText')
- .with('content-desc', 'Enter message')
- $ruiObj.inputtext('Testing "Concurrency tests"')
- waitsecond(2)
- end
- tcase << TestAction.new(:Button_SendButton_6) do
- $ruiObj = RUIObject.new
- .with('classname', '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_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(:wait12second_2) do
- waitsecond(12)
- 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.VideoCall_01(loopTime)
- tcase = TestCase.new("VideoCall_01")
- tcase << TestAction.new(:scriptAction_StartTest_1) do
- logStartTest("VideoCall_01")
- end
- tcase << TestAction.new(:pressHome_4) do
- pressHome
- end
- tcase << TestAction.new(:TextView_Phone_2) do
- $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
- .with('uitreeindex', 9)
- .with('classname', 'TextView')
- .with('content-desc', 'Phone')
- .with('text', 'Phone')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_Tabtext_2) do
- $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
- .with('uitreeindex', 4)
- .with('classname', 'TextView')
- .with('resource-id', 'com.android.contacts:id/tabText')
- .with('text', 'Contacts')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:EditText_SearchSrcText_2) do
- $ruiObj = RUIObject.new.with('objectid', 588070375).with('selfid', -959326622).with('textdescid', -497243406).with('uniqueparentid', 0)
- .with('uitreeindex', 6)
- .with('classname', 'EditText')
- .with('resource-id', 'android:id/search_src_text')
- .with('content-desc', 'Search contacts')
- $ruiObj.inputtext('A01 a01')
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_A01_4) do
- $ruiObj = RUIObject.new.with('objectid', -728261803).with('selfid', -2094016618).with('textdescid', -1517178717).with('uniqueparentid', 0).with('classresourceid', -938935918)
- .with('uitreeindex', 12)
- .with('classname', 'TextView')
- .with('content-desc', 'A01 a01')
- .with('text', 'A01 a01')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:ImageView_Button1_16) do
- $ruiObj = RUIObject.new.with('objectid', -1827607533).with('selfid', 671123258).with('textdescid', 504320911).with('uniqueparentid', 0).with('classresourceid', -1143292048)
- .with('uitreeindex', 15)
- .with('classname', 'ImageView')
- .with('resource-id', 'android:id/button1')
- .with('content-desc', 'Video call to A01 a01')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:ImageView_FirstActionButton_6) do
- $ruiObj = RUIObject.new.with('objectid', -284633982).with('selfid', -1819582550).with('textdescid', -721488607).with('uniqueparentid', 0).with('classresourceid', 745414969)
- .with('uitreeindex', 11)
- .with('classname', 'ImageView')
- .with('resource-id', 'com.android.contacts:id/first_action_button')
- .with('content-desc', 'Video call')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:wait8second_31) do
- waitsecond(8)
- end
- tcase << TestAction.new(:scriptAction_18_1) do
- sendBTCmd('videoCall')
- waitsecond(8)
- end
- tcase << TestAction.new(:scriptAction_18_1_1) do
- sendBTCmd('endCall')
- waitsecond(2)
- end
- tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
- $myTestResult = checkLastBTCmdResult
- if $myTestResult == false
- $myFailReason = "Call not come to other dev"
- end
- logStopTest("VideoCall_01")
- end
- tcase << TestAction.new(:Button_Endbutton_2) 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(:pressBack_3) do
- pressBack
- end
- tcase << TestAction.new(:pressBack_4) do
- pressBack
- 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(:Button_Action0_10_1) do
- $ruiObj = RUIObject.new.with('objectid', 195744714).with('selfid', 316612829).with('textdescid', 467727542).with('uniqueparentid', 0)
- .with('uitreeindex', 12)
- .with('classname', 'Button')
- .with('resource-id', 'android:id/action0')
- .with('content-desc', 'End call')
- .with('text', 'End call')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:pressRecentApps_2) do
- pressRecentApps
- waitsecond(2)
- end
- tcase << TestAction.new(:pressHome_4) do
- pressHome
- waitsecond(2)
- 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('511')
- waitsecond(1)
- end
- tcase << TestAction.new(:ImageButton_Btnvolte_2) do
- $ruiObj = RUIObject.new.with('objectid', -1313327681).with('selfid', -460279496).with('textdescid', -1259661061).with('uniqueparentid', 0)
- .with('uitreeindex', 36)
- .with('classname', 'ImageButton')
- .with('resource-id', 'com.android.contacts:id/btnVoLTE')
- .with('content-desc', 'VoLTE call')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:ImageButton_Btnlogscall_2) do
- $ruiObj = RUIObject.new.with('objectid', -1934426254).with('selfid', -2053967649).with('textdescid', -911487124).with('uniqueparentid', 0)
- .with('uitreeindex', 36)
- .with('classname', 'ImageButton')
- .with('resource-id', 'com.android.contacts:id/btnLogsCall')
- .with('content-desc', 'Call')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:pressHome_8) do
- pressHome
- waitsecond(1)
- end
- tcase << TestAction.new(:scriptAction_2_1) do
- logStopTest("Voice")
- end
- tcase << TestAction.new(:scriptAction_40) do
- drag(409.5,247.5,54,2668.5,10)
- end
- tcase.run(loopTime)
- end
- def self.VoiceRecord(loopTime)
- tcase = TestCase.new("VoiceRecord")
- tcase << TestAction.new(:gotoApp_1) do
- gotoApp('HD Audio Recorder')
- end
- tcase << TestAction.new(:scriptAction_2_1) do
- logStartTest("Voice")
- end
- tcase << TestAction.new(:Button_BtnAgree_4) do
- $ruiObj = RUIObject.new.with('objectid', -348214443).with('selfid', 1095265349).with('textdescid', -1957555649).with('uniqueparentid', 0)
- .with('uitreeindex', 89)
- .with('classname', 'Button')
- .with('resource-id', 'com.lge.eula:id/btn_agree')
- .with('text', 'Agree')
- $ruiObj.click
- end
- tcase << TestAction.new(:Button_PermissionAllowButton_3) do
- $ruiObj = RUIObject.new.with('objectid', -1492498299).with('selfid', 1443382411).with('textdescid', -1772738030).with('uniqueparentid', 0).with('classresourceid', -227364920)
- .with('uitreeindex', 4)
- .with('classname', 'Button')
- .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
- .with('text', 'ALLOW')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:Button_PermissionAllowButton_3_1) do
- $ruiObj = RUIObject.new.with('objectid', -1492498299).with('selfid', 1443382411).with('textdescid', -1772738030).with('uniqueparentid', 0).with('classresourceid', -227364920)
- .with('uitreeindex', 4)
- .with('classname', 'Button')
- .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
- .with('text', 'ALLOW')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:Button_TipHelpNextButton_2) do
- $ruiObj = RUIObject.new.with('objectid', -1434682713).with('selfid', 1581855318).with('textdescid', 1391497428).with('uniqueparentid', 0)
- .with('uitreeindex', 12)
- .with('classname', 'Button')
- .with('resource-id', 'com.lge.hifirecorder:id/tip_help_next_button')
- .with('text', 'NEXT')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:Button_TipHelpNextButton_4) do
- $ruiObj = RUIObject.new.with('objectid', -1434682713).with('selfid', 1581855318).with('textdescid', 1391497428).with('uniqueparentid', 0)
- .with('uitreeindex', 14)
- .with('classname', 'Button')
- .with('resource-id', 'com.lge.hifirecorder:id/tip_help_next_button')
- .with('text', 'NEXT')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:Button_TipHelpNextButton_4_1) do
- $ruiObj = RUIObject.new.with('objectid', -1434682713).with('selfid', 1581855318).with('textdescid', 1391497428).with('uniqueparentid', 0)
- .with('uitreeindex', 14)
- .with('classname', 'Button')
- .with('resource-id', 'com.lge.hifirecorder:id/tip_help_next_button')
- .with('text', 'NEXT')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:Button_TipHelpNextButton_4_1_1) do
- $ruiObj = RUIObject.new.with('objectid', -1434682713).with('selfid', 1581855318).with('textdescid', 1391497428).with('uniqueparentid', 0)
- .with('uitreeindex', 14)
- .with('classname', 'Button')
- .with('resource-id', 'com.lge.hifirecorder:id/tip_help_next_button')
- .with('text', 'NEXT')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:Button_TipHelpNextButton_8) do
- $ruiObj = RUIObject.new.with('objectid', -1434682713).with('selfid', 1581566693).with('textdescid', 1382550053).with('uniqueparentid', 0)
- .with('uitreeindex', 10)
- .with('classname', 'Button')
- .with('resource-id', 'com.lge.hifirecorder:id/tip_help_next_button')
- .with('text', 'DONE')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:pressRecentApps_10) do
- pressRecentApps
- waitsecond(1)
- end
- tcase << TestAction.new(:pressRecentApps_10_1) do
- pressRecentApps
- waitsecond(1)
- end
- tcase << TestAction.new(:ImageView_Recordimage_13) do
- $ruiObj = RUIObject.new.with('objectid', -1465298129).with('selfid', 238279933).with('textdescid', 1820398289).with('uniqueparentid', 0)
- .with('uitreeindex', 17)
- .with('classname', 'ImageView')
- .with('resource-id', 'com.lge.hifirecorder:id/recordImage')
- $ruiObj.click
- waitsecond(0)
- end
- tcase << TestAction.new(:wait12second_2) do
- waitsecond(12)
- end
- tcase << TestAction.new(:ImageView_Recordimage_15) do
- $ruiObj = RUIObject.new.with('objectid', -1465298129).with('selfid', 238279933).with('textdescid', 1820398289).with('uniqueparentid', 0)
- .with('uitreeindex', 16)
- .with('classname', 'ImageView')
- .with('resource-id', 'com.lge.hifirecorder:id/recordImage')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:ImageView_Recordimage_20) do
- $ruiObj = RUIObject.new.with('objectid', -1465298129).with('selfid', 238279933).with('textdescid', 1820398289).with('uniqueparentid', 0)
- .with('uitreeindex', 16)
- .with('classname', 'ImageView')
- .with('resource-id', 'com.lge.hifirecorder:id/recordImage')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:wait12second_8) do
- waitsecond(12)
- end
- tcase << TestAction.new(:ImageView_Stopimage_22) do
- $ruiObj = RUIObject.new.with('objectid', -394191601).with('selfid', -1953519444).with('textdescid', 664962289).with('uniqueparentid', 0)
- .with('uitreeindex', 18)
- .with('classname', 'ImageView')
- .with('resource-id', 'com.lge.hifirecorder:id/stopImage')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:ImageView_Playimage_24) do
- $ruiObj = RUIObject.new.with('objectid', 1501925340).with('selfid', -1166191430).with('textdescid', -684954684).with('uniqueparentid', 0)
- .with('uitreeindex', 29)
- .with('classname', 'ImageView')
- .with('resource-id', 'com.lge.hifirecorder:id/playImage')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:wait8second_26) do
- waitsecond(8)
- end
- tcase << TestAction.new(:Button_Deletebutton_28) do
- $ruiObj = RUIObject.new.with('objectid', 963964431).with('selfid', -1380084967).with('textdescid', 2110292476).with('uniqueparentid', 0)
- .with('uitreeindex', 15)
- .with('classname', 'Button')
- .with('resource-id', 'com.lge.hifirecorder:id/deletebutton')
- .with('content-desc', 'Delete')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:Button_Button1_30) do
- $ruiObj = RUIObject.new.with('objectid', 562328070).with('selfid', 982364851).with('textdescid', -739744837).with('uniqueparentid', 0).with('classresourceid', 1834539358)
- .with('uitreeindex', 2)
- .with('classname', 'Button')
- .with('resource-id', 'android:id/button1')
- .with('text', 'DELETE')
- $ruiObj.click
- waitsecond(2)
- 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(:ImageView_Thumbnail_2) do
- $ruiObj = RUIObject.new.with('objectid', 1925683767).with('selfid', -2120336906).with('textdescid', -433345335).with('uniqueparentid', 0)
- .with('uitreeindex', 9)
- .with('pretext', 'Home')
- .with('classname', 'ImageView')
- .with('resource-id', 'com.google.android.youtube:id/thumbnail')
- $ruiObj.click
- 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.android_ExpHandler(loopTime)
- tcase = TestCase.new("android_ExpHandler")
- tcase << TestAction.new(:scriptAction_check) do
- $err = "system popup detected::#{takeScreenShot}::screenshot saved"
- $myTestResult = false
- puts $err
- logcat($err)
- writelog($err)
- uiObj("Button").click if uiObj("Button").exists
- waitsecond(2)
- end
- tcase.run(loopTime)
- end
- def self.change_3G(loopTime)
- tcase = TestCase.new("change_3G")
- tcase << TestAction.new(:gotoApp_16) do
- gotoApp('HiddenMenuCall')
- end
- tcase << TestAction.new(:TextView_Title_2) do
- $ruiObj = RUIObject.new.with('objectid', 1100751325).with('selfid', -167282287).with('textdescid', -350417171).with('uniqueparentid', 0).with('classresourceid', 490183159)
- .with('uitreeindex', 1)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/title')
- .with('text', 'LG Hidden Menu')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_Title_87) do
- $ruiObj = RUIObject.new.with('objectid', 684902757).with('selfid', 538152793).with('textdescid', -1915478867).with('uniqueparentid', 0).with('classresourceid', 490183159)
- .with('uitreeindex', 4)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/title')
- .with('text', 'Field Test')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_Text1_10) do
- $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', -141259386).with('textdescid', -734720867).with('uniqueparentid', 0).with('classresourceid', 490068035)
- .with('uitreeindex', 1)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/text1')
- .with('text', 'Modem Settings')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:swipeDown_12) do
- swipe_vertical 500
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_Text1_14) do
- $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', 12767364).with('textdescid', 1760273017).with('uniqueparentid', 0).with('classresourceid', 490068035)
- .with('uitreeindex', 6)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/text1')
- .with('text', 'RAT Selection')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_Text1_2) do
- $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', -244179464).with('textdescid', 496935915).with('uniqueparentid', 0).with('classresourceid', 490068035)
- .with('uitreeindex', 5)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/text1')
- .with('text', 'GSM WCDMA')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:Button_Button1_18) do
- $ruiObj = RUIObject.new.with('objectid', 2089308220).with('selfid', -1318451484).with('textdescid', 1664978912).with('uniqueparentid', 0)
- .with('uitreeindex', 1)
- .with('classname', 'Button')
- .with('resource-id', 'android:id/button1')
- .with('text', 'OK')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:pressBack_7) do
- pressBack
- end
- tcase << TestAction.new(:pressBack_8) do
- pressBack
- end
- tcase << TestAction.new(:pressBack_20) do
- pressBack
- end
- tcase << TestAction.new(:pressBack_20_1) do
- pressBack
- end
- tcase << TestAction.new(:pressHome_9) do
- pressHome
- end
- tcase.run(loopTime)
- end
- def self.change_LTE(loopTime)
- tcase = TestCase.new("change_LTE")
- tcase << TestAction.new(:gotoApp_16_1) do
- gotoApp('HiddenMenuCall')
- end
- tcase << TestAction.new(:TextView_Title_3) do
- $ruiObj = RUIObject.new.with('objectid', 1100751325).with('selfid', -167282287).with('textdescid', -350417171).with('uniqueparentid', 0).with('classresourceid', 490183159)
- .with('uitreeindex', 1)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/title')
- .with('text', 'LG Hidden Menu')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_Title_87) do
- $ruiObj = RUIObject.new.with('objectid', 684902757).with('selfid', 538152793).with('textdescid', -1915478867).with('uniqueparentid', 0).with('classresourceid', 490183159)
- .with('uitreeindex', 4)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/title')
- .with('text', 'Field Test')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_Text1_10) do
- $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', -141259386).with('textdescid', -734720867).with('uniqueparentid', 0).with('classresourceid', 490068035)
- .with('uitreeindex', 1)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/text1')
- .with('text', 'Modem Settings')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:swipeDown_12) do
- swipe_vertical 500
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_Text1_14) do
- $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', 12767364).with('textdescid', 1760273017).with('uniqueparentid', 0).with('classresourceid', 490068035)
- .with('uitreeindex', 6)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/text1')
- .with('text', 'RAT Selection')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_Text1_2) do
- $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', 747569194).with('textdescid', -1653100487).with('uniqueparentid', 0).with('classresourceid', 490068035)
- .with('uitreeindex', 1)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/text1')
- .with('text', 'GSM WCDMA LTE auto')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:Button_Button1_18) do
- $ruiObj = RUIObject.new.with('objectid', 2089308220).with('selfid', -1318451484).with('textdescid', 1664978912).with('uniqueparentid', 0)
- .with('uitreeindex', 1)
- .with('classname', 'Button')
- .with('resource-id', 'android:id/button1')
- .with('text', 'OK')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:pressBack_7) do
- pressBack
- end
- tcase << TestAction.new(:pressBack_8) do
- pressBack
- end
- tcase << TestAction.new(:pressBack_20) do
- pressBack
- end
- tcase << TestAction.new(:pressBack_20_1) do
- pressBack
- end
- tcase << TestAction.new(:pressHome_9) do
- pressHome
- end
- tcase.run(loopTime)
- end
- def self.connectWifi(loopTime)
- tcase = TestCase.new("connectWifi")
- tcase << TestAction.new(:scriptAction_2) do
- logStartTest("Connect_to_wifi")
- end
- tcase << TestAction.new(:gotoApp_4) do
- gotoApp('Settings')
- end
- tcase << TestAction.new(:TextView_Title_27) do
- $ruiObj = RUIObject.new.with('objectid', 674368800).with('selfid', -2078686330).with('textdescid', -957350501).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(:swipeUp_8) do
- swipe_vertical_back 500
- end
- tcase << TestAction.new(:TextView_Title_4) 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(:ImageView_Icon_6) do
- $ruiObj = RUIObject.new.with('objectid', -1337042610).with('selfid', -1580627678).with('textdescid', 1501352082).with('uniqueparentid', 0).with('classresourceid', -858811928)
- .with('uitreeindex', 10)
- .with('pretext', 'Searching')
- .with('classname', 'ImageView')
- .with('resource-id', 'android:id/icon')
- $ruiObj.isNotExist
- ifFailJumpTo(:TextView_Title_10)
- waitsecond(1)
- end
- tcase << TestAction.new(:Switch_ON_8) 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(:TextView_Title_10) do
- $ruiObj = RUIObject.new.with('objectid', 1034430516).with('selfid', -71636208).with('textdescid', -1976912357).with('uniqueparentid', 0).with('classresourceid', 490183159)
- .with('uitreeindex', 9)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/title')
- .with('text', 'QCTCOMP')
- $ruiObj.click
- waitsecond(2)
- end
- tcase << TestAction.new(:EditText_Password_12) 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_14) do
- $ruiObj = RUIObject.new.with('objectid', -360890210).with('selfid', 736098498).with('textdescid', 503413208).with('uniqueparentid', 0)
- .with('uitreeindex', 6)
- .with('classname', 'Button')
- .with('resource-id', 'android:id/button1')
- .with('text', 'Connect')
- $ruiObj.click
- waitsecond(4)
- end
- tcase << TestAction.new(:TextView_Summary_16) do
- $ruiObj = RUIObject.new.with('objectid', 1399891586).with('selfid', -404041766).with('textdescid', 623785653).with('uniqueparentid', 0).with('classresourceid', -1930775675)
- .with('uitreeindex', 10)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/summary')
- .with('text', 'Connected')
- $ruiObj.isExist
- end
- tcase << TestAction.new(:scriptAction_23_TrueFalse) do
- $myTestResult = checkLastExistResult
- if $myTestResult == false
- $myFailReason == "WiFi cannot connected"
- end
- logStopTest("Connect_to_wifi")
- end
- tcase << TestAction.new(:pressBack_15) do
- pressBack
- end
- tcase << TestAction.new(:pressBack_16) do
- pressBack
- end
- tcase << TestAction.new(:pressHome_17) 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 << TestAction.new(:pressRecentApps_2) do
- pressRecentApps
- waitsecond(2)
- end
- tcase << TestAction.new(:pressHome_4) do
- pressHome
- waitsecond(2)
- 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.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(:check_wifi_on) do
- $ruiObj = RUIObject.new.with('objectid', 1391628862).with('selfid', 1193786863).with('textdescid', 936938386).with('uniqueparentid', 0).with('classresourceid', 490183159)
- .with('uitreeindex', 7)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/title')
- .with('text', 'WIFI NETWORKS')
- $ruiObj.isNotExist
- ifFailJumpTo(:check_wifi_added)
- 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(:check_wifi_added) do
- $ruiObj = RUIObject.new.with('objectid', -1789239232).with('selfid', -789618896).with('textdescid', 272817007).with('uniqueparentid', 0).with('classresourceid', 490183159)
- .with('uitreeindex', 15)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/title')
- .with('text', 'qctcomp')
- $ruiObj.isNotExist
- ifFailJumpTo(:TextView_Title_27_1)
- waitsecond(1)
- end
- tcase << TestAction.new(:ImageButton_More_12) do
- $ruiObj = RUIObject.new.with('objectid', 1634319278).with('selfid', 1290820192).with('textdescid', 371464933).with('uniqueparentid', 0)
- .with('uitreeindex', 3)
- .with('classname', 'ImageButton')
- .with('content-desc', 'More options')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:TextView_Title_14) do
- $ruiObj = RUIObject.new.with('objectid', -1984796814).with('selfid', -392058123).with('textdescid', -1929502754).with('uniqueparentid', 0).with('classresourceid', 490183159)
- .with('uitreeindex', 0)
- .with('classname', 'TextView')
- .with('resource-id', 'android:id/title')
- .with('text', 'Add WiFi')
- $ruiObj.click
- waitsecond(1)
- end
- tcase << TestAction.new(:EditText_Ssid_16) do
- $ruiObj = RUIObject.new.with('objectid', 1745689399).with('selfid', 1359933717).with('textdescid', -1718203447).with('uniqueparentid', 0).with('classresourceid', -1413606463)
- .with('uitreeindex', 2)
- .with('classname', 'EditText')
- .with('resource-id', 'com.lge.wifisettings:id/ssid')
- $ruiObj.inputtext('qctcomp')
- waitsecond(1)
- end
- tcase << TestAction.new(:Button_Button1_18) do
- $ruiObj = RUIObject.new.with('objectid', -360890210).with('selfid', -210572094).with('textdescid', 1221395928).with('uniqueparentid', 0)
- .with('uitreeindex', 7)
- .with('classname', 'Button')
- .with('resource-id', 'android:id/button1')
- .with('text', 'CONNECT')
- $ruiObj.click
- waitsecond(4)
- end
- tcase << TestAction.new(:TextView_Title_27_1) do
- $ruiObj = RUIObject.new.with('objectid', -1789239232).with('selfid', -789618896).with('textdescid', 272817007).with('uniqueparentid', 0).with('classresourceid', 490183159)
- .with('uitreeindex', 9)
- .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(:pressBack_7) do
- pressBack
- waitsecond(1)
- end
- tcase << TestAction.new(:Button_Button1_5) do
- $ruiObj = RUIObject.new.with('objectid', -360890210).with('selfid', -210572094).with('textdescid', 1221395928).with('uniqueparentid', 0)
- .with('uitreeindex', 6)
- .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(2)
- 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(2)
- 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(2)
- 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
- $actionParamInput = "none"
- wifi 1
- $actionParamInput = "none"
- Data 0
- $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 0
- $actionParamInput = "none"
- Voice 1
- $actionParamInput = "none"
- Data 0
- $actionParamInput = "none"
- Camera 1
- $actionParamInput = "none"
- Video 1
- $actionParamInput = "none"
- Multimedia 1
- $actionParamInput = "none"
- DataEnd 0
- $actionParamInput = "none"
- wifiOff 1
- $actionParamInput = "none"
- VoiceRecord 5
- $actionParamInput = "none"
- idle_wait 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.exception_handler
- puts "Module Exception Hanlder..."
- if ($lastPackageName == "android")
- android_ExpHandler(1)
- elsif ($lastPackageName == "ltecall")
- ltecall_ExpHandler(1)
- end
- end
- def self.run(loop)
- mainLoop loop
- end
- end
- $exceptionPackageNameList = []
- $exceptionPackageNameList_exclude = []
- $exceptionPackageNameList << "android"
- $exceptionPackageNameList << "ltecall"
- def exception_handler
- JOAN_Concurrency.exception_handler
- end
- $curProjectLogFile = $useLastLogFile
- $curProjectLogFile = "JOAN_Concurrency_#{getTimeStamp}.log" if $useLastLogFile.nil?
- $useLastLogFile = nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement