Skip to content

Instantly share code, notes, and snippets.

@divamtbf
Created February 9, 2017 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save divamtbf/b0227b1bddfe15b4bd69d1e5ec096c4f to your computer and use it in GitHub Desktop.
Save divamtbf/b0227b1bddfe15b4bd69d1e5ec096c4f to your computer and use it in GitHub Desktop.
DIVA_MTBF_ATT_RubyRunGenerated
loadTestDB
module DIVA_MTBF_ATT
def self.Browser_05_01_04_01(loopTime)
tcase = TestCase.new("Browser_05_01_04_01")
tcase << TestAction.new(:scriptAction_2) do
logStartTest("Browser_05_01_04_01")
end
tcase << TestAction.new(:scriptAction_5) do
gotoAppByAppDrawer("Chrome")
waitsecond(2)
end
tcase << TestAction.new(:Button_TermsAccept_3) do
$ruiObj = RUIObject.new.with('objectid', 1131623741).with('selfid', 2073999009).with('textdescid', -212510162).with('uniqueparentid', 0)
.with('uitreeindex', 4)
.with('classname', 'Button')
.with('resource-id', 'com.android.chrome:id/terms_accept')
.with('text', 'ACCEPT CONTINUE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:swipeDown_7) do
swipe_vertical 500
waitsecond(2)
end
tcase << TestAction.new(:Button_PositiveButton_9) do
$ruiObj = RUIObject.new.with('objectid', -1302979962).with('selfid', -1854494819).with('textdescid', 1350385207).with('uniqueparentid', 0)
.with('uitreeindex', 10)
.with('classname', 'Button')
.with('resource-id', 'com.android.chrome:id/positive_button')
.with('text', 'OK GOT IT')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:swipeUp_4) do
swipe_vertical_back 500
waitsecond(2)
end
tcase << TestAction.new(:EditText_UrlBar_24) do
$ruiObj = RUIObject.new.with('objectid', 882195433).with('selfid', 613381324).with('textdescid', 1578254679).with('uniqueparentid', 0)
.with('uitreeindex', 138)
.with('classname', 'EditText')
.with('resource-id', 'com.android.chrome:id/url_bar')
$ruiObj.click
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', 21)
.with('classname', 'EditText')
.with('resource-id', 'com.android.chrome:id/url_bar')
$ruiObj.inputtext('m.att.com')
waitsecond(1)
end
tcase << TestAction.new(:pressEnter_5) do
pressEnter
waitsecond(2)
end
tcase << TestAction.new(:wait4second_2) do
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_05_01_04_01")
end
tcase << TestAction.new(:pressBack_1) do
pressBack
end
tcase << TestAction.new(:pressHome_1) do
pressHome
end
tcase.run(loopTime)
end
def self.Browser_05_01_04_02(loopTime)
tcase = TestCase.new("Browser_05_01_04_02")
tcase << TestAction.new(:scriptAction_2_1) do
logStartTest("Browser_05_01_04_02")
end
tcase << TestAction.new(:scriptAction_2) do
gotoAppByAppDrawer("Chrome")
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', 40)
.with('classname', 'EditText')
.with('resource-id', 'com.android.chrome:id/url_bar')
$ruiObj.click
waitsecond(1)
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', 40)
.with('classname', 'EditText')
.with('resource-id', 'com.android.chrome:id/url_bar')
$ruiObj.inputtext('www.naver.com')
waitsecond(1)
end
tcase << TestAction.new(:pressEnter_6) do
pressEnter
waitsecond(4)
end
tcase << TestAction.new(:clickXY_621_10035_2) do
click(621,1003.5)
waitsecond(4)
end
tcase << TestAction.new(:swipeUp_4) do
swipe_vertical_back 500
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_1_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_05_01_04_01")
end
tcase << TestAction.new(:pressBack_10) do
pressBack
end
tcase << TestAction.new(:pressBack_1) do
pressBack
end
tcase << TestAction.new(:pressHome_4) do
pressHome
end
tcase.run(loopTime)
end
def self.Browser_05_01_04_03(loopTime)
tcase = TestCase.new("Browser_05_01_04_03")
tcase << TestAction.new(:scriptAction_2_1_1_1) do
logStartTest("Browser_05_01_04_03")
end
tcase << TestAction.new(:scriptAction_2) do
gotoAppByAppDrawer("Chrome")
waitsecond(2)
end
tcase << TestAction.new(:EditText_UrlBar_27) do
$ruiObj = RUIObject.new.with('objectid', 1651866124).with('selfid', 613381324).with('textdescid', -331757676).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'EditText')
.with('resource-id', 'com.android.chrome:id/url_bar')
$ruiObj.click
noFailCheck
waitsecond(1)
end
tcase << TestAction.new(:EditText_UrlBar_27_1) do
$ruiObj = RUIObject.new.with('objectid', 1651866124).with('selfid', 613381324).with('textdescid', -331757676).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'EditText')
.with('resource-id', 'com.android.chrome:id/url_bar')
$ruiObj.inputtext('www.ebay.com')
noFailCheck
waitsecond(1)
end
tcase << TestAction.new(:pressEnter_10) do
pressEnter
waitsecond(4)
end
tcase << TestAction.new(:EditText_UrlBar_27_1) do
$ruiObj = RUIObject.new.with('objectid', 1651866124).with('selfid', 613381324).with('textdescid', -331757676).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'EditText')
.with('resource-id', 'com.android.chrome:id/url_bar')
$ruiObj.click
noFailCheck
waitsecond(1)
end
tcase << TestAction.new(:EditText_UrlBar_4) do
$ruiObj = RUIObject.new.with('objectid', 1651866124).with('selfid', 613381324).with('textdescid', -331757676).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'EditText')
.with('resource-id', 'com.android.chrome:id/url_bar')
$ruiObj.inputtext('www.yahoo.com')
noFailCheck
waitsecond(1)
end
tcase << TestAction.new(:pressEnter_12) do
pressEnter
waitsecond(4)
end
tcase << TestAction.new(:EditText_UrlBar_27_1_1) do
$ruiObj = RUIObject.new.with('objectid', 1651866124).with('selfid', 613381324).with('textdescid', -331757676).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'EditText')
.with('resource-id', 'com.android.chrome:id/url_bar')
$ruiObj.click
noFailCheck
waitsecond(1)
end
tcase << TestAction.new(:EditText_UrlBar_5) do
$ruiObj = RUIObject.new.with('objectid', 1651866124).with('selfid', 613381324).with('textdescid', -331757676).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'EditText')
.with('resource-id', 'com.android.chrome:id/url_bar')
$ruiObj.inputtext('www.amazon.com')
noFailCheck
waitsecond(1)
end
tcase << TestAction.new(:pressEnter_14) do
pressEnter
waitsecond(4)
end
tcase << TestAction.new(:EditText_UrlBar_27_1_1_1) do
$ruiObj = RUIObject.new.with('objectid', 1651866124).with('selfid', 613381324).with('textdescid', -331757676).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'EditText')
.with('resource-id', 'com.android.chrome:id/url_bar')
$ruiObj.click
noFailCheck
waitsecond(1)
end
tcase << TestAction.new(:EditText_UrlBar_3) do
$ruiObj = RUIObject.new.with('objectid', 882195433).with('selfid', 613381324).with('textdescid', 1578254679).with('uniqueparentid', 0)
.with('uitreeindex', 177)
.with('classname', 'EditText')
.with('resource-id', 'com.android.chrome:id/url_bar')
$ruiObj.inputtext('www.youtube.com')
waitsecond(1)
end
tcase << TestAction.new(:pressEnter_16) do
pressEnter
waitsecond(4)
end
tcase << TestAction.new(:EditText_UrlBar_27_1_1_1_1) do
$ruiObj = RUIObject.new.with('objectid', 1651866124).with('selfid', 613381324).with('textdescid', -331757676).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'EditText')
.with('resource-id', 'com.android.chrome:id/url_bar')
$ruiObj.click
noFailCheck
waitsecond(1)
end
tcase << TestAction.new(:EditText_UrlBar_7) do
$ruiObj = RUIObject.new.with('objectid', 1651866124).with('selfid', 613381324).with('textdescid', -331757676).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'EditText')
.with('resource-id', 'com.android.chrome:id/url_bar')
$ruiObj.inputtext('www.nytimes.com')
noFailCheck
waitsecond(1)
end
tcase << TestAction.new(:pressEnter_18) do
pressEnter
waitsecond(4)
end
tcase << TestAction.new(:wait2second_2) do
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_1_1_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_05_01_04_01")
end
tcase << TestAction.new(:pressHome_8) do
pressHome
end
tcase.run(loopTime)
end
def self.CleanStorage(loopTime)
tcase = TestCase.new("CleanStorage")
tcase << TestAction.new(:gotoApp_1) do
gotoApp('Settings')
waitsecond(2)
end
tcase << TestAction.new(:TextView_Title_3) do
$ruiObj = RUIObject.new.with('objectid', 10212784).with('selfid', 641711431).with('textdescid', -2085492536).with('uniqueparentid', 0)
.with('uitreeindex', 8)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'General')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:swipeDown_5) do
swipe_vertical 500
waitsecond(2)
end
tcase << TestAction.new(:TextView_Title_16) do
$ruiObj = RUIObject.new.with('objectid', -2099539841).with('selfid', 131563569).with('textdescid', -9451793).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 26)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Smart cleaning')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Optimization_18) do
$ruiObj = RUIObject.new.with('objectid', 782590524).with('selfid', 1693470848).with('textdescid', -898768623).with('uniqueparentid', 0)
.with('uitreeindex', 25)
.with('classname', 'Button')
.with('resource-id', 'com.lge.phonemanagement:id/optimization')
.with('text', 'Optimize phone')
$ruiObj.click
waitsecond(8)
end
tcase << TestAction.new(:TextView_Title_20) do
$ruiObj = RUIObject.new.with('objectid', -13402843).with('selfid', -2084950584).with('textdescid', -464761683).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'TextView')
.with('resource-id', 'com.lge.phonemanagement:id/title')
.with('text', 'Internal storage')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_CategoryName_22) do
$ruiObj = RUIObject.new.with('objectid', 1100182661).with('selfid', 501190528).with('textdescid', -1962329554).with('uniqueparentid', 0).with('classresourceid', 1580665523)
.with('uitreeindex', 16)
.with('classname', 'TextView')
.with('resource-id', 'com.lge.springcleaning:id/category_name')
.with('text', 'Temporary files raw files')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_CleanButtonSub_24) do
$ruiObj = RUIObject.new.with('objectid', 1970270650).with('selfid', 308785687).with('textdescid', 1073934191).with('uniqueparentid', 0)
.with('uitreeindex', 13)
.with('classname', 'Button')
.with('resource-id', 'com.lge.springcleaning:id/clean_button_sub')
.with('text', 'DELETE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Button1_26) do
$ruiObj = RUIObject.new.with('objectid', 200297986).with('selfid', 982364851).with('textdescid', -1582922825).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_31) do
pressBack
pressBack
pressBack
pressHome
waitsecond(2)
end
tcase.run(loopTime)
end
def self.Email_05_01_03_01(loopTime)
tcase = TestCase.new("Email_05_01_03_01")
tcase << TestAction.new(:pressHome_2) do
pressHome
end
tcase << TestAction.new(:scriptAction_12_1) do
logStartTest("Email_05_01_03_01")
end
tcase << TestAction.new(:gotoApp_3) do
gotoApp('Email')
waitsecond(1)
end
tcase << TestAction.new(:ImageView_Img1_25) do
$ruiObj = RUIObject.new.with('objectid', 577677288).with('selfid', 1832242753).with('textdescid', 1040024250).with('uniqueparentid', 0)
.with('uitreeindex', 11)
.with('classname', 'ImageView')
.with('resource-id', 'com.lge.email:id/img1')
.with('content-desc', 'Compose')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:EditText_To_7) do
$ruiObj = RUIObject.new.with('objectid', 949433449).with('selfid', -182898776).with('textdescid', -900253096).with('uniqueparentid', 0).with('classresourceid', 1666676343)
.with('uitreeindex', 5)
.with('pretext', 'To')
.with('classname', 'EditText')
.with('content-desc', 'To: ')
$ruiObj.inputtext('dvgats1@gmail.com')
end
tcase << TestAction.new(:pressEnter_3) do
pressEnter
end
tcase << TestAction.new(:EditText_Txtemailsubject_6) do
$ruiObj = RUIObject.new.with('objectid', 1286174050).with('selfid', -1018848110).with('textdescid', 1216689918).with('uniqueparentid', 1959895911).with('classresourceid', 386631998)
.with('uitreeindex', 11)
.with('classname', 'EditText')
.with('resource-id', 'com.lge.email:id/txtEmailSubject')
$ruiObj.inputtext('Email Test')
waitsecond(1)
end
tcase << TestAction.new(:clickXY_116_908_2) do
click(116,908)
end
tcase << TestAction.new(:View_EditBox_13_1) do
$ruiObj = RUIObject.new.with('objectid', 134611444).with('selfid', 1661648749).with('textdescid', 1161931405).with('uniqueparentid', -2001114113).with('classresourceid', -760537482)
.with('uitreeindex', 12)
.with('pretext', 'CcBcc')
.with('classname', 'android.view.View')
.with('resource-id', 'EditBox')
.with('content-desc', '
Sent from my LG Mobile')
$ruiObj.click
end
tcase << TestAction.new(:scriptAction_14) do
$ruiObj.inputtext('Testing UiEngine Email Test!!!')
end
tcase << TestAction.new(:Button_BtnsendAtnt_2) do
$ruiObj = RUIObject.new.with('objectid', 1747678584).with('selfid', 1651854553).with('textdescid', 36858568).with('uniqueparentid', 0)
.with('uitreeindex', 16)
.with('classname', 'Button')
.with('resource-id', 'com.lge.email:id/btnSend_atnt')
.with('content-desc', 'Send')
.with('text', 'SEND')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ImageView_Img1_18) do
$ruiObj = RUIObject.new.with('objectid', 577677288).with('selfid', 1832242753).with('textdescid', 1040024250).with('uniqueparentid', 0)
.with('uitreeindex', 13)
.with('classname', 'ImageView')
.with('resource-id', 'com.lge.email:id/img1')
.with('content-desc', 'Compose')
$ruiObj.isExist
waitsecond(2)
end
tcase << TestAction.new(:ImageView_Slidedrawerimg_20) do
$ruiObj = RUIObject.new.with('objectid', -431894634).with('selfid', -1542033050).with('textdescid', -503831734).with('uniqueparentid', 0)
.with('uitreeindex', 0)
.with('classname', 'ImageView')
.with('resource-id', 'com.lge.email:id/slidedrawerimg')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_DrawerChildName_22) do
$ruiObj = RUIObject.new.with('objectid', 2119189077).with('selfid', 232899905).with('textdescid', -1453017635).with('uniqueparentid', 0)
.with('uitreeindex', 19)
.with('classname', 'TextView')
.with('resource-id', 'com.lge.email:id/drawer_child_name')
.with('text', 'Sent')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:clickXY_516_516_24) do
click(516,516)
waitsecond(1)
end
tcase << TestAction.new(:Button_Btnatntbottomdelete_4) do
$ruiObj = RUIObject.new.with('objectid', -2098725759).with('selfid', 480632483).with('textdescid', 1124287286).with('uniqueparentid', 0)
.with('uitreeindex', 18)
.with('classname', 'Button')
.with('resource-id', 'com.lge.email:id/btnAtntBottomDelete')
.with('text', 'DELETE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Delete_Confirm_Button1_6) do
$ruiObj = RUIObject.new.with('objectid', 892548796).with('selfid', 982364851).with('textdescid', 658117233).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'DELETE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_8) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "Email not sent"
end
logStopTest("Email_05_01_03_01")
end
tcase << TestAction.new(:pressBack_3) do
pressBack
end
tcase << TestAction.new(:pressBack_4) do
pressBack
end
tcase.run(loopTime)
end
def self.Email_05_01_03_02(loopTime)
tcase = TestCase.new("Email_05_01_03_02")
tcase << TestAction.new(:scriptAction_12) do
logStartTest("Email_05_01_03_02")
end
tcase << TestAction.new(:gotoApp_3) do
gotoApp('Email')
waitsecond(2)
end
tcase << TestAction.new(:ImageView_Img1_2) do
$ruiObj = RUIObject.new.with('objectid', 577677288).with('selfid', 1832242753).with('textdescid', 1040024250).with('uniqueparentid', 0)
.with('uitreeindex', 13)
.with('classname', 'ImageView')
.with('resource-id', 'com.lge.email:id/img1')
.with('content-desc', 'Compose')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:EditText_To_2) do
$ruiObj = RUIObject.new.with('objectid', 949433449).with('selfid', -182898776).with('textdescid', -900253096).with('uniqueparentid', 0).with('classresourceid', 1666676343)
.with('uitreeindex', 6)
.with('pretext', 'To')
.with('classname', 'EditText')
.with('content-desc', 'To: ')
$ruiObj.inputtext('dvgats1@gmail.com')
end
tcase << TestAction.new(:pressEnter_3) do
pressEnter
end
tcase << TestAction.new(:EditText_Txtemailsubject_6) do
$ruiObj = RUIObject.new.with('objectid', 1286174050).with('selfid', -1018848110).with('textdescid', 1216689918).with('uniqueparentid', 1959895911).with('classresourceid', 386631998)
.with('uitreeindex', 11)
.with('classname', 'EditText')
.with('resource-id', 'com.lge.email:id/txtEmailSubject')
$ruiObj.inputtext('Email Test')
waitsecond(1)
end
tcase << TestAction.new(:clickXY_96_920_2) do
click(96,920)
waitsecond(1)
end
tcase << TestAction.new(:View_EditBox_4) do
$ruiObj = RUIObject.new.with('objectid', 134611444).with('selfid', 1661648749).with('textdescid', 1161931405).with('uniqueparentid', -2001114113).with('classresourceid', -760537482)
.with('uitreeindex', 12)
.with('pretext', 'CcBcc')
.with('classname', 'android.view.View')
.with('resource-id', 'EditBox')
.with('content-desc', '
Sent from my LG Mobile')
$ruiObj.click
end
tcase << TestAction.new(:scriptAction_14) do
$ruiObj.inputtext('Testing UiEngine Email Test!!!')
end
tcase << TestAction.new(:Button_BtnattachAtnt_2) do
$ruiObj = RUIObject.new.with('objectid', 61942491).with('selfid', 1685585846).with('textdescid', 746935205).with('uniqueparentid', 0)
.with('uitreeindex', 15)
.with('classname', 'Button')
.with('resource-id', 'com.lge.email:id/btnAttach_atnt')
.with('content-desc', 'Attach')
.with('text', 'ATTACH')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ImageView_Iv_15) do
$ruiObj = RUIObject.new.with('objectid', 973762667).with('selfid', -408094862).with('textdescid', 121871637).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('pretext', 'Attach 0 B215 MB')
.with('classname', 'ImageView')
.with('resource-id', 'com.lge.email:id/iv')
$ruiObj.click
waitsecond(4)
end
tcase << TestAction.new(:ImageButton_Show_6) do
$ruiObj = RUIObject.new.with('objectid', -1807230859).with('selfid', -929198491).with('textdescid', 629574489).with('uniqueparentid', 0)
.with('uitreeindex', 0)
.with('classname', 'ImageButton')
.with('content-desc', 'Show roots')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_Title_6) do
$ruiObj = RUIObject.new.with('objectid', 942770025).with('selfid', 525544369).with('textdescid', 2103473669).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 15)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Gallery')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:clickXY_228_560_6) do
click(228,560)
waitsecond(1)
end
tcase << TestAction.new(:clickXY_204_544_8) do
click(204,544)
waitsecond(1)
end
tcase << TestAction.new(:Button_SelectionOk_10) do
$ruiObj = RUIObject.new.with('objectid', 1615080131).with('selfid', 1112270122).with('textdescid', -118829337).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'Button')
.with('resource-id', 'com.android.gallery3d:id/selection_ok')
.with('text', 'OK')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Click_Original) do
$ruiObj = RUIObject.new.with('objectid', -784272264).with('selfid', -1179635554).with('textdescid', -74272089).with('uniqueparentid', 0).with('classresourceid', 490068035)
.with('uitreeindex', 1)
.with('classname', 'TextView')
.with('resource-id', 'android:id/text1')
.with('text', 'Original')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_BtnsendAtnt_4) do
$ruiObj = RUIObject.new.with('objectid', 1747678584).with('selfid', 1651854553).with('textdescid', 36858568).with('uniqueparentid', 0)
.with('uitreeindex', 21)
.with('classname', 'Button')
.with('resource-id', 'com.lge.email:id/btnSend_atnt')
.with('content-desc', 'Send')
.with('text', 'SEND')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ImageView_Img1_23) do
$ruiObj = RUIObject.new.with('objectid', 577677288).with('selfid', 1832242753).with('textdescid', 1040024250).with('uniqueparentid', 0)
.with('uitreeindex', 18)
.with('classname', 'ImageView')
.with('resource-id', 'com.lge.email:id/img1')
.with('content-desc', 'Compose')
$ruiObj.isExist
waitsecond(2)
end
tcase << TestAction.new(:ImageView_Slidedrawerimg_20) do
$ruiObj = RUIObject.new.with('objectid', -431894634).with('selfid', -1542033050).with('textdescid', -503831734).with('uniqueparentid', 0)
.with('uitreeindex', 0)
.with('classname', 'ImageView')
.with('resource-id', 'com.lge.email:id/slidedrawerimg')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_DrawerChildName_22) do
$ruiObj = RUIObject.new.with('objectid', 2119189077).with('selfid', 232899905).with('textdescid', -1453017635).with('uniqueparentid', 0)
.with('uitreeindex', 19)
.with('classname', 'TextView')
.with('resource-id', 'com.lge.email:id/drawer_child_name')
.with('text', 'Sent')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:clickXY_560_492_12) do
click(560,492)
waitsecond(1)
end
tcase << TestAction.new(:Button_Btnatntbottomdelete_6) do
$ruiObj = RUIObject.new.with('objectid', -2098725759).with('selfid', 480632483).with('textdescid', 1124287286).with('uniqueparentid', 0)
.with('uitreeindex', 25)
.with('classname', 'Button')
.with('resource-id', 'com.lge.email:id/btnAtntBottomDelete')
.with('text', 'DELETE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Button1_29) do
$ruiObj = RUIObject.new.with('objectid', 892548796).with('selfid', 1012902611).with('textdescid', 1604787793).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'Delete')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_8) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "Email not sent"
end
logStopTest("Email_05_01_03_02")
end
tcase << TestAction.new(:pressBack_3) do
pressBack
end
tcase << TestAction.new(:pressBack_4) do
pressBack
end
tcase.run(loopTime)
end
def self.Email_05_01_03_03(loopTime)
tcase = TestCase.new("Email_05_01_03_03")
tcase << TestAction.new(:scriptAction_3) do
logStartTest("Email_05_01_03_03")
end
tcase << TestAction.new(:gotoApp_3) do
gotoApp('Email')
waitsecond(2)
end
tcase << TestAction.new(:ImageView_Slidedrawerimg_2) do
$ruiObj = RUIObject.new.with('objectid', -431894634).with('selfid', -1542033050).with('textdescid', -503831734).with('uniqueparentid', 0)
.with('uitreeindex', 0)
.with('classname', 'ImageView')
.with('resource-id', 'com.lge.email:id/slidedrawerimg')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_DrawerChildName_11) do
$ruiObj = RUIObject.new.with('objectid', 2119189077).with('selfid', -1379016195).with('textdescid', 1922754213).with('uniqueparentid', 0)
.with('uitreeindex', 12)
.with('classname', 'TextView')
.with('resource-id', 'com.lge.email:id/drawer_child_name')
.with('text', 'Inbox')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:clickXY_444_404_8) do
click(444,404)
waitsecond(1)
end
tcase << TestAction.new(:Button_Btnatntbottomdelete_2) do
$ruiObj = RUIObject.new.with('objectid', -2098725759).with('selfid', 480632483).with('textdescid', 1124287286).with('uniqueparentid', 0)
.with('uitreeindex', 19)
.with('classname', 'Button')
.with('resource-id', 'com.lge.email:id/btnAtntBottomDelete')
.with('text', 'DELETE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Button1_4) do
$ruiObj = RUIObject.new.with('objectid', 892548796).with('selfid', 982364851).with('textdescid', 658117233).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'DELETE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_8_1_1) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "Email not opened"
end
logStopTest("Email_05_01_03_03")
end
tcase << TestAction.new(:pressBack_1) do
pressBack
end
tcase << TestAction.new(:pressBack_2) do
pressBack
end
tcase.run(loopTime)
end
def self.GPU_WebCrawler(loopTime)
tcase = TestCase.new("GPU_WebCrawler")
tcase << TestAction.new(:gotoApp_2) do
gotoApp('WebCrawler')
waitsecond(2)
end
tcase << TestAction.new(:Button_Start_6) do
$ruiObj = RUIObject.new.with('objectid', 759506754).with('selfid', 1749104131).with('textdescid', 384870857).with('uniqueparentid', 0).with('classresourceid', -53051820)
.with('uitreeindex', 3)
.with('classname', 'Button')
.with('resource-id', 'com.android.webcrawler:id/start')
.with('text', 'Start Crawling')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:wait32second_9) do
waitsecond(100)
end
tcase << TestAction.new(:pressBack_11) do
pressBack
waitsecond(2)
end
tcase << TestAction.new(:pressBack_2) do
pressBack
waitsecond(2)
end
tcase.run(loopTime)
end
def self.Gmail_05_01_03_01(loopTime)
tcase = TestCase.new("Gmail_05_01_03_01")
tcase << TestAction.new(:pressHome_2) do
pressHome
end
tcase << TestAction.new(:scriptAction_12_1) do
logStartTest("Gmail_05_01_03_01")
end
tcase << TestAction.new(:scriptAction_2) do
gotoAppByAppDrawer("Gmail")
waitsecond(2)
end
tcase << TestAction.new(:ImageButton_ComposeButton_2) do
$ruiObj = RUIObject.new.with('objectid', 2010391035).with('selfid', 1808564263).with('textdescid', -481574643).with('uniqueparentid', 0)
.with('uitreeindex', 26)
.with('classname', 'ImageButton')
.with('resource-id', 'com.google.android.gm:id/compose_button')
.with('content-desc', 'Compose')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:MultiAutoCompleteTextView_To_5) 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@gmail.com')
waitsecond(2)
end
tcase << TestAction.new(:pressEnter_3) do
pressEnter
end
tcase << TestAction.new(:EditText_Subject_6) do
$ruiObj = RUIObject.new.with('objectid', 1144045145).with('selfid', -477614756).with('textdescid', 1105661159).with('uniqueparentid', 0).with('classresourceid', 927865352)
.with('uitreeindex', 12)
.with('classname', 'EditText')
.with('resource-id', 'com.google.android.gm:id/subject')
$ruiObj.inputtext('Email Test')
waitsecond(1)
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_14) do
$ruiObj.inputtext('Testing UiEngine Email Test!!!')
end
tcase << TestAction.new(:TextView_Send_10) do
$ruiObj = RUIObject.new.with('objectid', 1131985907).with('selfid', 2103341243).with('textdescid', -1405558155).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(1)
end
tcase << TestAction.new(:ImageButton_ComposeButton_12) do
$ruiObj = RUIObject.new.with('objectid', 2010391035).with('selfid', 1808564263).with('textdescid', -481574643).with('uniqueparentid', 0)
.with('uitreeindex', 26)
.with('classname', 'ImageButton')
.with('resource-id', 'com.google.android.gm:id/compose_button')
.with('content-desc', 'Compose')
$ruiObj.isExist
waitsecond(1)
end
tcase << TestAction.new(:ImageButton_Open_8) do
$ruiObj = RUIObject.new.with('objectid', -1013150848).with('selfid', 1589392844).with('textdescid', -993230041).with('uniqueparentid', 0)
.with('uitreeindex', 0)
.with('classname', 'ImageButton')
.with('content-desc', 'Open navigation drawer')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:clickXY_388_1968_16) do
click(388,1968)
waitsecond(2)
end
tcase << TestAction.new(:clickXY_428_768_19) do
click(428,768)
waitsecond(2)
end
tcase << TestAction.new(:TextView_Delete_4) do
$ruiObj = RUIObject.new.with('objectid', 1211721173).with('selfid', -390800203).with('textdescid', -538482442).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'TextView')
.with('resource-id', 'com.google.android.gm:id/delete')
.with('content-desc', 'Delete')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_8) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "Email not sent"
end
logStopTest("Email_05_01_03_01")
end
tcase << TestAction.new(:pressBack_3) do
pressBack
end
tcase << TestAction.new(:pressBack_4) do
pressBack
end
tcase << TestAction.new(:pressHome_21) do
pressHome
waitsecond(2)
end
tcase.run(loopTime)
end
def self.Gmail_05_01_03_02(loopTime)
tcase = TestCase.new("Gmail_05_01_03_02")
tcase << TestAction.new(:scriptAction_12) do
logStartTest("Email_05_01_03_02")
end
tcase << TestAction.new(:gotoApp_2) do
gotoApp('Gmail')
waitsecond(2)
end
tcase << TestAction.new(:ImageButton_ComposeButton_2) do
$ruiObj = RUIObject.new.with('objectid', 2010391035).with('selfid', 1808564263).with('textdescid', -481574643).with('uniqueparentid', 0)
.with('uitreeindex', 24)
.with('classname', 'ImageButton')
.with('resource-id', 'com.google.android.gm:id/compose_button')
.with('content-desc', 'Compose')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:MultiAutoCompleteTextView_To_49) 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@gmail.com')
waitsecond(2)
end
tcase << TestAction.new(:pressEnter_7) do
pressEnter
waitsecond(1)
end
tcase << TestAction.new(:EditText_Subject_9) do
$ruiObj = RUIObject.new.with('objectid', 1144045145).with('selfid', -477614756).with('textdescid', 1105661159).with('uniqueparentid', 0).with('classresourceid', 927865352)
.with('uitreeindex', 12)
.with('classname', 'EditText')
.with('resource-id', 'com.google.android.gm:id/subject')
$ruiObj.inputtext('Email Test')
waitsecond(1)
end
tcase << TestAction.new(:View_Compose_2) 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_14) do
$ruiObj.inputtext('Testing UiEngine Email Test!!!')
end
tcase << TestAction.new(:TextView_AddAttachment_13) do
$ruiObj = RUIObject.new.with('objectid', 915724844).with('selfid', 1566257663).with('textdescid', -1753719389).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'com.google.android.gm:id/add_attachment')
.with('content-desc', 'Attach file')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_Title_4) do
$ruiObj = RUIObject.new.with('objectid', 665784376).with('selfid', -1478650284).with('textdescid', 1395090321).with('uniqueparentid', 0).with('classresourceid', -1261418567)
.with('uitreeindex', 0)
.with('classname', 'TextView')
.with('resource-id', 'com.google.android.gm:id/title')
.with('text', 'Attach file')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ImageButton_Show_2) do
$ruiObj = RUIObject.new.with('objectid', -1807230859).with('selfid', -929198491).with('textdescid', 629574489).with('uniqueparentid', 0)
.with('uitreeindex', 0)
.with('classname', 'ImageButton')
.with('content-desc', 'Show roots')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_Title_42) do
$ruiObj = RUIObject.new.with('objectid', -1941383373).with('selfid', 4082754).with('textdescid', 50769842).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 36)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Photos')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:swipeDown_2) do
swipe_vertical 500
waitsecond(2)
end
tcase << TestAction.new(:TextView_Title_6) do
$ruiObj = RUIObject.new.with('objectid', -2074516409).with('selfid', -1484513934).with('textdescid', 889140747).with('uniqueparentid', 0)
.with('uitreeindex', 17)
.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_212_676_8) do
click(212,676)
waitsecond(2)
end
tcase << TestAction.new(:TextView_DoneButton_10) do
$ruiObj = RUIObject.new.with('objectid', -1196413518).with('selfid', -885365197).with('textdescid', 314590734).with('uniqueparentid', 0)
.with('uitreeindex', 12)
.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_PermissionAllowButton_18) 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(2)
end
tcase << TestAction.new(:TextView_Send_23) do
$ruiObj = RUIObject.new.with('objectid', 1131985907).with('selfid', 2103341243).with('textdescid', -1405558155).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(8)
end
tcase << TestAction.new(:ImageButton_ComposeButton_25) do
$ruiObj = RUIObject.new.with('objectid', 2010391035).with('selfid', 1808564263).with('textdescid', -481574643).with('uniqueparentid', 0)
.with('uitreeindex', 23)
.with('classname', 'ImageButton')
.with('resource-id', 'com.google.android.gm:id/compose_button')
.with('content-desc', 'Compose')
$ruiObj.isExist
waitsecond(1)
end
tcase << TestAction.new(:ImageButton_Open_12) do
$ruiObj = RUIObject.new.with('objectid', -1013150848).with('selfid', 1589392844).with('textdescid', -993230041).with('uniqueparentid', 0)
.with('uitreeindex', 0)
.with('classname', 'ImageButton')
.with('content-desc', 'Open navigation drawer')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:clickXY_3645_1989_4) do
click(364.5,1989)
waitsecond(2)
end
tcase << TestAction.new(:clickXY_612_513_6) do
click(612,513)
waitsecond(2)
end
tcase << TestAction.new(:TextView_Delete_36) do
$ruiObj = RUIObject.new.with('objectid', -15615667).with('selfid', -390800203).with('textdescid', -1373012866).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'TextView')
.with('resource-id', 'com.google.android.gm:id/delete')
.with('content-desc', 'Delete')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_8) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "Email not sent"
end
logStopTest("Email_05_01_03_02")
end
tcase << TestAction.new(:pressBack_3) do
pressBack
end
tcase << TestAction.new(:pressBack_4) do
pressBack
end
tcase << TestAction.new(:pressHome_2) do
pressHome
waitsecond(2)
end
tcase.run(loopTime)
end
def self.Gmail_05_01_03_03(loopTime)
tcase = TestCase.new("Gmail_05_01_03_03")
tcase << TestAction.new(:scriptAction_3) do
logStartTest("Email_05_01_03_03")
end
tcase << TestAction.new(:gotoApp_2) do
gotoApp('Gmail')
waitsecond(2)
end
tcase << TestAction.new(:ImageButton_Open_2) do
$ruiObj = RUIObject.new.with('objectid', -1013150848).with('selfid', 1589392844).with('textdescid', -993230041).with('uniqueparentid', 0)
.with('uitreeindex', 0)
.with('classname', 'ImageButton')
.with('content-desc', 'Open navigation drawer')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_Name_2) do
$ruiObj = RUIObject.new.with('objectid', -630461263).with('selfid', -610816808).with('textdescid', 727067449).with('uniqueparentid', 0).with('classresourceid', 790406410)
.with('uitreeindex', 26)
.with('classname', 'TextView')
.with('resource-id', 'com.google.android.gm:id/name')
.with('text', 'Sent')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:clickXY_204_882_4_1) do
click(204,882)
waitsecond(2)
end
tcase << TestAction.new(:TextView_Delete_10) do
$ruiObj = RUIObject.new.with('objectid', -15615667).with('selfid', -390800203).with('textdescid', -1373012866).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'com.google.android.gm:id/delete')
.with('content-desc', 'Delete')
$ruiObj.isExist
end
tcase << TestAction.new(:TextView_Delete_4) do
$ruiObj = RUIObject.new.with('objectid', -412958372).with('selfid', -390800203).with('textdescid', 751768911).with('uniqueparentid', 0)
.with('uitreeindex', 19)
.with('classname', 'TextView')
.with('resource-id', 'com.google.android.gm:id/delete')
.with('content-desc', 'Delete')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_8_1_1) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "Email not opened"
end
logStopTest("Email_05_01_03_03")
end
tcase << TestAction.new(:pressBack_1) do
pressBack
end
tcase << TestAction.new(:pressBack_2) do
pressBack
end
tcase << TestAction.new(:pressHome_4) do
pressHome
waitsecond(2)
end
tcase.run(loopTime)
end
def self.IP_Messaging_05_01_15_01(loopTime)
tcase = TestCase.new("IP_Messaging_05_01_15_01")
tcase << TestAction.new(:scriptAction_2_1) do
sendBTCmd('enableIPME')
waitsecond(32)
end
tcase << TestAction.new(:pressHome_2) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_Messaging_4) do
$ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 3320718).with('textdescid', -234290576).with('uniqueparentid', 0)
.with('uitreeindex', 21)
.with('classname', 'TextView')
.with('content-desc', 'Messaging')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_BtnNext_2) do
$ruiObj = RUIObject.new.with('objectid', 1107740704).with('selfid', 81663352).with('textdescid', -610328691).with('uniqueparentid', 0)
.with('uitreeindex', 9)
.with('classname', 'Button')
.with('resource-id', 'com.android.mms:id/btn_next')
.with('text', 'NEXT')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_BtnOk_4) do
$ruiObj = RUIObject.new.with('objectid', -990941636).with('selfid', -831128438).with('textdescid', -958026272).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'Button')
.with('resource-id', 'com.android.mms:id/btn_ok')
.with('text', 'OK')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_23_1) do
logStartTest("IP_Messaging_05_01_15_01")
end
tcase << TestAction.new(:ImageView_FabImg_1) do
$ruiObj = RUIObject.new.with('objectid', -547009504).with('selfid', 1638137891).with('textdescid', 1140939687).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(:ImageButton_Contacts_3) do
$ruiObj = RUIObject.new.with('objectid', 1335477529).with('selfid', -358910880).with('textdescid', -1222569702).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'ImageButton')
.with('content-desc', 'Contacts')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_Tabtext_5) do
$ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'TextView')
.with('resource-id', 'com.android.contacts:id/tabText')
.with('text', 'Contacts')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:EditText_SearchSrcText_7) do
$ruiObj = RUIObject.new.with('objectid', 730626617).with('selfid', 1544702019).with('textdescid', 666805559).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'EditText')
.with('resource-id', 'android:id/search_src_text')
.with('content-desc', 'Search query')
$ruiObj.inputtext('A01 A01')
waitsecond(2)
end
tcase << TestAction.new(:CheckBox_9) do
$ruiObj = RUIObject.new.with('objectid', -1069035300).with('selfid', 1601505219).with('textdescid', 1219644100).with('uniqueparentid', 0).with('classresourceid', 1601505219)
.with('uitreeindex', 9)
.with('classname', 'CheckBox')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_BtnDone_11) do
$ruiObj = RUIObject.new.with('objectid', -1556636391).with('selfid', 670758290).with('textdescid', -1253568745).with('uniqueparentid', 0)
.with('uitreeindex', 16)
.with('classname', 'Button')
.with('resource-id', 'com.android.contacts:id/btn_done')
.with('text', 'DONE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:EditText_Enter_8_1) do
$ruiObj = RUIObject.new.with('objectid', -1637280020).with('selfid', -454502120).with('textdescid', -1217933909).with('uniqueparentid', 0).with('classresourceid', 1666676343)
.with('uitreeindex', 5)
.with('classname', 'EditText')
.with('content-desc', 'Enter message')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_28) do
$ruiObj.inputtext('AbcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzaaaaaaaaaabbbbbbbbbbccccccccccCCCCCCCCCCCCCCCCcccccccccccccccccccccccc')
waitsecond(2)
end
tcase << TestAction.new(:Button_SendButtonText_2) do
$ruiObj = RUIObject.new.with('objectid', 353843972).with('selfid', 742186862).with('textdescid', -1914765924).with('uniqueparentid', 0)
.with('uitreeindex', 8)
.with('classname', 'Button')
.with('resource-id', 'com.android.mms:id/send_button_text')
.with('content-desc', 'Send')
.with('text', 'Send')
$ruiObj.click
waitsecond(8)
end
tcase << TestAction.new(:TextView_TimestampView_9_1_1) do
$ruiObj = RUIObject.new.with('objectid', -1781739976).with('selfid', -108293667).with('textdescid', -1885854450).with('uniqueparentid', 0).with('classresourceid', 1659956455)
.with('uitreeindex', 11)
.with('classname', 'TextView')
.with('resource-id', 'com.android.mms:id/timestamp_view')
.with('text', 'Sending')
$ruiObj.isNotExist
end
tcase << TestAction.new(:scriptAction_2) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "Unable to send message"
end
logStopTest("IP_Messaging_05_01_15_01")
end
tcase << TestAction.new(:pressBack_2) do
pressBack
waitsecond(2)
end
tcase << TestAction.new(:pressBack_4) do
pressBack
waitsecond(2)
end
tcase << TestAction.new(:TextView_Delete_6) do
$ruiObj = RUIObject.new.with('objectid', -1337172653).with('selfid', 1644806947).with('textdescid', -2074083528).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('content-desc', 'Delete')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Button1_8) do
$ruiObj = RUIObject.new.with('objectid', -1505530336).with('selfid', 982364851).with('textdescid', 652125653).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'DELETE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:pressBack_10) do
pressBack
waitsecond(2)
end
tcase.run(loopTime)
end
def self.IP_Messaging_05_01_15_02(loopTime)
tcase = TestCase.new("IP_Messaging_05_01_15_02")
tcase << TestAction.new(:scriptAction_2) do
sendBTCmd('disableIPME')
waitsecond(32)
end
tcase << TestAction.new(:pressHome_2) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_Messaging_4) do
$ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 3320718).with('textdescid', -234290576).with('uniqueparentid', 0)
.with('uitreeindex', 22)
.with('classname', 'TextView')
.with('content-desc', 'Messaging')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_23_1_1) do
logStartTest("IP_Messaging_05_01_15_02")
waitsecond(2)
end
tcase << TestAction.new(:ImageView_FabImg_1) do
$ruiObj = RUIObject.new.with('objectid', -547009504).with('selfid', 1638137891).with('textdescid', 1140939687).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(:ImageButton_Contacts_3) do
$ruiObj = RUIObject.new.with('objectid', 1335477529).with('selfid', -358910880).with('textdescid', -1222569702).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'ImageButton')
.with('content-desc', 'Contacts')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_Tabtext_5) do
$ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'TextView')
.with('resource-id', 'com.android.contacts:id/tabText')
.with('text', 'Contacts')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:EditText_SearchSrcText_7) do
$ruiObj = RUIObject.new.with('objectid', 730626617).with('selfid', 1544702019).with('textdescid', 666805559).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'EditText')
.with('resource-id', 'android:id/search_src_text')
.with('content-desc', 'Search query')
$ruiObj.inputtext('A01 A01')
waitsecond(2)
end
tcase << TestAction.new(:CheckBox_9) do
$ruiObj = RUIObject.new.with('objectid', -1069035300).with('selfid', 1601505219).with('textdescid', 1219644100).with('uniqueparentid', 0).with('classresourceid', 1601505219)
.with('uitreeindex', 9)
.with('classname', 'CheckBox')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_BtnDone_11) do
$ruiObj = RUIObject.new.with('objectid', -1556636391).with('selfid', 670758290).with('textdescid', -1253568745).with('uniqueparentid', 0)
.with('uitreeindex', 16)
.with('classname', 'Button')
.with('resource-id', 'com.android.contacts:id/btn_done')
.with('text', 'DONE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:EditText_Enter_8_1) do
$ruiObj = RUIObject.new.with('objectid', -1637280020).with('selfid', -454502120).with('textdescid', -1217933909).with('uniqueparentid', 0).with('classresourceid', 1666676343)
.with('uitreeindex', 5)
.with('classname', 'EditText')
.with('content-desc', 'Enter message')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_28) do
$ruiObj.inputtext('AbcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzaaaaaaaaaabbbbbbbbbbccccccccccCCCCCCCCCCCCCCCCcccccccccccccccccccccccc')
waitsecond(8)
end
tcase << TestAction.new(:Button_SendButtonText_2) do
$ruiObj = RUIObject.new.with('objectid', 353843972).with('selfid', 742186862).with('textdescid', -1914765924).with('uniqueparentid', 0)
.with('uitreeindex', 8)
.with('classname', 'Button')
.with('resource-id', 'com.android.mms:id/send_button_text')
.with('content-desc', 'Send')
.with('text', 'Send')
$ruiObj.click
waitsecond(8)
end
tcase << TestAction.new(:Button_SendButtonText_2_1_1) do
$ruiObj = RUIObject.new.with('objectid', 353843972).with('selfid', 742186862).with('textdescid', -1914765924).with('uniqueparentid', 0)
.with('uitreeindex', 8)
.with('classname', 'Button')
.with('resource-id', 'com.android.mms:id/send_button_text')
.with('content-desc', 'Send')
.with('text', 'Send')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_TimestampView_9_1_1_1) do
$ruiObj = RUIObject.new.with('objectid', -1781739976).with('selfid', -108293667).with('textdescid', -1885854450).with('uniqueparentid', 0).with('classresourceid', 1659956455)
.with('uitreeindex', 11)
.with('classname', 'TextView')
.with('resource-id', 'com.android.mms:id/timestamp_view')
.with('text', 'Sending')
$ruiObj.isNotExist
end
tcase << TestAction.new(:scriptAction_2_1) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "Unable to send message"
end
logStopTest("IP_Messaging_05_01_15_02")
end
tcase << TestAction.new(:pressBack_2) do
pressBack
waitsecond(2)
end
tcase << TestAction.new(:pressBack_4) do
pressBack
waitsecond(2)
end
tcase << TestAction.new(:TextView_Delete_6) do
$ruiObj = RUIObject.new.with('objectid', -1337172653).with('selfid', 1644806947).with('textdescid', -2074083528).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('content-desc', 'Delete')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Button1_8) do
$ruiObj = RUIObject.new.with('objectid', -1505530336).with('selfid', 982364851).with('textdescid', 652125653).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'DELETE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:pressBack_10) do
pressBack
waitsecond(2)
end
tcase.run(loopTime)
end
def self.IP_Messaging_05_01_15_03(loopTime)
tcase = TestCase.new("IP_Messaging_05_01_15_03")
tcase << TestAction.new(:scriptAction_2) do
sendBTCmd('enableIPME')
waitsecond(32)
end
tcase << TestAction.new(:pressHome_2) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_Messaging_4) do
$ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 3320718).with('textdescid', -234290576).with('uniqueparentid', 0)
.with('uitreeindex', 22)
.with('classname', 'TextView')
.with('content-desc', 'Messaging')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_23_1_1_1) do
logStartTest("IP_Messaging_05_01_15_03")
end
tcase << TestAction.new(:ImageView_FabImg_1) do
$ruiObj = RUIObject.new.with('objectid', -547009504).with('selfid', 1638137891).with('textdescid', 1140939687).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(:ImageButton_Contacts_3) do
$ruiObj = RUIObject.new.with('objectid', 1335477529).with('selfid', -358910880).with('textdescid', -1222569702).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'ImageButton')
.with('content-desc', 'Contacts')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_Tabtext_5) do
$ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'TextView')
.with('resource-id', 'com.android.contacts:id/tabText')
.with('text', 'Contacts')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:EditText_SearchSrcText_7) do
$ruiObj = RUIObject.new.with('objectid', 730626617).with('selfid', 1544702019).with('textdescid', 666805559).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'EditText')
.with('resource-id', 'android:id/search_src_text')
.with('content-desc', 'Search query')
$ruiObj.inputtext('A01 A01')
waitsecond(2)
end
tcase << TestAction.new(:CheckBox_9) do
$ruiObj = RUIObject.new.with('objectid', -1069035300).with('selfid', 1601505219).with('textdescid', 1219644100).with('uniqueparentid', 0).with('classresourceid', 1601505219)
.with('uitreeindex', 9)
.with('classname', 'CheckBox')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_BtnDone_11) do
$ruiObj = RUIObject.new.with('objectid', -1556636391).with('selfid', 670758290).with('textdescid', -1253568745).with('uniqueparentid', 0)
.with('uitreeindex', 16)
.with('classname', 'Button')
.with('resource-id', 'com.android.contacts:id/btn_done')
.with('text', 'DONE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ImageButton_AttachbuttonRight_2) do
$ruiObj = RUIObject.new.with('objectid', 874172794).with('selfid', -1211001229).with('textdescid', -704319221).with('uniqueparentid', 0)
.with('uitreeindex', 10)
.with('classname', 'ImageButton')
.with('resource-id', 'com.android.mms:id/attachButton_right')
.with('content-desc', 'Attach')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_Text1_12) do
$ruiObj = RUIObject.new.with('objectid', 1787472427).with('selfid', -1526977978).with('textdescid', -1236046150).with('uniqueparentid', 0)
.with('uitreeindex', 6)
.with('classname', 'TextView')
.with('resource-id', 'com.android.mms:id/text1')
.with('text', 'Video')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_PermissionAllowButton_2) do
$ruiObj = RUIObject.new.with('objectid', -886457929).with('selfid', 1443382411).with('textdescid', 270556320).with('uniqueparentid', 0)
.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(:clickXY_1276_1572_44) do
click(1276,1572)
waitsecond(2)
end
tcase << TestAction.new(:ImageButton_Show_14) 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(2)
end
tcase << TestAction.new(:TextView_Title_21) do
$ruiObj = RUIObject.new.with('objectid', -1941383373).with('selfid', 4082754).with('textdescid', 50769842).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 50)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Photos')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_Title_4) do
$ruiObj = RUIObject.new.with('objectid', -2074516409).with('selfid', 1224707480).with('textdescid', 1793532939).with('uniqueparentid', 0)
.with('uitreeindex', 14)
.with('classname', 'TextView')
.with('resource-id', 'com.google.android.apps.photos:id/title')
.with('text', '10M')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:clickXY_228_788_6) do
click(228,788)
waitsecond(2)
end
tcase << TestAction.new(:Button_Button1_86) do
$ruiObj = RUIObject.new.with('objectid', -1505530336).with('selfid', 1382949486).with('textdescid', 185347450).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'REDUCE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_PermissionAllowButton_10) do
$ruiObj = RUIObject.new.with('objectid', -886457929).with('selfid', 1443382411).with('textdescid', 270556320).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'Button')
.with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
.with('text', 'ALLOW')
$ruiObj.click
waitsecond(4)
end
tcase << TestAction.new(:pressEnter_5) do
pressEnter
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_8) do
pressDPadRight
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_8_1) do
pressDPadRight
waitsecond(2)
end
tcase << TestAction.new(:pressEnter_11) do
pressEnter
waitsecond(2)
end
tcase << TestAction.new(:Button_SendButtonText_2) do
$ruiObj = RUIObject.new.with('objectid', 353843972).with('selfid', 742186862).with('textdescid', -1914765924).with('uniqueparentid', 0)
.with('uitreeindex', 8)
.with('classname', 'Button')
.with('resource-id', 'com.android.mms:id/send_button_text')
.with('content-desc', 'Send')
.with('text', 'Send')
$ruiObj.click
waitsecond(8)
end
tcase << TestAction.new(:TextView_TimestampView_9_1_1_1_1) do
$ruiObj = RUIObject.new.with('objectid', -1781739976).with('selfid', -108293667).with('textdescid', -1885854450).with('uniqueparentid', 0).with('classresourceid', 1659956455)
.with('uitreeindex', 11)
.with('classname', 'TextView')
.with('resource-id', 'com.android.mms:id/timestamp_view')
.with('text', 'Sending')
$ruiObj.isNotExist
end
tcase << TestAction.new(:scriptAction_2_1_1) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "Unable to send message"
end
logStopTest("IP_Messaging_05_01_15_03")
end
tcase << TestAction.new(:pressBack_2) do
pressBack
waitsecond(2)
end
tcase << TestAction.new(:pressBack_4) do
pressBack
waitsecond(2)
end
tcase << TestAction.new(:TextView_Delete_6) do
$ruiObj = RUIObject.new.with('objectid', -1337172653).with('selfid', 1644806947).with('textdescid', -2074083528).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('content-desc', 'Delete')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Button1_8) do
$ruiObj = RUIObject.new.with('objectid', -1505530336).with('selfid', 982364851).with('textdescid', 652125653).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'DELETE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:pressBack_10) do
pressBack
waitsecond(2)
end
tcase.run(loopTime)
end
def self.IP_Messaging_05_01_15_04(loopTime)
tcase = TestCase.new("IP_Messaging_05_01_15_04")
tcase << TestAction.new(:scriptAction_2) do
sendBTCmd('disableIPME')
waitsecond(32)
end
tcase << TestAction.new(:pressHome_2) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_Messaging_4) do
$ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 3320718).with('textdescid', -234290576).with('uniqueparentid', 0)
.with('uitreeindex', 22)
.with('classname', 'TextView')
.with('content-desc', 'Messaging')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_23_1_1_1_1) do
logStartTest("IP_Messaging_05_01_15_04")
end
tcase << TestAction.new(:ImageView_FabImg_1) do
$ruiObj = RUIObject.new.with('objectid', -547009504).with('selfid', 1638137891).with('textdescid', 1140939687).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(:ImageButton_Contacts_3) do
$ruiObj = RUIObject.new.with('objectid', 1335477529).with('selfid', -358910880).with('textdescid', -1222569702).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'ImageButton')
.with('content-desc', 'Contacts')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_Tabtext_5) do
$ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'TextView')
.with('resource-id', 'com.android.contacts:id/tabText')
.with('text', 'Contacts')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:EditText_SearchSrcText_7) do
$ruiObj = RUIObject.new.with('objectid', 730626617).with('selfid', 1544702019).with('textdescid', 666805559).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'EditText')
.with('resource-id', 'android:id/search_src_text')
.with('content-desc', 'Search query')
$ruiObj.inputtext('A01 A01')
waitsecond(2)
end
tcase << TestAction.new(:CheckBox_9) do
$ruiObj = RUIObject.new.with('objectid', -1069035300).with('selfid', 1601505219).with('textdescid', 1219644100).with('uniqueparentid', 0).with('classresourceid', 1601505219)
.with('uitreeindex', 9)
.with('classname', 'CheckBox')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_BtnDone_11) do
$ruiObj = RUIObject.new.with('objectid', -1556636391).with('selfid', 670758290).with('textdescid', -1253568745).with('uniqueparentid', 0)
.with('uitreeindex', 16)
.with('classname', 'Button')
.with('resource-id', 'com.android.contacts:id/btn_done')
.with('text', 'DONE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ImageButton_AttachbuttonRight_2) do
$ruiObj = RUIObject.new.with('objectid', 874172794).with('selfid', -1211001229).with('textdescid', -704319221).with('uniqueparentid', 0)
.with('uitreeindex', 10)
.with('classname', 'ImageButton')
.with('resource-id', 'com.android.mms:id/attachButton_right')
.with('content-desc', 'Attach')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_Text1_2) do
$ruiObj = RUIObject.new.with('objectid', 1787472427).with('selfid', -1538867418).with('textdescid', -1604618790).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'com.android.mms:id/text1')
.with('text', 'Image')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:clickXY_1276_1572_44) do
click(1276,1572)
waitsecond(2)
end
tcase << TestAction.new(:ImageButton_Show_14) 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(2)
end
tcase << TestAction.new(:TextView_Title_27) do
$ruiObj = RUIObject.new.with('objectid', -1941383373).with('selfid', 4082754).with('textdescid', 50769842).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 28)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Photos')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:swipeDown_4) do
swipe_vertical 500
waitsecond(2)
end
tcase << TestAction.new(:TextView_Title_6) do
$ruiObj = RUIObject.new.with('objectid', -2074516409).with('selfid', -1484513934).with('textdescid', 889140747).with('uniqueparentid', 0)
.with('uitreeindex', 21)
.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_228_716_8) do
click(228,716)
waitsecond(2)
end
tcase << TestAction.new(:TextView_DoneButton_2) do
$ruiObj = RUIObject.new.with('objectid', -762684432).with('selfid', -885365197).with('textdescid', -178035440).with('uniqueparentid', 0)
.with('uitreeindex', 10)
.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_SendButtonText_2) do
$ruiObj = RUIObject.new.with('objectid', 353843972).with('selfid', 742186862).with('textdescid', -1914765924).with('uniqueparentid', 0)
.with('uitreeindex', 8)
.with('classname', 'Button')
.with('resource-id', 'com.android.mms:id/send_button_text')
.with('content-desc', 'Send')
.with('text', 'Send')
$ruiObj.click
waitsecond(8)
end
tcase << TestAction.new(:TextView_TimestampView_9_1_1_1_1_1) do
$ruiObj = RUIObject.new.with('objectid', -1781739976).with('selfid', -108293667).with('textdescid', -1885854450).with('uniqueparentid', 0).with('classresourceid', 1659956455)
.with('uitreeindex', 11)
.with('classname', 'TextView')
.with('resource-id', 'com.android.mms:id/timestamp_view')
.with('text', 'Sending')
$ruiObj.isNotExist
end
tcase << TestAction.new(:scriptAction_2_1_1_1) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "Unable to send message"
end
logStopTest("IP_Messaging_05_01_15_04")
end
tcase << TestAction.new(:pressBack_2) do
pressBack
waitsecond(2)
end
tcase << TestAction.new(:pressBack_4) do
pressBack
waitsecond(2)
end
tcase << TestAction.new(:TextView_Delete_6) do
$ruiObj = RUIObject.new.with('objectid', -1337172653).with('selfid', 1644806947).with('textdescid', -2074083528).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('content-desc', 'Delete')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Button1_8) do
$ruiObj = RUIObject.new.with('objectid', -1505530336).with('selfid', 982364851).with('textdescid', 652125653).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'DELETE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:pressBack_10) do
pressBack
waitsecond(2)
end
tcase.run(loopTime)
end
def self.IP_Messaging_05_01_15_05(loopTime)
tcase = TestCase.new("IP_Messaging_05_01_15_05")
tcase << TestAction.new(:scriptAction_2) do
sendBTCmd('enableIPME')
waitsecond(32)
end
tcase << TestAction.new(:pressHome_2) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_Messaging_4) do
$ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 3320718).with('textdescid', -234290576).with('uniqueparentid', 0)
.with('uitreeindex', 22)
.with('classname', 'TextView')
.with('content-desc', 'Messaging')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_23_1_1_1_1_1) do
logStartTest("IP_Messaging_05_01_15_05")
end
tcase << TestAction.new(:ImageView_FabImg_1) do
$ruiObj = RUIObject.new.with('objectid', -547009504).with('selfid', 1638137891).with('textdescid', 1140939687).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(:ImageButton_Contacts_3) do
$ruiObj = RUIObject.new.with('objectid', 1335477529).with('selfid', -358910880).with('textdescid', -1222569702).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'ImageButton')
.with('content-desc', 'Contacts')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_Tabtext_5) do
$ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'TextView')
.with('resource-id', 'com.android.contacts:id/tabText')
.with('text', 'Contacts')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:EditText_SearchSrcText_7) do
$ruiObj = RUIObject.new.with('objectid', 730626617).with('selfid', 1544702019).with('textdescid', 666805559).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'EditText')
.with('resource-id', 'android:id/search_src_text')
.with('content-desc', 'Search query')
$ruiObj.inputtext('A01 A01')
waitsecond(2)
end
tcase << TestAction.new(:CheckBox_9) do
$ruiObj = RUIObject.new.with('objectid', -1069035300).with('selfid', 1601505219).with('textdescid', 1219644100).with('uniqueparentid', 0).with('classresourceid', 1601505219)
.with('uitreeindex', 9)
.with('classname', 'CheckBox')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_BtnDone_11) do
$ruiObj = RUIObject.new.with('objectid', -1556636391).with('selfid', 670758290).with('textdescid', -1253568745).with('uniqueparentid', 0)
.with('uitreeindex', 16)
.with('classname', 'Button')
.with('resource-id', 'com.android.contacts:id/btn_done')
.with('text', 'DONE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:EditText_Enter_8_1) do
$ruiObj = RUIObject.new.with('objectid', -1637280020).with('selfid', -454502120).with('textdescid', -1217933909).with('uniqueparentid', 0).with('classresourceid', 1666676343)
.with('uitreeindex', 5)
.with('classname', 'EditText')
.with('content-desc', 'Enter message')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_28) do
$ruiObj.inputtext('AbcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzaaaaaaaaaabbbbbbbbbbccccccccccCCCCCCCCCCCCCCCCcccccccccccccccccccccccc')
waitsecond(2)
end
tcase << TestAction.new(:Button_SendButtonText_2_1) do
$ruiObj = RUIObject.new.with('objectid', 353843972).with('selfid', 742186862).with('textdescid', -1914765924).with('uniqueparentid', 0)
.with('uitreeindex', 8)
.with('classname', 'Button')
.with('resource-id', 'com.android.mms:id/send_button_text')
.with('content-desc', 'Send')
.with('text', 'Send')
$ruiObj.click
waitsecond(8)
end
tcase << TestAction.new(:TextView_TimestampView_9_1_1_1_1_1_1) do
$ruiObj = RUIObject.new.with('objectid', -1781739976).with('selfid', -108293667).with('textdescid', -1885854450).with('uniqueparentid', 0).with('classresourceid', 1659956455)
.with('uitreeindex', 11)
.with('classname', 'TextView')
.with('resource-id', 'com.android.mms:id/timestamp_view')
.with('text', 'Sending')
$ruiObj.isNotExist
end
tcase << TestAction.new(:scriptAction_2_1_1_1_1) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "Unable to send message"
end
logStopTest("IP_Messaging_05_01_15_05")
end
tcase << TestAction.new(:pressBack_2) do
pressBack
waitsecond(2)
end
tcase << TestAction.new(:pressBack_4) do
pressBack
waitsecond(2)
end
tcase << TestAction.new(:TextView_Delete_6) do
$ruiObj = RUIObject.new.with('objectid', -1337172653).with('selfid', 1644806947).with('textdescid', -2074083528).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('content-desc', 'Delete')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Button1_8) do
$ruiObj = RUIObject.new.with('objectid', -1505530336).with('selfid', 982364851).with('textdescid', 652125653).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'DELETE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:pressBack_10) do
pressBack
waitsecond(2)
end
tcase.run(loopTime)
end
def self.IP_Messaging_05_01_15_06(loopTime)
tcase = TestCase.new("IP_Messaging_05_01_15_06")
tcase << TestAction.new(:scriptAction_2) do
sendBTCmd('enableIPME')
waitsecond(32)
end
tcase << TestAction.new(:pressHome_2) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_Messaging_4) do
$ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 3320718).with('textdescid', -234290576).with('uniqueparentid', 0)
.with('uitreeindex', 22)
.with('classname', 'TextView')
.with('content-desc', 'Messaging')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_23_1_1_1_1_1_1) do
logStartTest("IP_Messaging_05_01_15_06")
end
tcase << TestAction.new(:ImageView_FabImg_1) do
$ruiObj = RUIObject.new.with('objectid', -547009504).with('selfid', 1638137891).with('textdescid', 1140939687).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(:ImageButton_Contacts_3) do
$ruiObj = RUIObject.new.with('objectid', 1335477529).with('selfid', -358910880).with('textdescid', -1222569702).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'ImageButton')
.with('content-desc', 'Contacts')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_Tabtext_5) do
$ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'TextView')
.with('resource-id', 'com.android.contacts:id/tabText')
.with('text', 'Contacts')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:EditText_SearchSrcText_7) do
$ruiObj = RUIObject.new.with('objectid', 730626617).with('selfid', 1544702019).with('textdescid', 666805559).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'EditText')
.with('resource-id', 'android:id/search_src_text')
.with('content-desc', 'Search query')
$ruiObj.inputtext('A01 A01')
waitsecond(2)
end
tcase << TestAction.new(:CheckBox_9) do
$ruiObj = RUIObject.new.with('objectid', -1069035300).with('selfid', 1601505219).with('textdescid', 1219644100).with('uniqueparentid', 0).with('classresourceid', 1601505219)
.with('uitreeindex', 9)
.with('classname', 'CheckBox')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_BtnDone_11) do
$ruiObj = RUIObject.new.with('objectid', -1556636391).with('selfid', 670758290).with('textdescid', -1253568745).with('uniqueparentid', 0)
.with('uitreeindex', 16)
.with('classname', 'Button')
.with('resource-id', 'com.android.contacts:id/btn_done')
.with('text', 'DONE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ImageButton_AttachbuttonRight_2) do
$ruiObj = RUIObject.new.with('objectid', 874172794).with('selfid', -1211001229).with('textdescid', -704319221).with('uniqueparentid', 0)
.with('uitreeindex', 10)
.with('classname', 'ImageButton')
.with('resource-id', 'com.android.mms:id/attachButton_right')
.with('content-desc', 'Attach')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_Text1_12) do
$ruiObj = RUIObject.new.with('objectid', 1787472427).with('selfid', -1526977978).with('textdescid', -1236046150).with('uniqueparentid', 0)
.with('uitreeindex', 6)
.with('classname', 'TextView')
.with('resource-id', 'com.android.mms:id/text1')
.with('text', 'Video')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:clickXY_1276_1572_44) do
click(1276,1572)
waitsecond(2)
end
tcase << TestAction.new(:ImageButton_Show_14) 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(2)
end
tcase << TestAction.new(:TextView_Title_26) do
$ruiObj = RUIObject.new.with('objectid', -1941383373).with('selfid', 4082754).with('textdescid', 50769842).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 50)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Photos')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_Title_4) do
$ruiObj = RUIObject.new.with('objectid', -2074516409).with('selfid', 1224707480).with('textdescid', 1793532939).with('uniqueparentid', 0)
.with('uitreeindex', 14)
.with('classname', 'TextView')
.with('resource-id', 'com.google.android.apps.photos:id/title')
.with('text', '10M')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:clickXY_232_756_6) do
click(232,756)
waitsecond(2)
end
tcase << TestAction.new(:Button_SendButtonText_2) do
$ruiObj = RUIObject.new.with('objectid', -65862371).with('selfid', 742186862).with('textdescid', -119924253).with('uniqueparentid', 0)
.with('uitreeindex', 11)
.with('classname', 'Button')
.with('resource-id', 'com.android.mms:id/send_button_text')
.with('content-desc', 'Send')
.with('text', 'Send')
$ruiObj.click
waitsecond(4)
end
tcase << TestAction.new(:TextView_TimestampView_9_1) do
$ruiObj = RUIObject.new.with('objectid', -1781739976).with('selfid', -108293667).with('textdescid', -1885854450).with('uniqueparentid', 0).with('classresourceid', 1659956455)
.with('uitreeindex', 11)
.with('classname', 'TextView')
.with('resource-id', 'com.android.mms:id/timestamp_view')
.with('text', 'Sending')
$ruiObj.isNotExist
end
tcase << TestAction.new(:scriptAction_2_1_1_1_1_1) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "Unable to send message"
end
logStopTest("IP_Messaging_05_01_15_06")
end
tcase << TestAction.new(:pressBack_2) do
pressBack
waitsecond(2)
end
tcase << TestAction.new(:pressBack_4) do
pressBack
waitsecond(2)
end
tcase << TestAction.new(:TextView_Delete_6) do
$ruiObj = RUIObject.new.with('objectid', -1337172653).with('selfid', 1644806947).with('textdescid', -2074083528).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('content-desc', 'Delete')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Button1_8) do
$ruiObj = RUIObject.new.with('objectid', -1505530336).with('selfid', 982364851).with('textdescid', 652125653).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'DELETE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:pressBack_10) do
pressBack
waitsecond(2)
end
tcase.run(loopTime)
end
def self.IP_Messaging_Precondition(loopTime)
tcase = TestCase.new("IP_Messaging_Precondition")
tcase << TestAction.new(:scriptAction_1) do
enableIPME
waitsecond(2)
end
tcase.run(loopTime)
end
def self.LogEmail(loopTime)
tcase = TestCase.new("LogEmail")
tcase << TestAction.new(:scriptAction_2) do
gotoAppByAppDrawer("File Manager")
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_22) do
logStartTest("LogEmail")
waitsecond(1)
end
tcase << TestAction.new(:Button_PermissionAllowButton_2) 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_Itembtnsearch2_26) do
$ruiObj = RUIObject.new.with('objectid', -1137479519).with('selfid', 1505044783).with('textdescid', -767911833).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'TextView')
.with('resource-id', 'com.lge.filemanager:id/itemBtnSearch2')
.with('content-desc', 'Search')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:EditText_SearchSrcText_30) do
$ruiObj = RUIObject.new.with('objectid', -1213321321).with('selfid', 1544702019).with('textdescid', -1427388391).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'EditText')
.with('resource-id', 'android:id/search_src_text')
.with('content-desc', 'Search query')
$ruiObj.inputtext('.zip')
waitsecond(1)
end
tcase << TestAction.new(:ImageButton_More_32) do
$ruiObj = RUIObject.new.with('objectid', -214112283).with('selfid', 1290820192).with('textdescid', -865461810).with('uniqueparentid', 0)
.with('uitreeindex', 4)
.with('classname', 'ImageButton')
.with('content-desc', 'More options')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_Title_34) do
$ruiObj = RUIObject.new.with('objectid', -1356240983).with('selfid', -342341268).with('textdescid', -1681386946).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Delete')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:CheckBox_SelectallChecbox_36) do
$ruiObj = RUIObject.new.with('objectid', 984117523).with('selfid', -1389118505).with('textdescid', 442872173).with('uniqueparentid', 0)
.with('uitreeindex', 0)
.with('classname', 'CheckBox')
.with('resource-id', 'com.lge.filemanager:id/selectAll_checbox')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_Operationbtn_38) do
$ruiObj = RUIObject.new.with('objectid', -1490691478).with('selfid', -272184408).with('textdescid', -530765793).with('uniqueparentid', 0)
.with('uitreeindex', 15)
.with('classname', 'Button')
.with('resource-id', 'com.lge.filemanager:id/operationBtn')
.with('text', 'DELETE')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_Button1_40) do
$ruiObj = RUIObject.new.with('objectid', 127599303).with('selfid', 982364851).with('textdescid', -1979276420).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(:ImageButton_Navigate_42) do
$ruiObj = RUIObject.new.with('objectid', -1060064684).with('selfid', -123872605).with('textdescid', 1890546750).with('uniqueparentid', 0)
.with('uitreeindex', 0)
.with('classname', 'ImageButton')
.with('content-desc', 'Navigate up')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_ListItemName_24) do
$ruiObj = RUIObject.new.with('objectid', -2080996226).with('selfid', 1832026484).with('textdescid', 1164514280).with('uniqueparentid', 0).with('classresourceid', 1688608520)
.with('uitreeindex', 19)
.with('classname', 'TextView')
.with('resource-id', 'com.lge.filemanager:id/list_item_name')
.with('text', 'uiengine')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_ListItemName_7) do
$ruiObj = RUIObject.new.with('objectid', -2080996226).with('selfid', 2088116454).with('textdescid', -1636544578).with('uniqueparentid', 0).with('classresourceid', 1688608520)
.with('uitreeindex', 11)
.with('classname', 'TextView')
.with('resource-id', 'com.lge.filemanager:id/list_item_name')
.with('text', 'log')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:ImageButton_More_28) do
$ruiObj = RUIObject.new.with('objectid', -214112283).with('selfid', 1290820192).with('textdescid', -865461810).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'ImageButton')
.with('content-desc', 'More options')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_Title_30) do
$ruiObj = RUIObject.new.with('objectid', -1356240983).with('selfid', 303547107).with('textdescid', -1943769817).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 4)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Compress')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:CheckBox_SelectallChecbox_9) do
$ruiObj = RUIObject.new.with('objectid', 984117523).with('selfid', -1389118505).with('textdescid', 442872173).with('uniqueparentid', 0)
.with('uitreeindex', 0)
.with('classname', 'CheckBox')
.with('resource-id', 'com.lge.filemanager:id/selectAll_checbox')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_Operationbtn_32) do
$ruiObj = RUIObject.new.with('objectid', -1490691478).with('selfid', -995188193).with('textdescid', -3468600).with('uniqueparentid', 0)
.with('uitreeindex', 44)
.with('classname', 'Button')
.with('resource-id', 'com.lge.filemanager:id/operationBtn')
.with('text', 'COMPRESS')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:EditText_Edittext_34) do
$ruiObj = RUIObject.new.with('objectid', -1189526610).with('selfid', -1779322854).with('textdescid', 1779380786).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'EditText')
.with('resource-id', 'com.lge.filemanager:id/editText')
$ruiObj.inputtext('MTBFLogFile')
waitsecond(1)
end
tcase << TestAction.new(:Button_Button1_36) do
$ruiObj = RUIObject.new.with('objectid', 127599303).with('selfid', -16411515).with('textdescid', -837477462).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'SAVE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_Itembtndelete2_11) do
$ruiObj = RUIObject.new.with('objectid', -1555345154).with('selfid', 1698644431).with('textdescid', -225379347).with('uniqueparentid', 0)
.with('uitreeindex', 4)
.with('classname', 'TextView')
.with('resource-id', 'com.lge.filemanager:id/itemBtnDelete2')
.with('content-desc', 'Delete')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:CheckBox_SelectallChecbox_13) do
$ruiObj = RUIObject.new.with('objectid', 984117523).with('selfid', -1389118505).with('textdescid', 442872173).with('uniqueparentid', 0)
.with('uitreeindex', 0)
.with('classname', 'CheckBox')
.with('resource-id', 'com.lge.filemanager:id/selectAll_checbox')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_ListItemName_15) do
$ruiObj = RUIObject.new.with('objectid', -2080996226).with('selfid', 1066717162).with('textdescid', -1346398414).with('uniqueparentid', 0).with('classresourceid', 1688608520)
.with('uitreeindex', 9)
.with('classname', 'TextView')
.with('resource-id', 'com.lge.filemanager:id/list_item_name')
.with('text', 'MTBFLogFilezip')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_Operationbtn_17) do
$ruiObj = RUIObject.new.with('objectid', -1490691478).with('selfid', -272184408).with('textdescid', -530765793).with('uniqueparentid', 0)
.with('uitreeindex', 44)
.with('classname', 'Button')
.with('resource-id', 'com.lge.filemanager:id/operationBtn')
.with('text', 'DELETE')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_Button1_19) do
$ruiObj = RUIObject.new.with('objectid', 127599303).with('selfid', 982364851).with('textdescid', -1979276420).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(:gotoApp_1_1) do
gotoApp('Gmail')
waitsecond(1)
end
tcase << TestAction.new(:ImageButton_ComposeButton_2) do
$ruiObj = RUIObject.new.with('objectid', 1598291378).with('selfid', 1808564263).with('textdescid', -1604213756).with('uniqueparentid', 0)
.with('uitreeindex', 18)
.with('classname', 'ImageButton')
.with('resource-id', 'com.google.android.gm:id/compose_button')
.with('content-desc', 'Compose')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:MultiAutoCompleteTextView_To_4) 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('yoonsuk.chang@lge.com')
waitsecond(1)
end
tcase << TestAction.new(:pressEnter_44) do
pressEnter
waitsecond(1)
end
tcase << TestAction.new(:ImageView_AddCcBcc_6) do
$ruiObj = RUIObject.new.with('objectid', -1659747146).with('selfid', 144507110).with('textdescid', 158677308).with('uniqueparentid', 0).with('classresourceid', -815116690)
.with('uitreeindex', 10)
.with('pretext', 'yongjuncparklgecom')
.with('classname', 'ImageView')
.with('resource-id', 'com.google.android.gm:id/add_cc_bcc')
.with('content-desc', 'Add Cc/Bcc')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:MultiAutoCompleteTextView_Cc_8) do
$ruiObj = RUIObject.new.with('objectid', 1252933481).with('selfid', 678760916).with('textdescid', 186232279).with('uniqueparentid', 0).with('classresourceid', 1488874976)
.with('uitreeindex', 12)
.with('classname', 'MultiAutoCompleteTextView')
.with('resource-id', 'com.google.android.gm:id/cc')
$ruiObj.inputtext('yoonsuk.chang@lge.com')
waitsecond(1)
end
tcase << TestAction.new(:pressEnter_50) do
pressEnter
waitsecond(1)
end
tcase << TestAction.new(:EditText_Subject_10) do
$ruiObj = RUIObject.new.with('objectid', 524508352).with('selfid', -477614756).with('textdescid', -920110240).with('uniqueparentid', 0).with('classresourceid', 927865352)
.with('uitreeindex', 17)
.with('classname', 'EditText')
.with('resource-id', 'com.google.android.gm:id/subject')
$ruiObj.inputtext('MTBF Test Log')
waitsecond(1)
end
tcase << TestAction.new(:TextView_AddAttachment_12) do
$ruiObj = RUIObject.new.with('objectid', 4853320).with('selfid', 1566257663).with('textdescid', 637677759).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'com.google.android.gm:id/add_attachment')
.with('content-desc', 'Attach file')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_Title_14) do
$ruiObj = RUIObject.new.with('objectid', 665784376).with('selfid', -1478650284).with('textdescid', 1395090321).with('uniqueparentid', 0).with('classresourceid', -1261418567)
.with('uitreeindex', 0)
.with('classname', 'TextView')
.with('resource-id', 'com.google.android.gm:id/title')
.with('text', 'Attach file')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:ImageButton_Show_16) 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_18) do
$ruiObj = RUIObject.new.with('objectid', -1941383373).with('selfid', -723637270).with('textdescid', -69548534).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 55)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'File Manager')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_ListItemName_8) do
$ruiObj = RUIObject.new.with('objectid', 1912841036).with('selfid', 181540310).with('textdescid', -493627628).with('uniqueparentid', 0).with('classresourceid', 1688608520)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('resource-id', 'com.lge.filemanager:id/list_item_name')
.with('text', 'Internal storage')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:swipeDown_12) do
swipe_vertical 500
waitsecond(1)
end
tcase << TestAction.new(:swipeDown_13) do
swipe_vertical 500
waitsecond(1)
end
tcase << TestAction.new(:TextView_ListItemName_14) do
$ruiObj = RUIObject.new.with('objectid', 1912841036).with('selfid', 1832026484).with('textdescid', 1680902454).with('uniqueparentid', 0).with('classresourceid', 1688608520)
.with('uitreeindex', 27)
.with('classname', 'TextView')
.with('resource-id', 'com.lge.filemanager:id/list_item_name')
.with('text', 'uiengine')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_ListItemName_23) do
$ruiObj = RUIObject.new.with('objectid', 1912841036).with('selfid', 2088116454).with('textdescid', 24134064).with('uniqueparentid', 0).with('classresourceid', 1688608520)
.with('uitreeindex', 6)
.with('classname', 'TextView')
.with('resource-id', 'com.lge.filemanager:id/list_item_name')
.with('text', 'log')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_ListItemName_38) do
$ruiObj = RUIObject.new.with('objectid', 1912841036).with('selfid', 1066717162).with('textdescid', -1266591232).with('uniqueparentid', 0).with('classresourceid', 1688608520)
.with('uitreeindex', 27)
.with('classname', 'TextView')
.with('resource-id', 'com.lge.filemanager:id/list_item_name')
.with('text', 'MTBFLogFilezip')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_Send_20) do
$ruiObj = RUIObject.new.with('objectid', -541121777).with('selfid', 2103341243).with('textdescid', -891190311).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(:ImageButton_ComposeButton_26) do
$ruiObj = RUIObject.new.with('objectid', 1598291378).with('selfid', 1808564263).with('textdescid', -1604213756).with('uniqueparentid', 0)
.with('uitreeindex', 18)
.with('classname', 'ImageButton')
.with('resource-id', 'com.google.android.gm:id/compose_button')
.with('content-desc', 'Compose')
$ruiObj.isExist
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_24) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "Unable to send email"
end
logStopTest("LogEmail")
waitsecond(1)
end
tcase << TestAction.new(:pressBack_12) do
pressBack
waitsecond(1)
end
tcase << TestAction.new(:pressBack_13) do
pressBack
waitsecond(1)
end
tcase << TestAction.new(:pressBack_14) do
pressBack
waitsecond(1)
end
tcase << TestAction.new(:pressHome_15) do
pressHome
waitsecond(1)
end
tcase.run(loopTime)
end
def self.MenuNavigation_05_01_09_01(loopTime)
tcase = TestCase.new("MenuNavigation_05_01_09_01")
tcase << TestAction.new(:pressHome_1) do
pressHome
end
tcase << TestAction.new(:scriptAction_off) do
$ignoreDefaultExpHandler = true
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_StartTestLog) do
logStartTest("05_01_09_01_Menu_Navigation")
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_resetCounter) do
$appCounter = 0
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_loop) do
until $appCounter > 31
$appCounter += 1
gotoAppByAppDrawer(db('NavApp')[$appCounter-1])
waitsecond(2)
allow_popup
waitsecond(2)
pressHome
$ruiObj = RUIObject.new.with('objectid', -1351376744).with('selfid', -1318451484).with('textdescid', -1794026948).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'OK')
$ruiObj.click
end
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_StopLogTest) do
if $appCounter == 26
$myTestResult = true
else
$myTestRsult = false
$myFailReason = "Failed"
end
logStopTest("05_01_09_01_Menu_Navigation")
waitsecond(2)
end
tcase.run(loopTime)
end
def self.Messaging_05_01_02_03(loopTime)
tcase = TestCase.new("Messaging_05_01_02_03")
tcase << TestAction.new(:scriptAction_28) do
logStartTest("Messaging_05_01_02_03")
end
tcase << TestAction.new(:pressHome_2) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_Messaging_4) do
$ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 3320718).with('textdescid', -234290576).with('uniqueparentid', 0)
.with('uitreeindex', 22)
.with('classname', 'TextView')
.with('content-desc', 'Messaging')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_BtnNext_2) do
$ruiObj = RUIObject.new.with('objectid', 1107740704).with('selfid', 81663352).with('textdescid', -610328691).with('uniqueparentid', 0)
.with('uitreeindex', 9)
.with('classname', 'Button')
.with('resource-id', 'com.android.mms:id/btn_next')
.with('text', 'NEXT')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_BtnOk_4) do
$ruiObj = RUIObject.new.with('objectid', -990941636).with('selfid', -831128438).with('textdescid', -958026272).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'Button')
.with('resource-id', 'com.android.mms:id/btn_ok')
.with('text', 'OK')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_Button1_6) do
$ruiObj = RUIObject.new.with('objectid', 1362210939).with('selfid', 1425469455).with('textdescid', 971222876).with('uniqueparentid', 0)
.with('uitreeindex', 4)
.with('classname', 'Button')
.with('resource-id', 'com.lge.acms:id/button1')
.with('text', 'Not now')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Button2_8) do
$ruiObj = RUIObject.new.with('objectid', 1362210940).with('selfid', -905377417).with('textdescid', 129814560).with('uniqueparentid', 0)
.with('uitreeindex', 4)
.with('classname', 'Button')
.with('resource-id', 'com.lge.acms:id/button2')
.with('text', 'OK')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:ImageView_FabImg_2) do
$ruiObj = RUIObject.new.with('objectid', -547009504).with('selfid', 1638137891).with('textdescid', 1140939687).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(:ImageButton_Contacts_2) do
$ruiObj = RUIObject.new.with('objectid', 1335477529).with('selfid', -358910880).with('textdescid', -1222569702).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'ImageButton')
.with('content-desc', 'Contacts')
$ruiObj.click
waitsecond(2)
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', 1)
.with('classname', 'TextView')
.with('resource-id', 'com.android.contacts:id/tabText')
.with('text', 'Contacts')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:EditText_SearchSrcText_46) do
$ruiObj = RUIObject.new.with('objectid', 730626617).with('selfid', 1544702019).with('textdescid', 666805559).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'EditText')
.with('resource-id', 'android:id/search_src_text')
.with('content-desc', 'Search query')
$ruiObj.inputtext('A01 a01')
waitsecond(2)
end
tcase << TestAction.new(:TextView_A01_6) do
$ruiObj = RUIObject.new.with('objectid', 685490859).with('selfid', -2094016618).with('textdescid', 608329741).with('uniqueparentid', 0).with('classresourceid', -938935918)
.with('uitreeindex', 11)
.with('classname', 'TextView')
.with('content-desc', 'A01 a01')
.with('text', 'A01 a01')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_BtnDone_8) do
$ruiObj = RUIObject.new.with('objectid', -1556636391).with('selfid', 670758290).with('textdescid', -1253568745).with('uniqueparentid', 0)
.with('uitreeindex', 16)
.with('classname', 'Button')
.with('resource-id', 'com.android.contacts:id/btn_done')
.with('text', 'DONE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:EditText_Enter_8) do
$ruiObj = RUIObject.new.with('objectid', -1637280020).with('selfid', -454502120).with('textdescid', -1217933909).with('uniqueparentid', 0).with('classresourceid', 1666676343)
.with('uitreeindex', 5)
.with('classname', 'EditText')
.with('content-desc', 'Enter message')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_141_1) do
$ruiObj.inputtext('Abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzaaaaaaaaaabbbbbbbbbbcccccccccc')
waitsecond(4)
end
tcase << TestAction.new(:Button_SendButtonText_2) do
$ruiObj = RUIObject.new.with('objectid', 353843972).with('selfid', 742186862).with('textdescid', -1914765924).with('uniqueparentid', 0)
.with('uitreeindex', 8)
.with('classname', 'Button')
.with('resource-id', 'com.android.mms:id/send_button_text')
.with('content-desc', 'Send')
.with('text', 'Send')
$ruiObj.click
waitsecond(4)
end
tcase << TestAction.new(:pressBack_5) do
pressBack
end
tcase << TestAction.new(:pressBack_6) do
pressBack
end
tcase << TestAction.new(:clickXY_164_208_12) do
click(164,208)
waitsecond(1)
end
tcase << TestAction.new(:TextView_TimestampView_2) do
$ruiObj = RUIObject.new.with('objectid', 780859453).with('selfid', -108293667).with('textdescid', -1097305943).with('uniqueparentid', 0).with('classresourceid', 1659956455)
.with('uitreeindex', 8)
.with('classname', 'TextView')
.with('resource-id', 'com.android.mms:id/timestamp_view')
.with('text', 'Sending')
$ruiObj.isNotExist
end
tcase << TestAction.new(:TextView_Delete_6) do
$ruiObj = RUIObject.new.with('objectid', -1337172653).with('selfid', 1644806947).with('textdescid', -2074083528).with('uniqueparentid', 0)
.with('uitreeindex', 4)
.with('classname', 'TextView')
.with('content-desc', 'Delete')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_Title_2) do
$ruiObj = RUIObject.new.with('objectid', 930093027).with('selfid', -1054998202).with('textdescid', 908714598).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'TextView')
.with('resource-id', 'com.android.mms:id/title')
.with('text', 'Select all')
$ruiObj.click
end
tcase << TestAction.new(:Button_Command2_6) do
$ruiObj = RUIObject.new.with('objectid', -1109126272).with('selfid', 282881050).with('textdescid', -1943996651).with('uniqueparentid', 0)
.with('uitreeindex', 16)
.with('classname', 'Button')
.with('resource-id', 'com.android.mms:id/command_2')
.with('text', 'Delete')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_Button1_18) do
$ruiObj = RUIObject.new.with('objectid', -1505530336).with('selfid', 2077687487).with('textdescid', -1187425223).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'Yes')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_30) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "Message not sent"
end
logStopTest("Messaging_05_01_02_03")
end
tcase << TestAction.new(:pressBack_53) do
pressBack
waitsecond(1)
end
tcase << TestAction.new(:pressBack_26) do
pressBack
waitsecond(1)
end
tcase.run(loopTime)
end
def self.Messaging_05_01_02_05(loopTime)
tcase = TestCase.new("Messaging_05_01_02_05")
tcase << TestAction.new(:scriptAction_28) do
logStartTest("Messaging_05_01_02_05")
end
tcase << TestAction.new(:pressHome_2) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_Messaging_4) do
$ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 3320718).with('textdescid', -234290576).with('uniqueparentid', 0)
.with('uitreeindex', 22)
.with('classname', 'TextView')
.with('content-desc', 'Messaging')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ImageView_FabImg_2) do
$ruiObj = RUIObject.new.with('objectid', -547009504).with('selfid', 1638137891).with('textdescid', 1140939687).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(:ImageButton_Contacts_2) do
$ruiObj = RUIObject.new.with('objectid', 1335477529).with('selfid', -358910880).with('textdescid', -1222569702).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'ImageButton')
.with('content-desc', 'Contacts')
$ruiObj.click
waitsecond(2)
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', 1)
.with('classname', 'TextView')
.with('resource-id', 'com.android.contacts:id/tabText')
.with('text', 'Contacts')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:EditText_SearchSrcText_4) do
$ruiObj = RUIObject.new.with('objectid', 730626617).with('selfid', 1544702019).with('textdescid', 666805559).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'EditText')
.with('resource-id', 'android:id/search_src_text')
.with('content-desc', 'Search query')
$ruiObj.inputtext('A01 a01')
waitsecond(2)
end
tcase << TestAction.new(:TextView_A01_6) do
$ruiObj = RUIObject.new.with('objectid', 685490859).with('selfid', -2094016618).with('textdescid', 608329741).with('uniqueparentid', 0).with('classresourceid', -938935918)
.with('uitreeindex', 11)
.with('classname', 'TextView')
.with('content-desc', 'A01 a01')
.with('text', 'A01 a01')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_BtnDone_8) do
$ruiObj = RUIObject.new.with('objectid', -1556636391).with('selfid', 670758290).with('textdescid', -1253568745).with('uniqueparentid', 0)
.with('uitreeindex', 16)
.with('classname', 'Button')
.with('resource-id', 'com.android.contacts:id/btn_done')
.with('text', 'DONE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:EditText_Enter_2) do
$ruiObj = RUIObject.new.with('objectid', -1677830865).with('selfid', -454502120).with('textdescid', 724968942).with('uniqueparentid', 0).with('classresourceid', 1666676343)
.with('uitreeindex', 9)
.with('classname', 'EditText')
.with('content-desc', 'Enter message')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_141_1) do
$ruiObj.inputtext('Abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzaaaaaaaaaabbbbbbbbbbcccccccccc')
waitsecond(4)
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', 6)
.with('classname', 'ImageButton')
.with('resource-id', 'com.android.mms:id/attachButton_right')
.with('content-desc', 'Attach')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_Text1_2) do
$ruiObj = RUIObject.new.with('objectid', 1787472427).with('selfid', -1526977978).with('textdescid', -1236046150).with('uniqueparentid', 0)
.with('uitreeindex', 6)
.with('classname', 'TextView')
.with('resource-id', 'com.android.mms:id/text1')
.with('text', 'Video')
$ruiObj.click
waitsecond(2)
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(:ImageButton_Show_4) 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(2)
end
tcase << TestAction.new(:TextView_Title_5) do
$ruiObj = RUIObject.new.with('objectid', -1941383373).with('selfid', 4082754).with('textdescid', 50769842).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 40)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Photos')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_PermissionAllowButton_2) 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(2)
end
tcase << TestAction.new(:TextView_Title_7) do
$ruiObj = RUIObject.new.with('objectid', -2074516409).with('selfid', -1484513934).with('textdescid', 889140747).with('uniqueparentid', 0)
.with('uitreeindex', 16)
.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_232_708_10) do
click(232,708)
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_2) do
$uiObj = RUIObject.new.with('objectid', -1505530336).with('selfid', 1382949486).with('textdescid', 185347450).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'REDUCE')
if $uiObj.isExist
$uiObj.click
waitsecond(2)
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').click
waitsecond(4)
RUIObject.new.with('objectid', -2139312908).with('selfid', 893316343).with('textdescid', -1979207657).with('uniqueparentid', 0)
.with('uitreeindex', 27)
.with('classname', 'Button')
.with('resource-id', 'com.lge.videostudio:id/trim_area_save')
.with('text', 'SAVE').click
waitsecond(32)
end
waitsecond(2)
end
tcase << TestAction.new(:Button_SendButtonText_10) do
$ruiObj = RUIObject.new.with('objectid', 353843972).with('selfid', 742186862).with('textdescid', -1914765924).with('uniqueparentid', 0)
.with('uitreeindex', 9)
.with('classname', 'Button')
.with('resource-id', 'com.android.mms:id/send_button_text')
.with('content-desc', 'Send')
.with('text', 'Send')
$ruiObj.click
waitsecond(4)
end
tcase << TestAction.new(:CheckBox_Checkbox_4) do
$ruiObj = RUIObject.new.with('objectid', 276475463).with('selfid', -1860124933).with('textdescid', -1816290475).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'CheckBox')
.with('resource-id', 'android:id/checkbox')
.with('text', 'Dont show this again')
$ruiObj.click
end
tcase << TestAction.new(:Button_Button1_6) do
$ruiObj = RUIObject.new.with('objectid', -1505530336).with('selfid', -1318451484).with('textdescid', -592503868).with('uniqueparentid', 0)
.with('uitreeindex', 4)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'OK')
$ruiObj.click
end
tcase << TestAction.new(:pressBack_5) do
pressBack
end
tcase << TestAction.new(:pressBack_5_1) do
pressBack
end
tcase << TestAction.new(:TextView_Delete_12) do
$ruiObj = RUIObject.new.with('objectid', -1337172653).with('selfid', 1644806947).with('textdescid', -2074083528).with('uniqueparentid', 0)
.with('uitreeindex', 4)
.with('classname', 'TextView')
.with('content-desc', 'Delete')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_Button1_12) do
$ruiObj = RUIObject.new.with('objectid', -1505530336).with('selfid', 982364851).with('textdescid', 652125653).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'DELETE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_30_1) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "Message not sent"
end
logStopTest("Messaging_05_01_02_05")
end
tcase << TestAction.new(:pressBack_53) do
pressBack
waitsecond(1)
end
tcase << TestAction.new(:pressBack_26) do
pressBack
waitsecond(1)
end
tcase.run(loopTime)
end
def self.Messaging_05_01_02_06(loopTime)
tcase = TestCase.new("Messaging_05_01_02_06")
tcase << TestAction.new(:scriptAction_28) do
logStartTest("Messaging_05_01_02_06")
end
tcase << TestAction.new(:pressHome_2) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_Messaging_4) do
$ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 3320718).with('textdescid', -234290576).with('uniqueparentid', 0)
.with('uitreeindex', 22)
.with('classname', 'TextView')
.with('content-desc', 'Messaging')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ImageView_FabImg_2) do
$ruiObj = RUIObject.new.with('objectid', -547009504).with('selfid', 1638137891).with('textdescid', 1140939687).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(:ImageButton_Contacts_2) do
$ruiObj = RUIObject.new.with('objectid', 1335477529).with('selfid', -358910880).with('textdescid', -1222569702).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'ImageButton')
.with('content-desc', 'Contacts')
$ruiObj.click
waitsecond(2)
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', 1)
.with('classname', 'TextView')
.with('resource-id', 'com.android.contacts:id/tabText')
.with('text', 'Contacts')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:EditText_SearchSrcText_4) do
$ruiObj = RUIObject.new.with('objectid', 730626617).with('selfid', 1544702019).with('textdescid', 666805559).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'EditText')
.with('resource-id', 'android:id/search_src_text')
.with('content-desc', 'Search query')
$ruiObj.inputtext('A01 a01')
waitsecond(2)
end
tcase << TestAction.new(:TextView_A01_6) do
$ruiObj = RUIObject.new.with('objectid', 685490859).with('selfid', -2094016618).with('textdescid', 608329741).with('uniqueparentid', 0).with('classresourceid', -938935918)
.with('uitreeindex', 11)
.with('classname', 'TextView')
.with('content-desc', 'A01 a01')
.with('text', 'A01 a01')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_BtnDone_8) do
$ruiObj = RUIObject.new.with('objectid', -1556636391).with('selfid', 670758290).with('textdescid', -1253568745).with('uniqueparentid', 0)
.with('uitreeindex', 16)
.with('classname', 'Button')
.with('resource-id', 'com.android.contacts:id/btn_done')
.with('text', 'DONE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:EditText_Enter_8) do
$ruiObj = RUIObject.new.with('objectid', -1637280020).with('selfid', -454502120).with('textdescid', -1217933909).with('uniqueparentid', 0).with('classresourceid', 1666676343)
.with('uitreeindex', 5)
.with('classname', 'EditText')
.with('content-desc', 'Enter message')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_141_1) do
$ruiObj.inputtext('Abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzaaaaaaaaaabbbbbbbbbbcccccccccc')
waitsecond(4)
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', 6)
.with('classname', 'ImageButton')
.with('resource-id', 'com.android.mms:id/attachButton_right')
.with('content-desc', 'Attach')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_Text1_2) do
$ruiObj = RUIObject.new.with('objectid', 1787472427).with('selfid', -1538867418).with('textdescid', -1604618790).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'com.android.mms:id/text1')
.with('text', 'Image')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_PermissionAllowButton_6) 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(1)
end
tcase << TestAction.new(:ImageButton_Show_6) do
$ruiObj = RUIObject.new.with('objectid', -1807230859).with('selfid', -929198491).with('textdescid', 629574489).with('uniqueparentid', 0)
.with('uitreeindex', 0)
.with('classname', 'ImageButton')
.with('content-desc', 'Show roots')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_Title_4) do
$ruiObj = RUIObject.new.with('objectid', -1941383373).with('selfid', 4082754).with('textdescid', 50769842).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 46)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Photos')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:swipeDown_8) do
swipe_vertical 500
waitsecond(2)
end
tcase << TestAction.new(:TextView_Title_10) do
$ruiObj = RUIObject.new.with('objectid', -2074516409).with('selfid', -1484513934).with('textdescid', 889140747).with('uniqueparentid', 0)
.with('uitreeindex', 21)
.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_216_704_12) do
click(216,704)
waitsecond(2)
end
tcase << TestAction.new(:TextView_DoneButton_2) do
$ruiObj = RUIObject.new.with('objectid', -762684432).with('selfid', -885365197).with('textdescid', -178035440).with('uniqueparentid', 0)
.with('uitreeindex', 10)
.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_SendButtonText_9) do
$ruiObj = RUIObject.new.with('objectid', 353843972).with('selfid', 742186862).with('textdescid', -1914765924).with('uniqueparentid', 0)
.with('uitreeindex', 9)
.with('classname', 'Button')
.with('resource-id', 'com.android.mms:id/send_button_text')
.with('content-desc', 'Send')
.with('text', 'Send')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:pressBack_5) do
pressBack
end
tcase << TestAction.new(:pressBack_6) do
pressBack
end
tcase << TestAction.new(:TextView_Delete_8) do
$ruiObj = RUIObject.new.with('objectid', -1337172653).with('selfid', 1644806947).with('textdescid', -2074083528).with('uniqueparentid', 0)
.with('uitreeindex', 4)
.with('classname', 'TextView')
.with('content-desc', 'Delete')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_Button1_18) do
$ruiObj = RUIObject.new.with('objectid', -1505530336).with('selfid', 2077687487).with('textdescid', -1187425223).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'Yes')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_30_1) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "End button not found"
end
logStopTest("Messaging_05_01_02_06")
end
tcase << TestAction.new(:pressBack_53) do
pressBack
waitsecond(1)
end
tcase << TestAction.new(:pressBack_26) do
pressBack
waitsecond(1)
end
tcase.run(loopTime)
end
def self.MultiMedia_05_01_07_05(loopTime)
tcase = TestCase.new("MultiMedia_05_01_07_05")
tcase << TestAction.new(:scriptAction_1) do
logStartTest("05_01_07_05_MultiMedia")
end
tcase << TestAction.new(:TextView_Camera_2) do
$ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 643708137).with('textdescid', 953340153).with('uniqueparentid', 0)
.with('uitreeindex', 26)
.with('classname', 'TextView')
.with('content-desc', 'Camera')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_OkButton_2) do
$ruiObj = RUIObject.new.with('objectid', 598194823).with('selfid', -286954065).with('textdescid', -162611849).with('uniqueparentid', 0)
.with('uitreeindex', 20)
.with('classname', 'Button')
.with('resource-id', 'com.lge.camera:id/ok_button')
.with('text', 'TURN ON')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ImageView_Thumbnail_2) do
$ruiObj = RUIObject.new.with('objectid', -2123601541).with('selfid', -135259702).with('textdescid', 357252685).with('uniqueparentid', 0)
.with('uitreeindex', 14)
.with('classname', 'ImageView')
.with('resource-id', 'com.lge.camera:id/thumbnail')
.with('content-desc', 'Gallery')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_ResolverText_22) do
$ruiObj = RUIObject.new.with('objectid', 1736845148).with('selfid', -1759292798).with('textdescid', 1927923419).with('uniqueparentid', 0).with('classresourceid', -472389065)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'com.lge:id/resolver_text')
.with('text', 'Photos')
$ruiObj.click
waitsecond(2)
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
waitsecond(2)
end
tcase << TestAction.new(:ImageView_Share_4) do
$ruiObj = RUIObject.new.with('objectid', 608531583).with('selfid', 1722741712).with('textdescid', 2035519838).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'ImageView')
.with('resource-id', 'com.google.android.apps.photos:id/share')
.with('content-desc', 'Share')
$ruiObj.isExist
end
tcase << TestAction.new(:scriptAction_8) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason == "Picutre not open"
end
logStopTest("05_01_07_05_MultiMedia")
end
tcase << TestAction.new(:pressBack_9) do
pressBack
end
tcase << TestAction.new(:pressBack_10) do
pressBack
end
tcase << TestAction.new(:pressHome_11) do
pressHome
end
tcase.run(loopTime)
end
def self.MultiMedia_05_01_07_06(loopTime)
tcase = TestCase.new("MultiMedia_05_01_07_06")
tcase << TestAction.new(:scriptAction_1) do
logStartTest("05_01_07_06_MultiMedia")
end
tcase << TestAction.new(:TextView_Camera_2) do
$ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 643708137).with('textdescid', 953340153).with('uniqueparentid', 0)
.with('uitreeindex', 26)
.with('classname', 'TextView')
.with('content-desc', 'Camera')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_OkButton_2) do
$ruiObj = RUIObject.new.with('objectid', 598194823).with('selfid', -286954065).with('textdescid', -162611849).with('uniqueparentid', 0)
.with('uitreeindex', 20)
.with('classname', 'Button')
.with('resource-id', 'com.lge.camera:id/ok_button')
.with('text', 'TURN ON')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ImageView_Thumbnail_2) do
$ruiObj = RUIObject.new.with('objectid', -2123601541).with('selfid', -135259702).with('textdescid', 357252685).with('uniqueparentid', 0)
.with('uitreeindex', 14)
.with('classname', 'ImageView')
.with('resource-id', 'com.lge.camera:id/thumbnail')
.with('content-desc', 'Gallery')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:ImageView_Trash_2) do
$ruiObj = RUIObject.new.with('objectid', 609753048).with('selfid', -1544411738).with('textdescid', 1016407002).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'ImageView')
.with('resource-id', 'com.google.android.apps.photos:id/trash')
.with('content-desc', 'Move to trash')
$ruiObj.isExist
end
tcase << TestAction.new(:ImageView_Trash_4) do
$ruiObj = RUIObject.new.with('objectid', 609753048).with('selfid', -1544411738).with('textdescid', 1016407002).with('uniqueparentid', 0)
.with('uitreeindex', 9)
.with('classname', 'ImageView')
.with('resource-id', 'com.google.android.apps.photos:id/trash')
.with('content-desc', 'Move to trash')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_5) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason == "Picture is not found"
end
logStopTest("05_01_07_06_MultiMedia")
end
tcase << TestAction.new(:pressBack_6) do
pressBack
end
tcase << TestAction.new(:pressBack_7) do
pressBack
end
tcase << TestAction.new(:pressHome_8) do
pressHome
end
tcase.run(loopTime)
end
def self.MultiMedia_05_01_07_10(loopTime)
tcase = TestCase.new("MultiMedia_05_01_07_10")
tcase << TestAction.new(:scriptAction_1) do
logStartTest("05_01_07_10_MultiMedia")
end
tcase << TestAction.new(:scriptAction_2) do
gotoAppByAppDrawer("YouTube")
end
tcase << TestAction.new(:TextView_LaterButton_2) do
$ruiObj = RUIObject.new.with('objectid', 949353906).with('selfid', 702590847).with('textdescid', -874020510).with('uniqueparentid', 0)
.with('uitreeindex', 4)
.with('classname', 'TextView')
.with('resource-id', 'com.google.android.youtube:id/later_button')
.with('text', 'LATER')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_Dismiss_2) do
$ruiObj = RUIObject.new.with('objectid', 118887004).with('selfid', 517159).with('textdescid', 1827199643).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('resource-id', 'com.google.android.youtube:id/dismiss')
.with('text', 'Not now')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_Image_2) do
$ruiObj = RUIObject.new.with('objectid', 875876029).with('selfid', 1315484302).with('textdescid', 1788421122).with('uniqueparentid', 0)
.with('uitreeindex', 4)
.with('classname', 'Button')
.with('resource-id', 'com.google.android.youtube:id/image')
.with('content-desc', 'Home')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:ImageView_Thumbnail_3) do
$ruiObj = RUIObject.new.with('objectid', 875683821).with('selfid', -2120336906).with('textdescid', 1376394707).with('uniqueparentid', 0)
.with('uitreeindex', 10)
.with('pretext', 'WATCH MORE')
.with('classname', 'ImageView')
.with('resource-id', 'com.google.android.youtube:id/thumbnail')
$ruiObj.select('Similiar').click
end
tcase << TestAction.new(:wait10second_3) do
waitsecond(10)
end
tcase << TestAction.new(:TextView_SubscribeButton_4) do
$ruiObj = RUIObject.new.with('objectid', 1730328459).with('selfid', 1783143723).with('textdescid', -408811077).with('uniqueparentid', 0).with('classresourceid', -757100379)
.with('uitreeindex', 10)
.with('classname', 'TextView')
.with('resource-id', 'com.google.android.youtube:id/subscribe_button')
.with('content-desc', 'Subscribe to this channel')
.with('text', 'Subscribe')
$ruiObj.isExist
end
tcase << TestAction.new(:scriptAction_9) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason == "Video Streaming does not work"
end
logStopTest("05_01_07_10_MultiMedia")
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.MultiTasking_05_01_08_01(loopTime)
tcase = TestCase.new("MultiTasking_05_01_08_01")
tcase << TestAction.new(:scriptAction_StartTest) do
logStartTest("05_01_08_01_MultiTasking")
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', 20)
.with('classname', 'TextView')
.with('content-desc', 'Phone')
.with('text', 'Phone')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_Tabtext_21) do
$ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 566119687).with('textdescid', 1861262411).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(:EditText_Digits_4) do
$ruiObj = RUIObject.new.with('objectid', 477485968).with('selfid', -1326421482).with('textdescid', 1917163152).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'EditText')
.with('resource-id', 'com.android.contacts:id/digits')
$ruiObj.inputtext('18003310500')
waitsecond(2)
end
tcase << TestAction.new(:pressBack_8) do
pressBack
waitsecond(2)
end
tcase << TestAction.new(:ImageButton_Btnlogscall_10) do
$ruiObj = RUIObject.new.with('objectid', -1934426254).with('selfid', -2053967649).with('textdescid', -911487124).with('uniqueparentid', 0)
.with('uitreeindex', 35)
.with('classname', 'ImageButton')
.with('resource-id', 'com.android.contacts:id/btnLogsCall')
.with('content-desc', 'Call')
$ruiObj.click
waitsecond(2)
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', 10)
.with('classname', 'Button')
.with('resource-id', 'com.android.incallui:id/endButton')
.with('text', 'End')
$ruiObj.isExist
end
tcase << TestAction.new(:scriptAction_4) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "End button not found"
end
logStopTest("05_01_08_01_MultiTasking")
end
tcase << TestAction.new(:pressHome_2) do
pressHome
end
tcase.run(loopTime)
end
def self.MultiTasking_05_01_08_02(loopTime)
tcase = TestCase.new("MultiTasking_05_01_08_02")
tcase << TestAction.new(:scriptAction_StartTestLog) do
logStartTest("05_01_08_02_MultiTasking")
end
tcase << TestAction.new(:pressHome_13) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_Contacts_2) do
$ruiObj = RUIObject.new.with('objectid', -477238524).with('selfid', 1993945070).with('textdescid', 1542309180).with('uniqueparentid', 0)
.with('uitreeindex', 12)
.with('classname', 'TextView')
.with('content-desc', 'Contacts')
.with('text', 'Contacts')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:pressHome_18) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_Messaging_4) do
$ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 3320718).with('textdescid', -234290576).with('uniqueparentid', 0)
.with('uitreeindex', 19)
.with('classname', 'TextView')
.with('content-desc', 'Messaging')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:pressHome_20) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_Phone_6) do
$ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 1923496804).with('textdescid', -1252643750).with('uniqueparentid', 0)
.with('uitreeindex', 18)
.with('classname', 'TextView')
.with('content-desc', 'Phone')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:pressHome_22) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_Play_8) do
$ruiObj = RUIObject.new.with('objectid', -477238524).with('selfid', 809278702).with('textdescid', -10183748).with('uniqueparentid', 0)
.with('uitreeindex', 15)
.with('classname', 'TextView')
.with('content-desc', 'Play Store')
.with('text', 'Play Store')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:pressHome_24) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_Camera_10) do
$ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 643708137).with('textdescid', 953340153).with('uniqueparentid', 0)
.with('uitreeindex', 22)
.with('classname', 'TextView')
.with('content-desc', 'Camera')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:pressHome_26) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_Chrome_12) do
$ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 849023028).with('textdescid', -1271832818).with('uniqueparentid', 0)
.with('uitreeindex', 21)
.with('classname', 'TextView')
.with('content-desc', 'Chrome')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ImageButton_MenuButton_2) do
$ruiObj = RUIObject.new.with('objectid', 554731264).with('selfid', -17041368).with('textdescid', 1097269587).with('uniqueparentid', 0)
.with('uitreeindex', 19)
.with('classname', 'ImageButton')
.with('resource-id', 'com.android.chrome:id/menu_button')
.with('content-desc', 'More options')
$ruiObj.isExist
end
tcase << TestAction.new(:pressHome_15) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_Phone_14) do
$ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 1923496804).with('textdescid', -1252643750).with('uniqueparentid', 0)
.with('uitreeindex', 18)
.with('classname', 'TextView')
.with('content-desc', 'Phone')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Endbutton_4) do
$ruiObj = RUIObject.new.with('objectid', -2133227471).with('selfid', 1277076029).with('textdescid', -2023955116).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'Button')
.with('resource-id', 'com.android.incallui:id/endButton')
.with('text', 'End')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_Phone_16) do
$ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 1923496804).with('textdescid', -1252643750).with('uniqueparentid', 0)
.with('uitreeindex', 18)
.with('classname', 'TextView')
.with('content-desc', 'Phone')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:EditText_Digits_20) do
$ruiObj = RUIObject.new.with('objectid', 477485968).with('selfid', -1326421482).with('textdescid', 1917163152).with('uniqueparentid', 0)
.with('uitreeindex', 6)
.with('classname', 'EditText')
.with('resource-id', 'com.android.contacts:id/digits')
$ruiObj.inputtext('18003310500')
waitsecond(2)
end
tcase << TestAction.new(:ImageButton_Btnlogscall_22) do
$ruiObj = RUIObject.new.with('objectid', -1934426254).with('selfid', -2053967649).with('textdescid', -911487124).with('uniqueparentid', 0)
.with('uitreeindex', 35)
.with('classname', 'ImageButton')
.with('resource-id', 'com.android.contacts:id/btnLogsCall')
.with('content-desc', 'Call')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_LogStopTest) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "Apps not loaded"
end
logStopTest("05_01_08_02_MultiTasking")
end
tcase << TestAction.new(:pressBack_6) do
pressBack
end
tcase << TestAction.new(:pressBack_7) do
pressBack
end
tcase.run(loopTime)
end
def self.MultiTasking_05_01_08_03(loopTime)
tcase = TestCase.new("MultiTasking_05_01_08_03")
tcase << TestAction.new(:scriptAction_3) do
wakeUp()
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_StartTestLog_1) do
logStartTest("05_01_08_03_MultiTasking")
end
tcase << TestAction.new(:TextView_Phone_2) do
$ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 1923496804).with('textdescid', -1252643750).with('uniqueparentid', 0)
.with('uitreeindex', 20)
.with('classname', 'TextView')
.with('content-desc', 'Phone')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Endbutton_2_1_1) 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.isExist
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_4_1) do
$UIDev.swipe(200,
$UIDev.getDisplayHeight-300,
$UIDev.getDisplayWidth-50,
$UIDev.getDisplayHeight-300,
10)
end
tcase << TestAction.new(:Button_Endbutton_6_1) do
$ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
.with('uitreeindex', 12)
.with('classname', 'Button')
.with('resource-id', 'com.android.incallui:id/endButton')
.with('text', 'End')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_LogStopTest) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "End button not found"
end
logStopTest("05_01_08_03_MultiTasking")
end
tcase << TestAction.new(:pressHome_20) do
pressHome
end
tcase.run(loopTime)
end
def self.MultiTasking_05_01_08_04(loopTime)
tcase = TestCase.new("MultiTasking_05_01_08_04")
tcase << TestAction.new(:scriptAction_StartTestLog) do
logStartTest("05_01_08_04_MultiTasking")
end
tcase << TestAction.new(:scriptAction_2) do
gotoAppByAppDrawer("Chrome")
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_LogStopTest) do
$reload = RUIObject.new.with('objectid', -1485276626).with('selfid', 131798869).with('textdescid', -1148751605).with('uniqueparentid', -932380963)
.with('uitreeindex', 1)
.with('classname', 'Button')
.with('content-desc', 'RELOAD').exists?
$progressBar = RUIObject.new.with('objectid', 460148827).with('selfid', -703099949).with('textdescid', 1379711781).with('uniqueparentid', 0)
.with('uitreeindex', 4)
.with('pretext', 'Block')
.with('classname', 'ProgressBar')
.with('resource-id', 'com.android.chrome:id/progress').exists?
if ($progressBar or $reload) == true
$myTestResult = false
else
$myTestResult = true
end
if $myTestResult == false
$myFailReason = "Browser is not starting"
end
logStopTest("05_01_08_04_MultiTasking")
end
tcase << TestAction.new(:pressHome_1) do
pressHome
end
tcase.run(loopTime)
end
def self.MultiTasking_05_01_08_05(loopTime)
tcase = TestCase.new("MultiTasking_05_01_08_05")
tcase << TestAction.new(:scriptAction_StartTestLog) do
logStartTest("05_01_08_05_MultiTasking")
end
tcase << TestAction.new(:Contacts) do
gotoAppByAppDrawer("Contacts")
waitsecond(2)
end
tcase << TestAction.new(:Messaging) do
gotoAppByAppDrawer("Messaging")
waitsecond(2)
end
tcase << TestAction.new(:Phone) do
gotoAppByAppDrawer("Phone")
waitsecond(2)
end
tcase << TestAction.new(:Play_Store) do
gotoAppByAppDrawer("Play Store")
waitsecond(2)
end
tcase << TestAction.new(:Camera) do
gotoAppByAppDrawer("Camera")
waitsecond(2)
end
tcase << TestAction.new(:Chrome) do
gotoAppByAppDrawer("Chrome")
waitsecond(2)
end
tcase << TestAction.new(:ImageButton_DocumentMenuButton_2) do
$ruiObj = RUIObject.new.with('objectid', -1808270022).with('selfid', -336731118).with('textdescid', -1833889831).with('uniqueparentid', 0)
.with('uitreeindex', 4)
.with('classname', 'ImageButton')
.with('resource-id', 'com.android.chrome:id/document_menu_button')
.with('content-desc', 'More options')
$ruiObj.isExist
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_LogStopTest) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "End button not found"
end
logStopTest("05_01_08_05_MultiTasking")
end
tcase << TestAction.new(:pressBack_3) do
pressBack
end
tcase << TestAction.new(:pressBack_4) do
pressBack
end
tcase.run(loopTime)
end
def self.MultiTasking_05_01_08_06(loopTime)
tcase = TestCase.new("MultiTasking_05_01_08_06")
tcase << TestAction.new(:scriptAction_StartTestLog) do
logStartTest("05_01_08_06_MultiTasking")
end
tcase << TestAction.new(:scriptAction_2) do
gotoAppByAppDrawer("Chrome")
waitsecond(1)
end
tcase << TestAction.new(:ImageButton_DocumentMenuButton_2) do
$ruiObj = RUIObject.new.with('objectid', -1808270022).with('selfid', -336731118).with('textdescid', -1833889831).with('uniqueparentid', 0)
.with('uitreeindex', 439)
.with('classname', 'ImageButton')
.with('resource-id', 'com.android.chrome:id/document_menu_button')
.with('content-desc', 'More options')
$ruiObj.isExist
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_LogStopTest) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "End button not found"
end
logStopTest("05_01_08_06_MultiTasking")
end
tcase << TestAction.new(:pressHome_1) do
pressHome
end
tcase.run(loopTime)
end
def self.NFC_05_01_11_01(loopTime)
tcase = TestCase.new("NFC_05_01_11_01")
tcase << TestAction.new(:scriptAction_StartTestLog) do
logStartTest("05_01_11_01_NFC")
end
tcase << TestAction.new(:gotoSettings) do
gotoSettings
waitsecond(2)
end
tcase << TestAction.new(:TextView_Title_2) do
$ruiObj = RUIObject.new.with('objectid', 674368800).with('selfid', -2078686330).with('textdescid', -957350501).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Networks')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:swipeDown_2) do
swipe_vertical 500
waitsecond(2)
end
tcase << TestAction.new(:TextView_Title_4) do
$ruiObj = RUIObject.new.with('objectid', -487328458).with('selfid', 347833004).with('textdescid', -1018549621).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 28)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Share connect')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_Title_23) do
$ruiObj = RUIObject.new.with('objectid', -2103271856).with('selfid', -434675318).with('textdescid', -88389691).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 3)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'NFC')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:CheckBox_Checkbox_6) do
$ruiObj = RUIObject.new.with('objectid', -263705807).with('selfid', -1860124933).with('textdescid', -1017369409).with('uniqueparentid', 0).with('classresourceid', 1150850933)
.with('uitreeindex', 3)
.with('classname', 'CheckBox')
.with('resource-id', 'android:id/checkbox')
.with('text', 'Dont show this again')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Button1_8) do
$ruiObj = RUIObject.new.with('objectid', 1457638446).with('selfid', -1318451484).with('textdescid', 1001636562).with('uniqueparentid', 0)
.with('uitreeindex', 4)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'OK')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:pressRecentApps_10) do
pressRecentApps
waitsecond(2)
end
tcase << TestAction.new(:TextView_Title_12) do
$ruiObj = RUIObject.new.with('objectid', 938621642).with('selfid', -793388445).with('textdescid', 656660918).with('uniqueparentid', 0).with('classresourceid', 1862600999)
.with('uitreeindex', 21)
.with('classname', 'TextView')
.with('resource-id', 'com.android.systemui:id/title')
.with('content-desc', 'Settings')
.with('text', 'Settings')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Switch_ON_14) do
$ruiObj = RUIObject.new.with('objectid', -2010047312).with('selfid', 1645353587).with('textdescid', -1677524303).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Switch')
.with('text', 'ON')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Switch_OFF_4) do
$ruiObj = RUIObject.new.with('objectid', -2010047312).with('selfid', -533646533).with('textdescid', -463652319).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Switch')
.with('text', 'OFF')
$ruiObj.isExist
end
tcase << TestAction.new(:Switch_OFF_4_1) do
$ruiObj = RUIObject.new.with('objectid', -2010047312).with('selfid', -533646533).with('textdescid', -463652319).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Switch')
.with('text', 'OFF')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:pressBack_7) do
pressBack
end
tcase << TestAction.new(:pressBack_8) do
pressBack
end
tcase << TestAction.new(:scriptAction_LogStopTest) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "End button not found"
end
logStopTest("05_01_11_01_NFC")
end
tcase << TestAction.new(:pressBack_10) do
pressBack
end
tcase << TestAction.new(:pressHome_7) do
pressHome
waitsecond(1)
end
tcase.run(loopTime)
end
def self.PIM_05_01_06_01(loopTime)
tcase = TestCase.new("PIM_05_01_06_01")
tcase << TestAction.new(:scriptAction_StartTestLog) do
logStartTest("05_01_06_01_PIM")
end
tcase << TestAction.new(:gotoApp_4) do
gotoApp('Calendar')
waitsecond(2)
end
tcase << TestAction.new(:ImageView_2) do
$ruiObj = RUIObject.new.with('objectid', -30724256).with('selfid', 1125864064).with('textdescid', -952451904).with('uniqueparentid', 0)
.with('uitreeindex', 24)
.with('pretext', 'SAT')
.with('classname', 'ImageView')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:EditText_Title_7) do
$ruiObj = RUIObject.new.with('objectid', -308497519).with('selfid', 2023914653).with('textdescid', -973488465).with('uniqueparentid', 0).with('classresourceid', 1943514993)
.with('uitreeindex', 4)
.with('classname', 'EditText')
.with('resource-id', 'com.android.calendar:id/title')
$ruiObj.inputtext('Event')
waitsecond(2)
end
tcase << TestAction.new(:Button_BtnDone_9) do
$ruiObj = RUIObject.new.with('objectid', 2099795980).with('selfid', 2133354936).with('textdescid', -644044497).with('uniqueparentid', 0)
.with('uitreeindex', 32)
.with('classname', 'Button')
.with('resource-id', 'com.android.calendar:id/btn_done')
.with('text', 'SAVE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:wait1second_11) do
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_LogStopTest) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "End button not found"
end
logStopTest("05_01_06_01_PIM")
end
tcase << TestAction.new(:pressBack_14) do
pressBack
waitsecond(2)
end
tcase << TestAction.new(:pressBack_16) do
pressBack
waitsecond(2)
end
tcase.run(loopTime)
end
def self.PIM_05_01_06_02(loopTime)
tcase = TestCase.new("PIM_05_01_06_02")
tcase << TestAction.new(:scriptAction_StartTestLog) do
logStartTest("05_01_06_02_PIM")
end
tcase << TestAction.new(:gotoApp_21) do
gotoApp('Clock')
waitsecond(2)
end
tcase << TestAction.new(:TextView_Title_4) do
$ruiObj = RUIObject.new.with('objectid', 1224190759).with('selfid', -1121994128).with('textdescid', 1363275560).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Alarm')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ImageView_Fab_5) do
$ruiObj = RUIObject.new.with('objectid', -476403250).with('selfid', -466463568).with('textdescid', -1883598830).with('uniqueparentid', 0)
.with('uitreeindex', 8)
.with('classname', 'ImageView')
.with('resource-id', 'com.lge.clock:id/fab')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:swipeDown_7) do
swipe_vertical 500
waitsecond(2)
end
tcase << TestAction.new(:EditText_MemoInput_9) do
$ruiObj = RUIObject.new.with('objectid', -560595495).with('selfid', 370574885).with('textdescid', -198591129).with('uniqueparentid', 0).with('classresourceid', -1797104135)
.with('uitreeindex', 23)
.with('classname', 'EditText')
.with('resource-id', 'com.lge.clock:id/memo_input')
$ruiObj.inputtext('Alarm1')
waitsecond(2)
end
tcase << TestAction.new(:Button_Savebutton_12) do
$ruiObj = RUIObject.new.with('objectid', -902674558).with('selfid', -575419535).with('textdescid', -816404443).with('uniqueparentid', 0)
.with('uitreeindex', 30)
.with('classname', 'Button')
.with('resource-id', 'com.lge.clock:id/saveButton')
.with('text', 'SAVE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:wait1second_14) do
waitsecond(1)
end
tcase << TestAction.new(:Switch_AlarmListItemButton_16) do
$ruiObj = RUIObject.new.with('objectid', -104098710).with('selfid', -385149075).with('textdescid', 1204227435).with('uniqueparentid', 0)
.with('uitreeindex', 10)
.with('classname', 'Switch')
.with('resource-id', 'com.lge.clock:id/alarm_list_item_button')
.with('text', 'ON')
$ruiObj.isExist
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_LogStopTest) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "End button not found"
end
logStopTest("05_01_06_02_PIM")
end
tcase << TestAction.new(:pressBack_7) do
pressBack
end
tcase << TestAction.new(:pressBack_20) do
pressBack
waitsecond(2)
end
tcase.run(loopTime)
end
def self.PIM_05_01_06_03(loopTime)
tcase = TestCase.new("PIM_05_01_06_03")
tcase << TestAction.new(:scriptAction_StartTestLog) do
logStartTest("05_01_06_03_PIM")
waitsecond(1)
end
tcase << TestAction.new(:gotoApp_2) do
gotoApp('')
waitsecond(1)
end
tcase << TestAction.new(:ImageButton_Open_2) do
$ruiObj = RUIObject.new.with('objectid', 1598382174).with('selfid', 1589392844).with('textdescid', -1452260343).with('uniqueparentid', 0)
.with('uitreeindex', 0)
.with('classname', 'ImageButton')
.with('content-desc', 'Open navigation drawer')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_ButtonView_7) do
$ruiObj = RUIObject.new.with('objectid', 603982191).with('selfid', -270658080).with('textdescid', 1995102261).with('uniqueparentid', 0).with('classresourceid', 1399022470)
.with('uitreeindex', 25)
.with('classname', 'TextView')
.with('resource-id', 'com.android.calendar:id/button_view')
.with('text', 'Day')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ImageButton_More_9) do
$ruiObj = RUIObject.new.with('objectid', -612680593).with('selfid', 1290820192).with('textdescid', 366665732).with('uniqueparentid', 0)
.with('uitreeindex', 6)
.with('classname', 'ImageButton')
.with('content-desc', 'More options')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_Title_11) do
$ruiObj = RUIObject.new.with('objectid', 188068915).with('selfid', -342341268).with('textdescid', 1772893384).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 0)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Delete')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:CheckBox_ActionSelectallCheckbox_16) do
$ruiObj = RUIObject.new.with('objectid', -855663087).with('selfid', 1343055516).with('textdescid', 1579914132).with('uniqueparentid', 0)
.with('uitreeindex', 0)
.with('classname', 'CheckBox')
.with('resource-id', 'com.android.calendar:id/action_selectall_checkbox')
.with('text', 'Select all')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_DeleteAgenda_18) do
$ruiObj = RUIObject.new.with('objectid', 572018530).with('selfid', 1307339797).with('textdescid', -303618793).with('uniqueparentid', 0)
.with('uitreeindex', 16)
.with('classname', 'Button')
.with('resource-id', 'com.android.calendar:id/delete_agenda')
.with('text', 'DELETE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Button1_20) do
$ruiObj = RUIObject.new.with('objectid', -122532739).with('selfid', 982364851).with('textdescid', 1617680178).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'DELETE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:wait1second_22) do
waitsecond(1)
end
tcase << TestAction.new(:ImageButton_Open_24) do
$ruiObj = RUIObject.new.with('objectid', 1598382174).with('selfid', 1589392844).with('textdescid', -1452260343).with('uniqueparentid', 0)
.with('uitreeindex', 0)
.with('classname', 'ImageButton')
.with('content-desc', 'Open navigation drawer')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_ButtonView_26) do
$ruiObj = RUIObject.new.with('objectid', 603982191).with('selfid', 1899312068).with('textdescid', 2008206737).with('uniqueparentid', 0).with('classresourceid', 1399022470)
.with('uitreeindex', 18)
.with('classname', 'TextView')
.with('resource-id', 'com.android.calendar:id/button_view')
.with('text', 'Month')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_LogStopTest) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "End button not found"
end
logStopTest("05_01_06_03_PIM")
end
tcase << TestAction.new(:pressBack_9) do
pressBack
waitsecond(1)
end
tcase << TestAction.new(:pressBack_28) do
pressBack
waitsecond(2)
end
tcase.run(loopTime)
end
def self.PIM_05_01_06_04(loopTime)
tcase = TestCase.new("PIM_05_01_06_04")
tcase << TestAction.new(:gotoApp_2) do
gotoApp('')
end
tcase << TestAction.new(:scriptAction_StartTestLog) do
logStartTest("05_01_06_04_PIM")
end
tcase << TestAction.new(:TextView_Title_21) do
$ruiObj = RUIObject.new.with('objectid', -322510520).with('selfid', -1121994128).with('textdescid', 2047918567).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Alarm')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_DeleteAlarmMenu_5) do
$ruiObj = RUIObject.new.with('objectid', -627640121).with('selfid', 2100473433).with('textdescid', 1981482564).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'TextView')
.with('resource-id', 'com.lge.clock:id/delete_alarm_menu')
.with('content-desc', 'Delete')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:CheckBox_Checkall_2) do
$ruiObj = RUIObject.new.with('objectid', 856038081).with('selfid', 2027227245).with('textdescid', 767376767).with('uniqueparentid', 0)
.with('uitreeindex', 0)
.with('classname', 'CheckBox')
.with('resource-id', 'com.lge.clock:id/checkall')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_BtnDelete_4) do
$ruiObj = RUIObject.new.with('objectid', -568781847).with('selfid', 1633729950).with('textdescid', 1056600734).with('uniqueparentid', 0)
.with('uitreeindex', 15)
.with('classname', 'Button')
.with('resource-id', 'com.lge.clock:id/btn_Delete')
.with('text', 'DELETE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Button1_11) do
$ruiObj = RUIObject.new.with('objectid', -405151478).with('selfid', 2077687487).with('textdescid', 489169807).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'Yes')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_NoContentsText_5) do
$ruiObj = RUIObject.new.with('objectid', -906561874).with('selfid', 2062356648).with('textdescid', -1982958191).with('uniqueparentid', 0)
.with('uitreeindex', 6)
.with('classname', 'TextView')
.with('resource-id', 'com.lge.clock:id/no_contents_text')
.with('text', 'No alarms')
$ruiObj.isExist
waitsecond(1)
end
tcase << TestAction.new(:pressBack_15) do
pressBack
end
tcase << TestAction.new(:pressBack_16) do
pressBack
end
tcase << TestAction.new(:scriptAction_LogStopTest) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "End button not found"
end
logStopTest("05_01_06_04_PIM")
end
tcase.run(loopTime)
end
def self.StoreFrontDownload_05_01_05_01(loopTime)
tcase = TestCase.new("StoreFrontDownload_05_01_05_01")
tcase << TestAction.new(:scriptAction_1) do
logStartTest("05_01_05_01_StoreFrontDownload")
end
tcase << TestAction.new(:gotoApp_2) do
gotoApp('Play Store')
waitsecond(1)
end
tcase << TestAction.new(:ImageView_SearchBoxIdleText_5) do
$ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
.with('uitreeindex', 32)
.with('classname', 'ImageView')
.with('resource-id', 'com.android.vending:id/search_box_idle_text')
.with('content-desc', 'Search')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:EditText_SearchBoxTextInput_6) do
$ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
.with('uitreeindex', 32)
.with('classname', 'EditText')
.with('resource-id', 'com.android.vending:id/search_box_text_input')
$ruiObj.inputtext('ColorNote')
waitsecond(2)
end
tcase << TestAction.new(:pressEnter_2) do
pressEnter
waitsecond(2)
end
tcase << TestAction.new(:TextView_LiTitle_2) do
$ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', -1969590474).with('textdescid', 83190698).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('resource-id', 'com.android.vending:id/li_title')
.with('content-desc', 'App: ColorNote Notepad Notes')
.with('text', 'ColorNote Notepad Notes')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_UninstallButton_15_pressed) do
$ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'Button')
.with('resource-id', 'com.android.vending:id/uninstall_button')
.with('text', 'UNINSTALL')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_Button1_16_pressed_OK) do
$ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'OK')
$ruiObj.click
waitsecond(8)
end
tcase << TestAction.new(:Button_BuyButton_18_Install) do
$ruiObj = RUIObject.new.with('objectid', 1237348910).with('selfid', -652886121).with('textdescid', 538738615).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'Button')
.with('resource-id', 'com.android.vending:id/buy_button')
.with('text', 'INSTALL')
$ruiObj.isExist
waitsecond(1)
end
tcase << TestAction.new(:Button_BuyButton_2) do
$ruiObj = RUIObject.new.with('objectid', -329901969).with('selfid', -652886121).with('textdescid', 992432790).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'Button')
.with('resource-id', 'com.android.vending:id/buy_button')
.with('text', 'INSTALL')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_PositiveButton_4) do
$ruiObj = RUIObject.new.with('objectid', 1281581194).with('selfid', -1901489946).with('textdescid', -1976674237).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Button')
.with('resource-id', 'com.android.vending:id/positive_button')
.with('text', 'CONTINUE')
$ruiObj.click
waitsecond(8)
end
tcase << TestAction.new(:scriptAction_CheckPass) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason == "Install Failed"
end
logStopTest("05_01_05_07_StoreFrontDownload")
end
tcase << TestAction.new(:pressBack_16) do
pressBack
end
tcase << TestAction.new(:pressBack_17) do
pressBack
end
tcase << TestAction.new(:pressHome_19) do
pressHome
end
tcase.run(loopTime)
end
def self.StoreFrontDownload_05_01_05_03(loopTime)
tcase = TestCase.new("StoreFrontDownload_05_01_05_03")
tcase << TestAction.new(:scriptAction_1) do
logStartTest("05_01_05_03_StoreFrontDownload")
end
tcase << TestAction.new(:gotoApp_2) do
gotoApp('Play Store')
waitsecond(2)
end
tcase << TestAction.new(:ImageView_SearchBoxIdleText_5) do
$ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
.with('uitreeindex', 32)
.with('classname', 'ImageView')
.with('resource-id', 'com.android.vending:id/search_box_idle_text')
.with('content-desc', 'Search')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:EditText_SearchBoxTextInput_6) do
$ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
.with('uitreeindex', 32)
.with('classname', 'EditText')
.with('resource-id', 'com.android.vending:id/search_box_text_input')
$ruiObj.inputtext('ColorNote')
waitsecond(1)
end
tcase << TestAction.new(:pressEnter_2) do
pressEnter
waitsecond(4)
end
tcase << TestAction.new(:TextView_LiTitle_2) do
$ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', -1969590474).with('textdescid', 83190698).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'TextView')
.with('resource-id', 'com.android.vending:id/li_title')
.with('content-desc', 'App: ColorNote Notepad Notes')
.with('text', 'ColorNote Notepad Notes')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_UninstallButton_UnInstall_exist) do
$ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'Button')
.with('resource-id', 'com.android.vending:id/uninstall_button')
.with('text', 'UNINSTALL')
$ruiObj.isExist
ifFailJumpTo(:Button_BuyButton_1)
waitsecond(1)
end
tcase << TestAction.new(:Button_UninstallButton_UninstallCK_1) do
$ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'Button')
.with('resource-id', 'com.android.vending:id/uninstall_button')
.with('text', 'UNINSTALL')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_Button1_Clk_OK) do
$ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'OK')
$ruiObj.click
waitsecond(8)
end
tcase << TestAction.new(:Button_BuyButton_1) do
$ruiObj = RUIObject.new.with('objectid', 1237348910).with('selfid', -652886121).with('textdescid', 538738615).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'Button')
.with('resource-id', 'com.android.vending:id/buy_button')
.with('text', 'INSTALL')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_PositiveButton_4) do
$ruiObj = RUIObject.new.with('objectid', 1281581194).with('selfid', -1901489946).with('textdescid', -1976674237).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Button')
.with('resource-id', 'com.android.vending:id/positive_button')
.with('text', 'CONTINUE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:wait1second_6) do
waitsecond(1)
end
tcase << TestAction.new(:Button_UninstallButton_4) do
$ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'Button')
.with('resource-id', 'com.android.vending:id/uninstall_button')
.with('text', 'UNINSTALL')
$ruiObj.isExist
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_CheckPass) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason == "Install Failed"
end
logStopTest("05_01_05_02_StoreFrontDownload")
end
tcase << TestAction.new(:pressBack_16) do
pressBack
end
tcase << TestAction.new(:pressBack_17) do
pressBack
end
tcase << TestAction.new(:pressHome_19) do
pressHome
end
tcase.run(loopTime)
end
def self.StoreFrontDownload_05_01_05_04(loopTime)
tcase = TestCase.new("StoreFrontDownload_05_01_05_04")
tcase << TestAction.new(:scriptAction_1) do
logStartTest("05_01_05_04_StoreFrontDownload")
end
tcase << TestAction.new(:gotoApp_2) do
gotoApp('Play Store')
waitsecond(1)
end
tcase << TestAction.new(:ImageView_SearchBoxIdleText_5) do
$ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
.with('uitreeindex', 32)
.with('classname', 'ImageView')
.with('resource-id', 'com.android.vending:id/search_box_idle_text')
.with('content-desc', 'Search')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:EditText_SearchBoxTextInput_6) do
$ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
.with('uitreeindex', 32)
.with('classname', 'EditText')
.with('resource-id', 'com.android.vending:id/search_box_text_input')
$ruiObj.inputtext('ColorNote')
waitsecond(1)
end
tcase << TestAction.new(:TextView_SuggestText_7_Click_ColorNote) do
$ruiObj = RUIObject.new.with('objectid', 193809363).with('selfid', 208620854).with('textdescid', 1052874934).with('uniqueparentid', 0)
.with('uitreeindex', 36)
.with('classname', 'TextView')
.with('resource-id', 'com.android.vending:id/suggest_text')
.with('text', 'ColorNote Notepad Notes')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_LiTitle_2) do
$ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', -1969590474).with('textdescid', 83190698).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('resource-id', 'com.android.vending:id/li_title')
.with('content-desc', 'App: ColorNote Notepad Notes')
.with('text', 'ColorNote Notepad Notes')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_UninstallButton_15_pressed) do
$ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'Button')
.with('resource-id', 'com.android.vending:id/uninstall_button')
.with('text', 'UNINSTALL')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_Button1_16_pressed_OK) do
$ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'OK')
$ruiObj.click
waitsecond(8)
end
tcase << TestAction.new(:Button_BuyButton_18_Install) do
$ruiObj = RUIObject.new.with('objectid', 1237348910).with('selfid', -652886121).with('textdescid', 538738615).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'Button')
.with('resource-id', 'com.android.vending:id/buy_button')
.with('text', 'INSTALL')
$ruiObj.isExist
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_CheckPass) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason == "Install Failed"
end
logStopTest("05_01_05_07_StoreFrontDownload")
end
tcase << TestAction.new(:pressBack_16) do
pressBack
end
tcase << TestAction.new(:pressBack_17) do
pressBack
end
tcase << TestAction.new(:pressHome_19) do
pressHome
end
tcase.run(loopTime)
end
def self.StoreFrontDownload_05_01_05_06(loopTime)
tcase = TestCase.new("StoreFrontDownload_05_01_05_06")
tcase << TestAction.new(:scriptAction_1) do
logStartTest("05_01_05_06_StoreFrontDownload")
end
tcase << TestAction.new(:gotoApp_2) do
gotoApp('Play Store')
waitsecond(1)
end
tcase << TestAction.new(:ImageView_SearchBoxIdleText_12) do
$ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
.with('uitreeindex', 28)
.with('classname', 'ImageView')
.with('resource-id', 'com.android.vending:id/search_box_idle_text')
.with('content-desc', 'Search')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:EditText_SearchBoxTextInput_13) do
$ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
.with('uitreeindex', 28)
.with('classname', 'EditText')
.with('resource-id', 'com.android.vending:id/search_box_text_input')
$ruiObj.inputtext('ColorNote')
waitsecond(1)
end
tcase << TestAction.new(:TextView_SuggestText_16) do
$ruiObj = RUIObject.new.with('objectid', 193809363).with('selfid', 208620854).with('textdescid', 1052874934).with('uniqueparentid', 0)
.with('uitreeindex', 32)
.with('classname', 'TextView')
.with('resource-id', 'com.android.vending:id/suggest_text')
.with('text', 'ColorNote Notepad Notes')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_LiTitle_2) do
$ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', -1969590474).with('textdescid', 83190698).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('resource-id', 'com.android.vending:id/li_title')
.with('content-desc', 'App: ColorNote Notepad Notes')
.with('text', 'ColorNote Notepad Notes')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_LaunchButton_18) do
$ruiObj = RUIObject.new.with('objectid', 515078971).with('selfid', 328139855).with('textdescid', 387228145).with('uniqueparentid', 0)
.with('uitreeindex', 8)
.with('classname', 'Button')
.with('resource-id', 'com.android.vending:id/launch_button')
.with('text', 'OPEN')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_PermissionAllowButton_2) 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(2)
end
tcase << TestAction.new(:TextView_EmptyText_AddNoteCK) do
$ruiObj = RUIObject.new.with('objectid', -1225710509).with('selfid', -126164144).with('textdescid', -1803056542).with('uniqueparentid', 0)
.with('uitreeindex', 6)
.with('classname', 'TextView')
.with('resource-id', 'com.socialnmobile.dictapps.notepad.color.note:id/empty_text')
.with('text', 'Add Note')
$ruiObj.isExist
waitsecond(1)
end
tcase << TestAction.new(:pressBack_20) do
pressBack
end
tcase << TestAction.new(:scriptAction_22) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason == "Open DL app from Store Front Fail"
end
logStopTest("05_01_05_06_StoreFrontDownload")
end
tcase << TestAction.new(:pressBack_23) do
pressBack
end
tcase << TestAction.new(:pressBack_2) do
pressBack
end
tcase << TestAction.new(:pressHome_24) do
pressHome
end
tcase.run(loopTime)
end
def self.StoreFrontDownload_05_01_05_08(loopTime)
tcase = TestCase.new("StoreFrontDownload_05_01_05_08")
tcase << TestAction.new(:scriptAction_1) do
logStartTest("05_01_05_02_StoreFrontDownload")
end
tcase << TestAction.new(:gotoApp_2) do
gotoApp('Play Store')
waitsecond(2)
end
tcase << TestAction.new(:ImageView_SearchBoxIdleText_5) do
$ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
.with('uitreeindex', 32)
.with('classname', 'ImageView')
.with('resource-id', 'com.android.vending:id/search_box_idle_text')
.with('content-desc', 'Search')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:EditText_SearchBoxTextInput_6) do
$ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
.with('uitreeindex', 32)
.with('classname', 'EditText')
.with('resource-id', 'com.android.vending:id/search_box_text_input')
$ruiObj.inputtext('ColorNote')
waitsecond(1)
end
tcase << TestAction.new(:pressEnter_2) do
pressEnter
waitsecond(4)
end
tcase << TestAction.new(:TextView_LiTitle_2) do
$ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', -1969590474).with('textdescid', 83190698).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'TextView')
.with('resource-id', 'com.android.vending:id/li_title')
.with('content-desc', 'App: ColorNote Notepad Notes')
.with('text', 'ColorNote Notepad Notes')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_UninstallButton_UnInstall_exist) do
$ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'Button')
.with('resource-id', 'com.android.vending:id/uninstall_button')
.with('text', 'UNINSTALL')
$ruiObj.isExist
ifFailJumpTo(:Button_BuyButton_1)
waitsecond(1)
end
tcase << TestAction.new(:Button_UninstallButton_UninstallCK_1) do
$ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'Button')
.with('resource-id', 'com.android.vending:id/uninstall_button')
.with('text', 'UNINSTALL')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_Button1_Clk_OK) do
$ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'OK')
$ruiObj.click
waitsecond(4)
end
tcase << TestAction.new(:Button_BuyButton_1) do
$ruiObj = RUIObject.new.with('objectid', 1237348910).with('selfid', -652886121).with('textdescid', 538738615).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'Button')
.with('resource-id', 'com.android.vending:id/buy_button')
.with('text', 'INSTALL')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_PositiveButton_4) do
$ruiObj = RUIObject.new.with('objectid', 1281581194).with('selfid', -1901489946).with('textdescid', -1976674237).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Button')
.with('resource-id', 'com.android.vending:id/positive_button')
.with('text', 'CONTINUE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:wait1second_6) do
waitsecond(1)
end
tcase << TestAction.new(:Button_UninstallButton_4) do
$ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'Button')
.with('resource-id', 'com.android.vending:id/uninstall_button')
.with('text', 'UNINSTALL')
$ruiObj.isExist
waitsecond(1)
end
tcase << TestAction.new(:Button_UninstallButton_2) do
$ruiObj = RUIObject.new.with('objectid', 82686867).with('selfid', -895718918).with('textdescid', 1814403659).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'Button')
.with('resource-id', 'com.android.vending:id/uninstall_button')
.with('text', 'UNINSTALL')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Button1_4) do
$ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'OK')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_CheckPass) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason == "Install Failed"
end
logStopTest("05_01_05_02_StoreFrontDownload")
end
tcase << TestAction.new(:pressBack_16) do
pressBack
end
tcase << TestAction.new(:pressBack_17) do
pressBack
end
tcase << TestAction.new(:pressHome_19) do
pressHome
end
tcase.run(loopTime)
end
def self.Telephony_05_01_01_01(loopTime)
tcase = TestCase.new("Telephony_05_01_01_01")
tcase << TestAction.new(:scriptAction_StartTest_1) do
logStartTest("05_01_01_01_Telephony")
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_4) 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')
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_10_1) do
sendBTCmd('pressHome')
waitsecond(1)
end
tcase << TestAction.new(:ImageView_Button1_8) do
$ruiObj = RUIObject.new.with('objectid', -1827607533).with('selfid', 643737864).with('textdescid', -306619761).with('uniqueparentid', 0).with('classresourceid', -1143292048)
.with('uitreeindex', 13)
.with('classname', 'ImageView')
.with('resource-id', 'android:id/button1')
.with('content-desc', 'Call A01 a01')
$ruiObj.click
waitsecond(4)
end
tcase << TestAction.new(:wait8second_31) do
waitsecond(8)
end
tcase << TestAction.new(:scriptAction_10) do
sendBTCmd('answerCall')
waitsecond(8)
end
tcase << TestAction.new(:scriptAction_10_1) do
sendBTCmd('endCall')
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
$myTestResult = checkLastBTCmdResult
if $myTestResult == false
$myFailReason = "Call not come to other dev"
end
logStopTest("05_01_01_01_Telephony")
waitsecond(8)
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.Telephony_05_01_01_03(loopTime)
tcase = TestCase.new("Telephony_05_01_01_03")
tcase << TestAction.new(:scriptAction_StartTest_1) do
logStartTest("05_01_01_03_Telephony")
end
tcase << TestAction.new(:gotoApp_1_1) do
gotoApp('Phone')
end
tcase << TestAction.new(:TextView_Tabtext_2) do
$ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 715664122).with('textdescid', 24268628).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'TextView')
.with('resource-id', 'com.android.contacts:id/tabText')
.with('text', 'Call logs')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:ImageView_SecondaryActionIcon_2) do
$ruiObj = RUIObject.new.with('objectid', 1053896352).with('selfid', -1241359936).with('textdescid', 579079266).with('uniqueparentid', 0).with('classresourceid', -550590844)
.with('uitreeindex', 9)
.with('pretext', 'Groups?0')
.with('classname', 'ImageView')
.with('resource-id', 'com.android.contacts:id/secondary_action_icon')
.with('content-desc', 'Call A01 a01')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:wait8second_31) do
waitsecond(8)
end
tcase << TestAction.new(:scriptAction_10_1) do
sendBTCmd('answerCall')
waitsecond(8)
end
tcase << TestAction.new(:scriptAction_10_1_1) do
sendBTCmd('endCall')
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_LogStopTest) do
$myTestResult = checkLastBTCmdResult
if $myTestResult == false
$myFailReason = "Call not come to other dev"
end
logStopTest("05_01_01_03_Telephony")
end
tcase << TestAction.new(:Button_Endbutton_6) 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_1) do
pressBack
end
tcase << TestAction.new(:pressBack_2) do
pressBack
end
tcase.run(loopTime)
end
def self.Telephony_05_01_01_05(loopTime)
tcase = TestCase.new("Telephony_05_01_01_05")
tcase << TestAction.new(:pressHome_2) do
pressHome
end
tcase << TestAction.new(:scriptAction_StartTestLog_1) do
logStartTest("05_01_01_05_Telephony")
end
tcase << TestAction.new(:scriptAction_BTMakeCall) do
sendBTCmd("makeCall('#{db('CallNumber')[0]}')")
waitsecond(8)
end
tcase << TestAction.new(:wait8second_12) do
waitsecond(8)
end
tcase << TestAction.new(:wait8second_14) do
waitsecond(8)
end
tcase << TestAction.new(:wait8second_16) do
waitsecond(8)
end
tcase << TestAction.new(:answerSwipe) do
answerCall
waitsecond(2)
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', 10)
.with('classname', 'Button')
.with('resource-id', 'com.android.incallui:id/endButton')
.with('text', 'End')
$ruiObj.isNotExist
ifFailJumpTo(:Button_Endbutton_2_1)
waitsecond(1)
end
tcase << TestAction.new(:answerSwipe_1) do
answerCall
waitsecond(2)
end
tcase << TestAction.new(:Button_Endbutton_2_1) do
$ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
.with('uitreeindex', 10)
.with('classname', 'Button')
.with('resource-id', 'com.android.incallui:id/endButton')
.with('text', 'End')
$ruiObj.isExist
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_LogStopTest_1) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "End button not found"
end
logStopTest("05_01_01_05_Telephony")
end
tcase << TestAction.new(:scriptAction_BTEndCall) do
sendBTCmd('endCall')
end
tcase << TestAction.new(:Button_Endbutton_2_1_1) do
$ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
.with('uitreeindex', 10)
.with('classname', 'Button')
.with('resource-id', 'com.android.incallui:id/endButton')
.with('text', 'End')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:pressBack_1) do
pressBack
end
tcase << TestAction.new(:pressBack_2) do
pressBack
end
tcase.run(loopTime)
end
def self.Telephony_05_01_01_06(loopTime)
tcase = TestCase.new("Telephony_05_01_01_06")
tcase << TestAction.new(:scriptAction_StartTestLog) do
logStartTest("05_01_01_06_Telephony")
end
tcase << TestAction.new(:gotoApp_3) do
gotoApp('Phone')
waitsecond(2)
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('tn tn')
waitsecond(1)
end
tcase << TestAction.new(:TextView_tn_6) do
$ruiObj = RUIObject.new.with('objectid', 1836583107).with('selfid', -71120562).with('textdescid', 984860861).with('uniqueparentid', 0).with('classresourceid', -938935918)
.with('uitreeindex', 13)
.with('classname', 'TextView')
.with('content-desc', 'tn tn')
.with('text', 'tn tn')
$ruiObj.select('ItemFirst').click
waitsecond(1)
end
tcase << TestAction.new(:TextView_MenuDelete_2) do
$ruiObj = RUIObject.new.with('objectid', -1318735913).with('selfid', 1219450656).with('textdescid', 2068859689).with('uniqueparentid', 0)
.with('uitreeindex', 23)
.with('pretext', 'NOTIFICATION SOUND')
.with('classname', 'TextView')
.with('resource-id', 'com.android.contacts:id/menu_delete')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_Button1_43) do
$ruiObj = RUIObject.new.with('objectid', -195446968).with('selfid', 982364851).with('textdescid', -1387444483).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'DELETE')
$ruiObj.isExist
waitsecond(1)
end
tcase << TestAction.new(:Button_Button1_22_1) do
$ruiObj = RUIObject.new.with('objectid', -195446968).with('selfid', -1318451484).with('textdescid', 917278956).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'OK')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_LogStopTest) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "End button not found"
end
logStopTest("05_01_01_06_Telephony")
end
tcase << TestAction.new(:pressBack_2) do
pressBack
end
tcase << TestAction.new(:pressBack_3) do
pressBack
end
tcase.run(loopTime)
end
def self.Telephony_05_01_01_07(loopTime)
tcase = TestCase.new("Telephony_05_01_01_07")
tcase << TestAction.new(:scriptAction_StartTestLog) do
logStartTest("05_01_01_07_Telephony")
end
tcase << TestAction.new(:gotoApp_3) do
gotoApp('Phone')
waitsecond(2)
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(:ImageButton_AddContactButton_2) do
$ruiObj = RUIObject.new.with('objectid', 168201771).with('selfid', 2046190261).with('textdescid', 1812475979).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'ImageButton')
.with('resource-id', 'com.android.contacts:id/add_contact_button')
.with('content-desc', 'New contact')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:EditText_14) do
$ruiObj = RUIObject.new.with('objectid', -2023645967).with('selfid', 1666676343).with('textdescid', 1691484495).with('uniqueparentid', 0).with('classresourceid', 1666676343)
.with('uitreeindex', 6)
.with('pretext', 'Phone?0')
.with('classname', 'EditText')
$ruiObj.inputtext('tn tn')
waitsecond(1)
end
tcase << TestAction.new(:EditText_16) do
$ruiObj = RUIObject.new.with('objectid', 1622197326).with('selfid', 1666676343).with('textdescid', -1251490414).with('uniqueparentid', 0).with('classresourceid', 1666676343)
.with('uitreeindex', 9)
.with('pretext', 'Phone?1')
.with('classname', 'EditText')
$ruiObj.inputtext('00000000')
waitsecond(1)
end
tcase << TestAction.new(:Button_BtnSave_4) do
$ruiObj = RUIObject.new.with('objectid', 344009592).with('selfid', -1684371128).with('textdescid', -1561576549).with('uniqueparentid', 0)
.with('uitreeindex', 19)
.with('classname', 'Button')
.with('resource-id', 'com.android.contacts:id/btn_save')
.with('text', 'SAVE')
$ruiObj.isExist
waitsecond(1)
end
tcase << TestAction.new(:Button_BtnSave_20) do
$ruiObj = RUIObject.new.with('objectid', 344009592).with('selfid', -1684339352).with('textdescid', -1560591493).with('uniqueparentid', 0)
.with('uitreeindex', 16)
.with('classname', 'Button')
.with('resource-id', 'com.android.contacts:id/btn_save')
.with('text', 'Save')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Button1_2) do
$ruiObj = RUIObject.new.with('objectid', -195446968).with('selfid', 2077686463).with('textdescid', -1628829679).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'YES')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_LogStopTest) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "Contact is not saved"
end
logStopTest("05_01_01_07_Telephony")
end
tcase << TestAction.new(:pressBack_5) do
pressBack
end
tcase << TestAction.new(:pressBack_6) do
pressBack
end
tcase.run(loopTime)
end
def self.VideoTelephony_05_01_14_01(loopTime)
tcase = TestCase.new("VideoTelephony_05_01_14_01")
tcase << TestAction.new(:scriptAction_StartTest_1) do
logStartTest("VideoCall_01")
end
tcase << TestAction.new(:pressHome_1_1) do
pressHome
waitsecond(2)
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(:VideoCallButton) do
$attVideoCallButton = RUIObject.new.with('objectid', -209436562).with('selfid', 14418249).with('textdescid', 2097401202).with('uniqueparentid', 0).with('classresourceid', -1382351217)
.with('uitreeindex', 9)
.with('classname', 'ImageView')
.with('resource-id', 'com.android.contacts:id/eab_action_button')
$uplusVideoCallButton = RUIObject.new.with('objectid', -284633982).with('selfid', -1819582550).with('textdescid', -721488607).with('uniqueparentid', 0).with('classresourceid', 745414969)
.with('uitreeindex', 12)
.with('classname', 'ImageView')
.with('resource-id', 'com.android.contacts:id/first_action_button')
.with('content-desc', 'Video call')
if $attVideoCallButton.isExist
$attVideoCallButton.click
elsif $uplusVideoCallButton.isExist
$uplusVideoCallButton.click
end
waitsecond(2)
end
tcase << TestAction.new(:ImageView_FirstActionButton_4) do
$ruiObj = RUIObject.new.with('objectid', -284633982).with('selfid', -1819582550).with('textdescid', -721488607).with('uniqueparentid', 0).with('classresourceid', 745414969)
.with('uitreeindex', 12)
.with('classname', 'ImageView')
.with('resource-id', 'com.android.contacts:id/first_action_button')
.with('content-desc', 'Video call')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:wait8second_31) do
waitsecond(8)
end
tcase << TestAction.new(:scriptAction_18_1) do
sendBTCmd('answerCall')
waitsecond(8)
end
tcase << TestAction.new(:wait4second_2) do
waitsecond(4)
end
tcase << TestAction.new(:TextView_Callstatelabel_1_1) do
$ruiObj = RUIObject.new.with('objectid', -611515845).with('selfid', -821184504).with('textdescid', -1124622931).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('resource-id', 'com.android.incallui:id/callStateLabel')
.with('text', 'Incoming call')
$ruiObj.isNotExist
end
tcase << TestAction.new(:clickXY_672_1304_7) do
click(672,1304)
waitsecond(2)
end
tcase << TestAction.new(:Button_ButtonEndCall_47) do
$ruiObj = RUIObject.new.with('objectid', 2079422435).with('selfid', 2024460923).with('textdescid', -392104734).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'Button')
.with('resource-id', 'com.android.incallui:id/button_end_call')
.with('text', 'End')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_18_1_1) do
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_ButtonEndCall_4) do
$ruiObj = RUIObject.new.with('objectid', 449066258).with('selfid', 2024460923).with('textdescid', -1859117805).with('uniqueparentid', 0)
.with('uitreeindex', 8)
.with('classname', 'Button')
.with('resource-id', 'com.android.incallui:id/button_end_call')
.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 << TestAction.new(:pressHome_1) do
pressHome
waitsecond(2)
end
tcase.run(loopTime)
end
def self.VideoTelephony_05_01_14_02(loopTime)
tcase = TestCase.new("VideoTelephony_05_01_14_02")
tcase << TestAction.new(:scriptAction_StartTest_1) do
logStartTest("VideoCall_02")
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_23) do
$ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 566119687).with('textdescid', 1861262411).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'com.android.contacts:id/tabText')
.with('text', 'Dial')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_2) do
$ruiObj = RUIObject.new.with('objectid', 477485968).with('selfid', -1326421482).with('textdescid', 1917163152).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'EditText')
.with('resource-id', 'com.android.contacts:id/digits')
$ruiObj.inputtext("#{db('CallNumber')[1]}")
waitsecond(2)
end
tcase << TestAction.new(:pressBack_2) do
pressBack
waitsecond(2)
end
tcase << TestAction.new(:ImageButton_Btnvt_6) do
$ruiObj = RUIObject.new.with('objectid', -999718621).with('selfid', -1888469943).with('textdescid', -1795784128).with('uniqueparentid', 0)
.with('uitreeindex', 61)
.with('classname', 'ImageButton')
.with('resource-id', 'com.android.contacts:id/btnVT')
.with('content-desc', 'Video Call')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:wait8second_2) do
waitsecond(8)
end
tcase << TestAction.new(:scriptAction_18_1) do
sendBTCmd('answerCall')
waitsecond(8)
end
tcase << TestAction.new(:wait4second_2) do
waitsecond(4)
end
tcase << TestAction.new(:TextView_Callstatelabel_1_1_1) do
$ruiObj = RUIObject.new.with('objectid', -611515845).with('selfid', -821184504).with('textdescid', -1124622931).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('resource-id', 'com.android.incallui:id/callStateLabel')
.with('text', 'Incoming call')
$ruiObj.isNotExist
end
tcase << TestAction.new(:clickXY_864_1484_4) do
click(864,1484)
waitsecond(2)
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_02")
end
tcase << TestAction.new(:Button_ButtonEndCall_4) do
$ruiObj = RUIObject.new.with('objectid', 449066258).with('selfid', 2024460923).with('textdescid', -1859117805).with('uniqueparentid', 0)
.with('uitreeindex', 8)
.with('classname', 'Button')
.with('resource-id', 'com.android.incallui:id/button_end_call')
.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.VideoTelephony_05_01_14_03(loopTime)
tcase = TestCase.new("VideoTelephony_05_01_14_03")
tcase << TestAction.new(:scriptAction_StartTest_1) do
logStartTest("VideoCall_03")
end
tcase << TestAction.new(:scriptAction_18_1_1) do
sendBTCmd("makeVideoCall('#{db('CallNumber')[0]}')")
waitsecond(32)
end
tcase << TestAction.new(:scriptAction_26) do
answerCall
waitsecond(8)
end
tcase << TestAction.new(:wait4second_2) do
waitsecond(4)
end
tcase << TestAction.new(:clickXY_836_1144_4) do
click(836,1144)
waitsecond(2)
end
tcase << TestAction.new(:TextView_Callstatelabel_1_1_1_1) do
$ruiObj = RUIObject.new.with('objectid', -611515845).with('selfid', -821184504).with('textdescid', -1124622931).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('resource-id', 'com.android.incallui:id/callStateLabel')
.with('text', 'Incoming call')
$ruiObj.isNotExist
end
tcase << TestAction.new(:scriptAction_2) do
endCall
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_LogStopTest_1_1_1) do
$myTestResult = checkLastBTCmdResult
if $myTestResult == false
$myFailReason = "Call not come to other dev"
end
logStopTest("VideoCall_03")
end
tcase.run(loopTime)
end
def self.VideoTelephony_05_01_14_04(loopTime)
tcase = TestCase.new("VideoTelephony_05_01_14_04")
tcase << TestAction.new(:scriptAction_StartTest_1) do
logStartTest("VideoCall_04")
end
tcase << TestAction.new(:scriptAction_18_1_1) do
sendBTCmd("makeVideoCall('#{db('CallNumber')[0]}')")
waitsecond(32)
end
tcase << TestAction.new(:scriptAction_26) do
answerCall
waitsecond(8)
end
tcase << TestAction.new(:wait4second_2) do
waitsecond(4)
end
tcase << TestAction.new(:clickXY_868_1328_4) do
click(868,1328)
waitsecond(2)
end
tcase << TestAction.new(:TextView_Callstatelabel_1_1_1_1_1) do
$ruiObj = RUIObject.new.with('objectid', -611515845).with('selfid', -821184504).with('textdescid', -1124622931).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('resource-id', 'com.android.incallui:id/callStateLabel')
.with('text', 'Incoming call')
$ruiObj.isNotExist
end
tcase << TestAction.new(:scriptAction_2) do
endCall
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_LogStopTest_1_1_1) do
$myTestResult = checkLastBTCmdResult
if $myTestResult == false
$myFailReason = "Call not come to other dev"
end
logStopTest("VideoCall_04")
end
tcase.run(loopTime)
end
def self.VideoTelephony_05_01_14_05(loopTime)
tcase = TestCase.new("VideoTelephony_05_01_14_05")
tcase << TestAction.new(:scriptAction_StartTest_1) do
logStartTest("VideoCall_05")
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_23) do
$ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 566119687).with('textdescid', 1861262411).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'com.android.contacts:id/tabText')
.with('text', 'Dial')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_2) do
$ruiObj = RUIObject.new.with('objectid', 477485968).with('selfid', -1326421482).with('textdescid', 1917163152).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'EditText')
.with('resource-id', 'com.android.contacts:id/digits')
$ruiObj.inputtext("#{db('CallNumber')[1]}")
waitsecond(2)
end
tcase << TestAction.new(:ImageButton_Btnvt_6) do
$ruiObj = RUIObject.new.with('objectid', -999718621).with('selfid', -1888469943).with('textdescid', -1795784128).with('uniqueparentid', 0)
.with('uitreeindex', 61)
.with('classname', 'ImageButton')
.with('resource-id', 'com.android.contacts:id/btnVT')
.with('content-desc', 'Video Call')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:wait8second_2) do
waitsecond(8)
end
tcase << TestAction.new(:scriptAction_18_1) do
sendBTCmd('answerCall')
waitsecond(8)
end
tcase << TestAction.new(:wait4second_2) do
waitsecond(4)
end
tcase << TestAction.new(:clickXY_828_1472_4) do
click(828,1472)
waitsecond(2)
end
tcase << TestAction.new(:TextView_Callstatelabel_1_1_1_1_1_1) do
$ruiObj = RUIObject.new.with('objectid', -611515845).with('selfid', -821184504).with('textdescid', -1124622931).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('resource-id', 'com.android.incallui:id/callStateLabel')
.with('text', 'Incoming call')
$ruiObj.isNotExist
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_05")
end
tcase << TestAction.new(:Button_ButtonEndCall_4) do
$ruiObj = RUIObject.new.with('objectid', 449066258).with('selfid', 2024460923).with('textdescid', -1859117805).with('uniqueparentid', 0)
.with('uitreeindex', 8)
.with('classname', 'Button')
.with('resource-id', 'com.android.incallui:id/button_end_call')
.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.WiFi_05_01_10_01(loopTime)
tcase = TestCase.new("WiFi_05_01_10_01")
tcase << TestAction.new(:scriptAction_2) do
logStartTest("05_01_10_01_WiFi")
end
tcase << TestAction.new(:scriptAction_21) do
gotoSettings
waitsecond(2)
end
tcase << TestAction.new(:TextView_Title_2) do
$ruiObj = RUIObject.new.with('objectid', 674368800).with('selfid', -2078686330).with('textdescid', -957350501).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Networks')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:swipeUp_1) do
swipe_vertical_back 500
end
tcase << TestAction.new(:TextView_Title_28) do
$ruiObj = RUIObject.new.with('objectid', -1417852313).with('selfid', -589731018).with('textdescid', 1796571250).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 16)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'WiFi')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ImageView_Icon_2) do
$ruiObj = RUIObject.new.with('objectid', -1337042610).with('selfid', -1580627678).with('textdescid', 1501352082).with('uniqueparentid', 0).with('classresourceid', -858811928)
.with('uitreeindex', 8)
.with('pretext', 'WiFi networks')
.with('classname', 'ImageView')
.with('resource-id', 'android:id/icon')
$ruiObj.isExist
ifFailJumpTo(:Switch_OFF_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(2)
end
tcase << TestAction.new(:Switch_OFF_10) 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(4)
end
tcase << TestAction.new(:Switch_ON_14) 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(4)
end
tcase << TestAction.new(:TextView_Title_245_1) 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.isExist
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_10_TrueFalse) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "WiFi cannot turn ON"
end
logStopTest("05_01_10_01_WiFi")
waitsecond(1)
end
tcase << TestAction.new(:pressBack_20) do
pressBack
end
tcase << TestAction.new(:pressBack_21) do
pressBack
end
tcase << TestAction.new(:pressHome_22) do
pressHome
end
tcase.run(loopTime)
end
def self.WiFi_05_01_10_02(loopTime)
tcase = TestCase.new("WiFi_05_01_10_02")
tcase << TestAction.new(:scriptAction_2) do
logStartTest("05_01_10_02_WiFi")
end
tcase << TestAction.new(:scriptAction_29) do
gotoSettings
waitsecond(2)
end
tcase << TestAction.new(:TextView_Title_2) do
$ruiObj = RUIObject.new.with('objectid', 674368800).with('selfid', -2078686330).with('textdescid', -957350501).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Networks')
$ruiObj.click
end
tcase << TestAction.new(:swipeUp_2) do
swipe_vertical_back 500
end
tcase << TestAction.new(:TextView_Title_27) do
$ruiObj = RUIObject.new.with('objectid', -1417852313).with('selfid', -589731018).with('textdescid', 1796571250).with('uniqueparentid', -1113009554).with('classresourceid', 490183159)
.with('uitreeindex', 16)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'WiFi')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_28) do
$connectedObj = RUIObject.new.with('objectid', 231187981).with('selfid', -404041766).with('textdescid', -632905142).with('uniqueparentid', 0).with('classresourceid', -1930775675)
.with('uitreeindex', 13)
.with('classname', 'TextView')
.with('resource-id', 'android:id/summary')
.with('text', 'Connected')
$forgetObj = RUIObject.new.with('objectid', -360890208).with('selfid', 1729096951).with('textdescid', -493869997).with('uniqueparentid', 1382955622)
.with('uitreeindex', 12)
.with('classname', 'Button')
.with('resource-id', 'android:id/button3')
.with('text', 'FORGET')
$switchOnObj = RUIObject.new.with('objectid', 1178284996).with('selfid', 1645353587).with('textdescid', -1975291963).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Switch')
.with('text', 'ON')
$switchOffObj = RUIObject.new.with('objectid', 1178284996).with('selfid', -533646533).with('textdescid', -1104515187).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Switch')
.with('text', 'OFF')
if $switchOnObj.isExist
if $connectedObj.isExist
$connectedObj.click
waitsecond(1)
$forgetObj.click
waitsecond(1)
end
else
$switchOffObj.click
end
waitsecond(4)
end
tcase << TestAction.new(:Add_wifi) 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(2)
end
tcase << TestAction.new(:TextView_Title_6) 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(2)
end
tcase << TestAction.new(:EditText_Ssid_8) 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(4)
end
tcase << TestAction.new(:TextView_Text1_2) do
$ruiObj = RUIObject.new.with('objectid', 189805031).with('selfid', -586759035).with('textdescid', 1468089423).with('uniqueparentid', 0).with('classresourceid', 490068035)
.with('uitreeindex', 4)
.with('classname', 'TextView')
.with('resource-id', 'android:id/text1')
.with('text', 'None')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:CheckedTextView_Text1_5) do
$ruiObj = RUIObject.new.with('objectid', -540328984).with('selfid', 1449740166).with('textdescid', -877093410).with('uniqueparentid', 0).with('classresourceid', 2074814108)
.with('uitreeindex', 2)
.with('classname', 'CheckedTextView')
.with('resource-id', 'android:id/text1')
.with('text', 'WPAWPA2 PSK')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:EditText_Password_17_1) 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(4)
end
tcase << TestAction.new(:Button_Button1_10) 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_Summary_2) do
$ruiObj = RUIObject.new.with('objectid', 1704199271).with('selfid', -404041766).with('textdescid', -634935376).with('uniqueparentid', 0).with('classresourceid', -1930775675)
.with('uitreeindex', 7)
.with('classname', 'TextView')
.with('resource-id', 'android:id/summary')
.with('text', 'Connected')
$ruiObj.isExist
waitsecond(1)
end
tcase << TestAction.new(:TextView_Summary_29) do
$ruiObj = RUIObject.new.with('objectid', 231187981).with('selfid', -404041766).with('textdescid', -632905142).with('uniqueparentid', 0).with('classresourceid', -1930775675)
.with('uitreeindex', 11)
.with('classname', 'TextView')
.with('resource-id', 'android:id/summary')
.with('text', 'Connected')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Button3_4) do
$ruiObj = RUIObject.new.with('objectid', -360890208).with('selfid', 1729096951).with('textdescid', -493869997).with('uniqueparentid', 0)
.with('uitreeindex', 12)
.with('classname', 'Button')
.with('resource-id', 'android:id/button3')
.with('text', 'FORGET')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_23_TrueFalse) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason == "WiFi cannot connected"
end
logStopTest("05_01_10_02_WiFi")
end
tcase << TestAction.new(:Switch_OFF_19_1) do
$ruiObj = RUIObject.new.with('objectid', 1178284996).with('selfid', 1645353587).with('textdescid', -1975291963).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Switch')
.with('text', 'OFF')
if !$ruiObj.isExist
$ruiObj.click
end
waitsecond(2)
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.WiFi_Calling_05_01_16_01(loopTime)
tcase = TestCase.new("WiFi_Calling_05_01_16_01")
tcase << TestAction.new(:scriptAction_StartTest_1) do
logStartTest("05_01_16_01_WiFI_Calling")
end
tcase << TestAction.new(:pressHome_4) do
pressHome
end
tcase << TestAction.new(:TextView_Phone_21) do
$ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
.with('uitreeindex', 20)
.with('classname', 'TextView')
.with('content-desc', 'Phone')
.with('text', 'Phone')
$ruiObj.click
waitsecond(2)
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_4) 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')
waitsecond(1)
end
tcase << TestAction.new(:scriptAction_10_1) do
sendBTCmd('pressHome')
end
tcase << TestAction.new(:ImageView_Button1_8) do
$ruiObj = RUIObject.new.with('objectid', -1827607533).with('selfid', 643737864).with('textdescid', -306619761).with('uniqueparentid', 0).with('classresourceid', -1143292048)
.with('uitreeindex', 13)
.with('classname', 'ImageView')
.with('resource-id', 'android:id/button1')
.with('content-desc', 'Call A01 a01')
$ruiObj.click
waitsecond(4)
end
tcase << TestAction.new(:wait8second_31) do
waitsecond(8)
end
tcase << TestAction.new(:scriptAction_10) do
sendBTCmd('answerCall')
waitsecond(8)
end
tcase << TestAction.new(:scriptAction_10_1) do
if rand(100) < 0
sendBTCmd('endCall')
waitsecond(1)
end
end
tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
$myTestResult = checkLastBTCmdResult
if $myTestResult == false
$myFailReason = "Call not come to other dev"
end
logStopTest("05_01_16_01_WiFI_Calling")
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.WiFi_Calling_05_01_16_02(loopTime)
tcase = TestCase.new("WiFi_Calling_05_01_16_02")
tcase << TestAction.new(:scriptAction_StartTest_1) do
logStartTest("05_01_16_02_WiFI_Calling")
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_21) do
$ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 566119687).with('textdescid', 1861262411).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'com.android.contacts:id/tabText')
.with('text', 'Dial')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:EditText_Digits_4) do
$ruiObj = RUIObject.new.with('objectid', 477485968).with('selfid', -1326421482).with('textdescid', 1917163152).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'EditText')
.with('resource-id', 'com.android.contacts:id/digits')
$ruiObj.inputtext('18003310500')
waitsecond(2)
end
tcase << TestAction.new(:pressBack_2) do
pressBack
waitsecond(2)
end
tcase << TestAction.new(:ImageButton_Btnlogscall_4) do
$ruiObj = RUIObject.new.with('objectid', -1934426254).with('selfid', -2053967649).with('textdescid', -911487124).with('uniqueparentid', 0)
.with('uitreeindex', 35)
.with('classname', 'ImageButton')
.with('resource-id', 'com.android.contacts:id/btnLogsCall')
.with('content-desc', 'Call')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ImageButton_Btnwificall_2) do
$ruiObj = RUIObject.new.with('objectid', -1011300904).with('selfid', 328499424).with('textdescid', -1103889439).with('uniqueparentid', -2088664203)
.with('uitreeindex', 35)
.with('classname', 'ImageButton')
.with('resource-id', 'com.android.contacts:id/btnWifiCall')
.with('content-desc', 'Wifi call')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:wait8second_31) do
waitsecond(8)
end
tcase << TestAction.new(:Button_Endbutton_6) do
$ruiObj = RUIObject.new.with('objectid', -2133227471).with('selfid', 1277076029).with('textdescid', -2023955116).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'Button')
.with('resource-id', 'com.android.incallui:id/endButton')
.with('text', 'End')
$ruiObj.isExist
end
tcase << TestAction.new(:Button_Endbutton_6_1) do
$ruiObj = RUIObject.new.with('objectid', -2133227471).with('selfid', 1277076029).with('textdescid', -2023955116).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'Button')
.with('resource-id', 'com.android.incallui:id/endButton')
.with('text', 'End')
$ruiObj.click
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("05_01_16_01_WiFI_Calling")
end
tcase << TestAction.new(:pressBack_3) do
pressBack
end
tcase << TestAction.new(:pressBack_4) do
pressBack
end
tcase.run(loopTime)
end
def self.WiFi_Calling_05_01_16_03(loopTime)
tcase = TestCase.new("WiFi_Calling_05_01_16_03")
tcase << TestAction.new(:wfc_enabled) do
sendBTCmd('wfc_enabled')
waitsecond(32)
end
tcase << TestAction.new(:turnOnWiFi) do
sendBTCmd('turnOnWiFi')
waitsecond(32)
end
tcase << TestAction.new(:wait20second_4) do
waitsecond(20)
end
tcase << TestAction.new(:scriptAction_StartTestLog_1) do
logStartTest("05_01_16_03_WiFI_Calling")
end
tcase << TestAction.new(:scriptAction_BTMakeCall) do
sendBTCmd("makeCall('#{db('CallNumber')[0]}')")
waitsecond(8)
end
tcase << TestAction.new(:wait8second_10) do
waitsecond(8)
end
tcase << TestAction.new(:scriptAction_3_1) do
sendBTCmd("uiObj('ImageButton').desc('Call').click")
waitsecond(8)
end
tcase << TestAction.new(:answerSwipe) do
answerCall
waitsecond(8)
end
tcase << TestAction.new(:scriptAction_BTEndCall_1) do
sendBTCmd('endCall')
end
tcase << TestAction.new(:Button_Endbutton_5) do
$ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
.with('uitreeindex', 13)
.with('classname', 'Button')
.with('resource-id', 'com.android.incallui:id/endButton')
.with('text', 'End')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_7) do
sendBTCmd('wfc_disabled')
waitsecond(2)
end
tcase << TestAction.new(:turnOffWiFi) do
sendBTCmd('turnOffWiFi')
waitsecond(32)
end
tcase << TestAction.new(:wfc_disabled) do
sendBTCmd('wfc_disabled')
waitsecond(32)
end
tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
$myTestResult = checkLastBTCmdResult
if $myTestResult == false
$myFailReason = "Call not come to other dev"
end
logStopTest("05_01_16_03_WiFI_Calling")
waitsecond(2)
end
tcase << TestAction.new(:pressBack_1) do
pressBack
end
tcase << TestAction.new(:pressBack_2) do
pressBack
end
tcase << TestAction.new(:pressHome_7) do
pressHome
waitsecond(2)
end
tcase.run(loopTime)
end
def self.WiFi_Calling_Disabled(loopTime)
tcase = TestCase.new("WiFi_Calling_Disabled")
tcase << TestAction.new(:scriptAction_4) do
wfc_disabled
waitsecond(2)
end
tcase.run(loopTime)
end
def self.WiFi_Calling_Enabled(loopTime)
tcase = TestCase.new("WiFi_Calling_Enabled")
tcase << TestAction.new(:scriptAction_1) do
wfc_enabled
waitsecond(2)
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(:pressHome_2) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_Phone_4) do
$ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 1923496804).with('textdescid', -1252643750).with('uniqueparentid', 0)
.with('uitreeindex', 20)
.with('classname', 'TextView')
.with('content-desc', 'Phone')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:EditText_Digits_6) do
$ruiObj = RUIObject.new.with('objectid', 477485968).with('selfid', -1326421482).with('textdescid', 1917163152).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'EditText')
.with('resource-id', 'com.android.contacts:id/digits')
$ruiObj.inputtext('*#546368#*910#')
waitsecond(2)
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_21) do
turnOnWiFi
waitsecond(2)
end
tcase.run(loopTime)
end
def self.disconnectWifi(loopTime)
tcase = TestCase.new("disconnectWifi")
tcase << TestAction.new(:scriptAction_2) do
turnOffWiFi
waitsecond(2)
end
tcase.run(loopTime)
end
def self.startTest(loopTime)
tcase = TestCase.new("startTest")
tcase << TestAction.new(:pressRecentApps_1) do
pressRecentApps
waitsecond(2)
end
tcase << TestAction.new(:TextView_Button_3) do
$ruiObj = RUIObject.new.with('objectid', -213794734).with('selfid', -204985471).with('textdescid', 1763854688).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'TextView')
.with('resource-id', 'com.android.systemui:id/button')
.with('text', 'CLEAR ALL')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:pressHome_5) do
pressHome
waitsecond(2)
end
tcase.run(loopTime)
end
def self.MultiMedia_05_01_07_01(loopTime)
tcase = TestCase.new("MultiMedia_05_01_07_01")
tcase << TestAction.new(:scriptAction_1) do
logStartTest("05_01_07_01_MultiMedia")
end
tcase << TestAction.new(:pressHome_2) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_Camera_4) do
$ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 643708137).with('textdescid', 953340153).with('uniqueparentid', 0)
.with('uitreeindex', 26)
.with('classname', 'TextView')
.with('content-desc', 'Camera')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_OkButton_23) do
$ruiObj = RUIObject.new.with('objectid', 598194823).with('selfid', -286954065).with('textdescid', -162611849).with('uniqueparentid', 0)
.with('uitreeindex', 20)
.with('classname', 'Button')
.with('resource-id', 'com.lge.camera:id/ok_button')
.with('text', 'TURN ON')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_PermissionAllowButton_4) 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(1)
end
tcase << TestAction.new(:Button_CancelButton_2) do
$ruiObj = RUIObject.new.with('objectid', -1613946387).with('selfid', -1673499114).with('textdescid', -814734932).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'Button')
.with('resource-id', 'com.lge.camera:id/cancel_button')
.with('text', 'No')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:shutter) do
$ruiObj = RUIObject.new.with('objectid', -1799776401).with('selfid', -1818636331).with('textdescid', -839551902).with('uniqueparentid', 0)
.with('uitreeindex', 13)
.with('classname', 'ImageButton')
.with('resource-id', 'com.lge.camera:id/shutter_top_comp')
.with('content-desc', 'Start recording')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:wait30second_14) do
waitsecond(30)
end
tcase << TestAction.new(:ImageButton_ShutterTopCompType_4) do
$ruiObj = RUIObject.new.with('objectid', -1695967134).with('selfid', 685856113).with('textdescid', -1035373570).with('uniqueparentid', 0)
.with('uitreeindex', 4)
.with('classname', 'ImageButton')
.with('resource-id', 'com.lge.camera:id/shutter_top_comp_type')
$ruiObj.click
waitsecond(4)
end
tcase << TestAction.new(:scriptAction_5) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason == "Video does not exist"
end
logStopTest("05_01_07_01_MultiMedia")
end
tcase << TestAction.new(:pressBack_6) do
pressBack
end
tcase << TestAction.new(:pressBack_7) do
pressBack
end
tcase << TestAction.new(:pressHome_8) do
pressHome
end
tcase.run(loopTime)
end
def self.MultiMedia_05_01_07_02(loopTime)
tcase = TestCase.new("MultiMedia_05_01_07_02")
tcase << TestAction.new(:scriptAction_1) do
logStartTest("05_01_07_02_MultiMedia")
end
tcase << TestAction.new(:gotoApp_6) do
gotoApp('Photos')
waitsecond(2)
end
tcase << TestAction.new(:Button_PermissionAllowButton_8) do
$ruiObj = RUIObject.new.with('objectid', -886457929).with('selfid', 1443382411).with('textdescid', 270556320).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'Button')
.with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
.with('text', 'ALLOW')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_DoneButton_10) do
$ruiObj = RUIObject.new.with('objectid', 783260418).with('selfid', -544460817).with('textdescid', 966408768).with('uniqueparentid', 0)
.with('uitreeindex', 12)
.with('classname', 'Button')
.with('resource-id', 'com.google.android.apps.photos:id/done_button')
.with('text', 'DONE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:clickXY_198_927_18) do
click(198,927)
waitsecond(2)
end
tcase << TestAction.new(:wait20second_4) do
waitsecond(20)
end
tcase << TestAction.new(:clickXY_296_832_8) do
click(296,832)
waitsecond(1)
end
tcase << TestAction.new(:ImageButton_PhotosVideoplayerPauseButton_21) do
$ruiObj = RUIObject.new.with('objectid', 2084403556).with('selfid', -1751474194).with('textdescid', -1425281099).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'ImageButton')
.with('resource-id', 'com.google.android.apps.photos:id/photos_videoplayer_pause_button')
.with('content-desc', 'Pause video')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ImageButton_PhotosVideoplayerPlayButton_23) do
$ruiObj = RUIObject.new.with('objectid', -1006546432).with('selfid', -44944040).with('textdescid', 1407363855).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'ImageButton')
.with('resource-id', 'com.google.android.apps.photos:id/photos_videoplayer_play_button')
.with('content-desc', 'Play video')
$ruiObj.isExist
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_7) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason = "Video did not play successfuly"
end
logStopTest("05_01_07_02_MultiMedia")
end
tcase << TestAction.new(:pressBack_8) do
pressBack
end
tcase << TestAction.new(:pressBack_9) do
pressBack
end
tcase << TestAction.new(:pressHome_10) do
pressHome
end
tcase.run(loopTime)
end
def self.MultiMedia_05_01_07_03(loopTime)
tcase = TestCase.new("MultiMedia_05_01_07_03")
tcase << TestAction.new(:scriptAction_1) do
logStartTest("05_01_07_03_MultiMedia")
end
tcase << TestAction.new(:pressHome_2) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_Camera_4) do
$ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 643708137).with('textdescid', 953340153).with('uniqueparentid', 0)
.with('uitreeindex', 26)
.with('classname', 'TextView')
.with('content-desc', 'Camera')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_OkButton_2) do
$ruiObj = RUIObject.new.with('objectid', 598194823).with('selfid', -286954065).with('textdescid', -162611849).with('uniqueparentid', 0)
.with('uitreeindex', 20)
.with('classname', 'Button')
.with('resource-id', 'com.lge.camera:id/ok_button')
.with('text', 'TURN ON')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ImageView_Thumbnail_2) do
$ruiObj = RUIObject.new.with('objectid', -2123601541).with('selfid', -135259702).with('textdescid', 357252685).with('uniqueparentid', 0)
.with('uitreeindex', 15)
.with('classname', 'ImageView')
.with('resource-id', 'com.lge.camera:id/thumbnail')
.with('content-desc', 'Gallery')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_ResolverText_2) do
$ruiObj = RUIObject.new.with('objectid', 1736845148).with('selfid', -1759292798).with('textdescid', 1927923419).with('uniqueparentid', 0).with('classresourceid', -472389065)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'com.lge:id/resolver_text')
.with('text', 'Photos')
$ruiObj.click
waitsecond(2)
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
waitsecond(2)
end
tcase << TestAction.new(:ImageView_DeleteDeviceCopy_2) do
$ruiObj = RUIObject.new.with('objectid', -1471961222).with('selfid', 1093172219).with('textdescid', 70004977).with('uniqueparentid', 0)
.with('uitreeindex', 15)
.with('classname', 'ImageView')
.with('resource-id', 'com.google.android.apps.photos:id/delete_device_copy')
.with('content-desc', 'Delete')
$ruiObj.isExist
end
tcase << TestAction.new(:ImageView_DeleteDeviceCopy_2_1) do
$ruiObj = RUIObject.new.with('objectid', -1471961222).with('selfid', 1093172219).with('textdescid', 70004977).with('uniqueparentid', 0)
.with('uitreeindex', 15)
.with('classname', 'ImageView')
.with('resource-id', 'com.google.android.apps.photos:id/delete_device_copy')
.with('content-desc', 'Delete')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Button1_5) do
$ruiObj = RUIObject.new.with('objectid', -767191037).with('selfid', 982364851).with('textdescid', -1621738312).with('uniqueparentid', 0).with('classresourceid', 1834539358)
.with('uitreeindex', 4)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'DELETE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_4) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason == "Video fail to delete"
end
logStopTest("05_01_07_03_MultiMedia")
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.MultiMedia_05_01_07_04(loopTime)
tcase = TestCase.new("MultiMedia_05_01_07_04")
tcase << TestAction.new(:scriptAction_1) do
logStartTest("05_01_07_04_MultiMedia")
end
tcase << TestAction.new(:pressHome_2) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:TextView_Camera_4) do
$ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 643708137).with('textdescid', 953340153).with('uniqueparentid', 0)
.with('uitreeindex', 26)
.with('classname', 'TextView')
.with('content-desc', 'Camera')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_OkButton_2) do
$ruiObj = RUIObject.new.with('objectid', 598194823).with('selfid', -286954065).with('textdescid', -162611849).with('uniqueparentid', 0)
.with('uitreeindex', 20)
.with('classname', 'Button')
.with('resource-id', 'com.lge.camera:id/ok_button')
.with('text', 'TURN ON')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_PermissionAllowButton_4_1) 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(1)
end
tcase << TestAction.new(:ImageButton_ShutterBottomCompType_2) do
$ruiObj = RUIObject.new.with('objectid', 215322368).with('selfid', -857985467).with('textdescid', -1914941152).with('uniqueparentid', 0)
.with('uitreeindex', 10)
.with('classname', 'ImageButton')
.with('resource-id', 'com.lge.camera:id/shutter_bottom_comp_type')
$ruiObj.isExist
end
tcase << TestAction.new(:ImageButton_ShutterBottomCompType_6) do
$ruiObj = RUIObject.new.with('objectid', 215322368).with('selfid', -857985467).with('textdescid', -1914941152).with('uniqueparentid', 0)
.with('uitreeindex', 10)
.with('classname', 'ImageButton')
.with('resource-id', 'com.lge.camera:id/shutter_bottom_comp_type')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ImageView_Thumbnail_2) do
$ruiObj = RUIObject.new.with('objectid', -2123601541).with('selfid', -135259702).with('textdescid', 357252685).with('uniqueparentid', 0)
.with('uitreeindex', 21)
.with('classname', 'ImageView')
.with('resource-id', 'com.lge.camera:id/thumbnail')
.with('content-desc', 'Gallery')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ImageView_Share_4) do
$ruiObj = RUIObject.new.with('objectid', 273969551).with('selfid', 1722741712).with('textdescid', 1566342766).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'ImageView')
.with('resource-id', 'com.google.android.apps.photos:id/share')
.with('content-desc', 'Share')
$ruiObj.isExist
end
tcase << TestAction.new(:ImageView_DeleteDeviceCopy_6) do
$ruiObj = RUIObject.new.with('objectid', -1471961222).with('selfid', 1093172219).with('textdescid', 70004977).with('uniqueparentid', 0)
.with('uitreeindex', 10)
.with('classname', 'ImageView')
.with('resource-id', 'com.google.android.apps.photos:id/delete_device_copy')
.with('content-desc', 'Delete')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Button1_8) do
$ruiObj = RUIObject.new.with('objectid', -767191037).with('selfid', 982364851).with('textdescid', -1621738312).with('uniqueparentid', 0).with('classresourceid', 1834539358)
.with('uitreeindex', 4)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'DELETE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_10) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason == "Take picture FAILED"
end
logStopTest("05_01_07_04_MultiMedia")
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.mainLoop(loopTime)
WebSocketXServer.setAutoUpdate(false)
index = $mainResumeMainLoop
$mainResumeMainLoop = 0
writelog("mainLoop::#{index}::Resume") if index > 0
while index < loopTime
$curMainLoopNum = index
$saveLogToGist = false
$POWERLOG = true
$actionParamInput = "none"
Telephony_05_01_01_01 100
$actionParamInput = "none"
Telephony_05_01_01_03 100
$actionParamInput = "none"
Telephony_05_01_01_05 100
$actionParamInput = "none"
Telephony_05_01_01_07 20
$actionParamInput = "none"
Telephony_05_01_01_06 20
if rand(100) < 0
$actionParamInput = "none"
Messaging_05_01_02_03 50
end
if rand(100) < 0
$actionParamInput = "none"
Messaging_05_01_02_05 50
end
if rand(100) < 0
$actionParamInput = "none"
Messaging_05_01_02_06 50
end
$actionParamInput = "none"
Gmail_05_01_03_01 50
$actionParamInput = "none"
Gmail_05_01_03_02 50
$actionParamInput = "none"
Gmail_05_01_03_03 50
$actionParamInput = "none"
Browser_05_01_04_01 50
$actionParamInput = "none"
Browser_05_01_04_02 50
$actionParamInput = "none"
Browser_05_01_04_03 10
$actionParamInput = "none"
StoreFrontDownload_05_01_05_01 20
$actionParamInput = "none"
StoreFrontDownload_05_01_05_03 10
$actionParamInput = "none"
StoreFrontDownload_05_01_05_04 1
$actionParamInput = "none"
StoreFrontDownload_05_01_05_06 10
$actionParamInput = "none"
StoreFrontDownload_05_01_05_08 1
$actionParamInput = "none"
PIM_05_01_06_01 5
$actionParamInput = "none"
PIM_05_01_06_02 1
$actionParamInput = "none"
PIM_05_01_06_03 5
$actionParamInput = "none"
PIM_05_01_06_04 1
$actionParamInput = "none"
MultiMedia_05_01_07_01 1
$actionParamInput = "none"
MultiMedia_05_01_07_02 1
$actionParamInput = "none"
MultiMedia_05_01_07_03 1
$actionParamInput = "none"
MultiMedia_05_01_07_04 20
if rand(100) < 0
$actionParamInput = "none"
MultiMedia_05_01_07_05 20
end
if rand(100) < 0
$actionParamInput = "none"
MultiMedia_05_01_07_06 20
end
$actionParamInput = "none"
MultiMedia_05_01_07_10 10
$actionParamInput = "none"
MultiTasking_05_01_08_01 1
$actionParamInput = "none"
MultiTasking_05_01_08_02 50
$actionParamInput = "none"
MultiTasking_05_01_08_03 1
$actionParamInput = "none"
MultiTasking_05_01_08_01 1
$actionParamInput = "none"
MultiTasking_05_01_08_04 1
$actionParamInput = "none"
MultiTasking_05_01_08_02 50
$actionParamInput = "none"
MultiTasking_05_01_08_06 1
$actionParamInput = "none"
MenuNavigation_05_01_09_01 1
$actionParamInput = "none"
WiFi_05_01_10_01 20
$actionParamInput = "none"
WiFi_05_01_10_02 20
$actionParamInput = "none"
NFC_05_01_11_01 1
$actionParamInput = "none"
VideoTelephony_05_01_14_01 50
$actionParamInput = "none"
VideoTelephony_05_01_14_02 25
$actionParamInput = "none"
VideoTelephony_05_01_14_03 25
$actionParamInput = "none"
connectWifi 1
$actionParamInput = "none"
VideoTelephony_05_01_14_04 25
$actionParamInput = "none"
VideoTelephony_05_01_14_05 25
$actionParamInput = "none"
disconnectWifi 1
$actionParamInput = "none"
IP_Messaging_Precondition 1
$actionParamInput = "none"
IP_Messaging_05_01_15_01 75
$actionParamInput = "none"
IP_Messaging_05_01_15_02 75
$actionParamInput = "none"
IP_Messaging_05_01_15_03 20
$actionParamInput = "none"
IP_Messaging_05_01_15_04 75
$actionParamInput = "none"
connectWifi 1
$actionParamInput = "none"
IP_Messaging_05_01_15_05 75
$actionParamInput = "none"
IP_Messaging_05_01_15_06 20
$actionParamInput = "none"
disconnectWifi 1
$actionParamInput = "none"
connectWifi 1
$actionParamInput = "none"
WiFi_Calling_Enabled 1
$actionParamInput = "none"
WiFi_Calling_05_01_16_01 100
$actionParamInput = "none"
WiFi_Calling_05_01_16_02 100
$actionParamInput = "none"
WiFi_Calling_05_01_16_03 100
$actionParamInput = "none"
WiFi_Calling_Disabled 1
$actionParamInput = "none"
GPU_WebCrawler 1
$actionParamInput = "none"
LogEmail 1
$actionParamInput = "none"
CleanStorage 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)
end
end
def self.run(loop)
mainLoop loop
end
end
$exceptionPackageNameList = []
$exceptionPackageNameList_exclude = []
$exceptionPackageNameList << "android"
def exception_handler
DIVA_MTBF_ATT.exception_handler
end
$curProjectLogFile = $useLastLogFile
$curProjectLogFile = "DIVA_MTBF_ATT_#{getTimeStamp}.log" if $useLastLogFile.nil?
$useLastLogFile = nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment