Skip to content

Instantly share code, notes, and snippets.

@divamtbf
Created January 13, 2017 22:20
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/e8ee97654046a4a421ab92798f32343d to your computer and use it in GitHub Desktop.
Save divamtbf/e8ee97654046a4a421ab92798f32343d to your computer and use it in GitHub Desktop.
DIVA_MTBF_RubyRunGenerated
loadTestDB
module DIVA_MTBF
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(:gotoApp_2) do
gotoApp('Chrome')
end
tcase << TestAction.new(:Button_TermsAccept_6) 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(1)
end
tcase << TestAction.new(:Button_PositiveButton_8_1) 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.isExist
ifFailJumpTo(:EditText_UrlBar_24)
waitsecond(1)
end
tcase << TestAction.new(:swipeDown_2) do
swipe_vertical 500
waitsecond(2)
end
tcase << TestAction.new(:Button_PositiveButton_8) 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(1)
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(:gotoApp_21) do
gotoApp('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_154_500_3) do
click(154,500)
waitsecond(4)
end
tcase << TestAction.new(:swipeDown_9) do
swipe_vertical 500
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(:gotoApp_2) do
gotoApp('Chrome')
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.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')
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(:clickXY_284_388_4) do
click(284,388)
waitsecond(1)
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
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')
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
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
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')
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
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("Email_05_01_03_01")
end
tcase << TestAction.new(:gotoApp_3) 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', 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_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(2)
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_2) do
$ruiObj = RUIObject.new.with('objectid', -387960062).with('selfid', 1589392844).with('textdescid', -1233194523).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_4) do
$ruiObj = RUIObject.new.with('objectid', -630461263).with('selfid', -610816808).with('textdescid', 727067449).with('uniqueparentid', 0).with('classresourceid', 790406410)
.with('uitreeindex', 23)
.with('classname', 'TextView')
.with('resource-id', 'com.google.android.gm:id/name')
.with('text', 'Sent')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:clickXY_428_768_19) do
click(428,768)
waitsecond(1)
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_3) 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(2)
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(2)
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(1)
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_14) do
$ruiObj = RUIObject.new.with('objectid', -1941383373).with('selfid', 4082754).with('textdescid', 50769842).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 30)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Photos')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_PermissionAllowButton_12) 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_16) do
$ruiObj = RUIObject.new.with('objectid', -2074516409).with('selfid', -1484513934).with('textdescid', 889140747).with('uniqueparentid', 0)
.with('uitreeindex', 19)
.with('classname', 'TextView')
.with('resource-id', 'com.google.android.apps.photos:id/title')
.with('text', '1M')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:View_Photo_18) do
$ruiObj = RUIObject.new.with('objectid', 2023669211).with('selfid', -986702481).with('textdescid', -1518879013).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'android.view.ViewGroup')
$ruiObj.select('Similiar').click
waitsecond(2)
end
tcase << TestAction.new(:TextView_DoneButton_20) do
$ruiObj = RUIObject.new.with('objectid', -984795698).with('selfid', -885365197).with('textdescid', 1453085810).with('uniqueparentid', 0)
.with('uitreeindex', 11)
.with('classname', 'TextView')
.with('resource-id', 'com.google.android.apps.photos:id/done_button')
.with('content-desc', 'Done')
.with('text', 'DONE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(: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(1)
end
tcase << TestAction.new(:ImageButton_ComposeButton_6) do
$ruiObj = RUIObject.new.with('objectid', 1598291378).with('selfid', 1808564263).with('textdescid', -1604213756).with('uniqueparentid', 0)
.with('uitreeindex', 16)
.with('classname', 'ImageButton')
.with('resource-id', 'com.google.android.gm:id/compose_button')
.with('content-desc', 'Compose')
$ruiObj.isExist
waitsecond(2)
end
tcase << TestAction.new(:ImageButton_Navigate_27) do
$ruiObj = RUIObject.new.with('objectid', -387960062).with('selfid', -123872605).with('textdescid', -1698616212).with('uniqueparentid', 0)
.with('uitreeindex', 0)
.with('classname', 'ImageButton')
.with('content-desc', 'Navigate up')
$ruiObj.click
end
tcase << TestAction.new(:View_Unread_2_1) do
$tmusUnreadButton = $ruiObj = RUIObject.new.with('objectid', -1588953909).with('selfid', 1370096712).with('textdescid', -2085561838).with('uniqueparentid', 0).with('classresourceid', 1815484335)
.with('uitreeindex', 45)
.with('pretext', 'Inbox')
.with('classname', 'android.view.View')
.with('content-desc', 'Unread me about send from UIAutomator Tue Jan 06 18:42:55 PST 2015, This is a test being sent from UIAutomator Tue Jan 06 18:43:02 PST 2015 on 1/6/2015')
if $tmusUnreadButton.isExist
$tmusUnreadButton.click
else swipe_horizontal 50
end
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:clickXY_340_748_38) do
click(340,748)
waitsecond(1)
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 << TestAction.new(:DrawerLayout_DrawerContainer_3) do
$ruiObj = RUIObject.new.with('objectid', 960816969).with('selfid', -1674454649).with('textdescid', 152795144).with('uniqueparentid', 0)
.with('classname', 'android.support.v4.widget.DrawerLayout')
.with('resource-id', 'com.google.android.gm:id/drawer_container')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ViewGroup_Photo_4) do
$ruiObj = RUIObject.new.with('objectid', 937605476).with('selfid', 2111819614).with('textdescid', -142038506).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('pretext', 'Today')
.with('classname', 'android.view.ViewGroup')
.with('content-desc', 'Photo taken on Dec 6, 2016 10:20:37 AM.')
$ruiObj.click
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_3) do
gotoApp('Gmail')
end
tcase << TestAction.new(:ImageButton_Navigate_4) do
$ruiObj = RUIObject.new.with('objectid', -387960062).with('selfid', -123872605).with('textdescid', -1698616212).with('uniqueparentid', 0)
.with('uitreeindex', 0)
.with('classname', 'ImageButton')
.with('content-desc', 'Navigate up')
$ruiObj.click
waitsecond(1)
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(1)
end
tcase << TestAction.new(:clickXY_672_824_5) do
click(672,824)
waitsecond(1)
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(: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.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
gotoApp(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(:gotoApp_2) do
gotoApp('Messaging')
waitsecond(1)
end
tcase << TestAction.new(:Button_Button1_2) do
$ruiObj = RUIObject.new.with('objectid', -1004548822).with('selfid', 2077686463).with('textdescid', 307253103).with('uniqueparentid', 0).with('classresourceid', 1834539358)
.with('uitreeindex', 4)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'YES')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ComposeNewMessage) do
$tmusComposeButton = 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')
$vzwComposeButton = RUIObject.new.with('objectid', 2129085589).with('selfid', 468961841).with('textdescid', -293661237).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'ImageView')
.with('resource-id', 'com.android.mms:id/img1')
.with('content-desc', 'Compose button')
if $tmusComposeButton.isExist
$tmusComposeButton.click
elsif $vzwComposeButton.isExist
$vzwComposeButton.click
end
waitsecond(2)
end
tcase << TestAction.new(:MultiAutoCompleteTextView_2) do
$ruiObj = RUIObject.new.with('objectid', -2030797265).with('selfid', -1346021293).with('textdescid', 1469794257).with('uniqueparentid', 0).with('classresourceid', -1346021293)
.with('uitreeindex', 0)
.with('classname', 'MultiAutoCompleteTextView')
$ruiObj.inputtext('A01 a01')
waitsecond(1)
end
tcase << TestAction.new(:clickXY_110_182_6) do
click(110,182)
waitsecond(1)
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(:SendButton) do
$tmusSendButton = 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')
$vzwSendButton = RUIObject.new.with('objectid', 1247717607).with('selfid', -817858366).with('textdescid', -1713609473).with('uniqueparentid', 0)
.with('uitreeindex', 8)
.with('classname', 'Button')
.with('resource-id', 'com.android.mms:id/send_button')
.with('text', 'Send')
if $tmusSendButton.isExist
$tmusSendButton.click
elsif $vzwSendButton.isExist
$vzwSendButton.click
end
waitsecond(2)
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_Button1_7) 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(: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(:gotoApp_2) do
gotoApp('Messaging')
waitsecond(1)
end
tcase << TestAction.new(:ComposeNewMessage_1) do
$tmusComposeButton = 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')
$vzwComposeButton = RUIObject.new.with('objectid', 2129085589).with('selfid', 468961841).with('textdescid', -293661237).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'ImageView')
.with('resource-id', 'com.android.mms:id/img1')
.with('content-desc', 'Compose button')
if $tmusComposeButton.isExist
$tmusComposeButton.click
elsif $vzwComposeButton.isExist
$vzwComposeButton.click
end
waitsecond(2)
end
tcase << TestAction.new(:MultiAutoCompleteTextView_2) do
$ruiObj = RUIObject.new.with('objectid', -2030797265).with('selfid', -1346021293).with('textdescid', 1469794257).with('uniqueparentid', 0).with('classresourceid', -1346021293)
.with('uitreeindex', 0)
.with('classname', 'MultiAutoCompleteTextView')
$ruiObj.inputtext('A01 a01')
waitsecond(1)
end
tcase << TestAction.new(:clickXY_88_174_6) do
click(88,174)
waitsecond(1)
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(:AttachButton) do
$tmusAttachButton = 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')
$vzwAttachButton = RUIObject.new.with('objectid', 1000615746).with('selfid', -876235136).with('textdescid', -1072393149).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'ImageButton')
.with('resource-id', 'com.android.mms:id/attachButton_left')
.with('content-desc', 'Attach')
if $tmusAttachButton.isExist
$tmusAttachButton.click
elsif $vzwAttachButton.isExist
$vzwAttachButton.click
end
waitsecond(2)
end
tcase << TestAction.new(:Video) do
$ruiObj = RUIObject.new.with('objectid', -1141961992).with('selfid', -465694566).with('textdescid', -1041083352).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('pretext', 'Take photo')
.with('classname', 'ImageView')
.with('resource-id', 'com.android.mms:id/icon')
$ruiObj.click
waitsecond(8)
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_6) 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_8) do
$ruiObj = RUIObject.new.with('objectid', -1941383373).with('selfid', 4082754).with('textdescid', 50769842).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 30)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Photos')
$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(2)
end
tcase << TestAction.new(:TextView_Title_2) do
$ruiObj = RUIObject.new.with('objectid', -2074516409).with('selfid', 1224707480).with('textdescid', 1793532939).with('uniqueparentid', 0)
.with('uitreeindex', 16)
.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_736_16) do
click(232,736)
waitsecond(2)
end
tcase << TestAction.new(:TrimAndSave) do
$reduceButton = 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 $reduceButton.isExist
$reduceButton.click
waitsecond(1)
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(1)
RUIObject.new.with('objectid', -2139312908).with('selfid', 893316343).with('textdescid', -1979207657).with('uniqueparentid', 0)
.with('uitreeindex', 28)
.with('classname', 'Button')
.with('resource-id', 'com.lge.videostudio:id/trim_area_save')
.with('text', 'SAVE').click
end
waitsecond(2)
end
tcase << TestAction.new(:SendButton_1) do
$tmusSendButton = 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')
$vzwSendButton = RUIObject.new.with('objectid', 1247717607).with('selfid', -817858366).with('textdescid', -1713609473).with('uniqueparentid', 0)
.with('uitreeindex', 8)
.with('classname', 'Button')
.with('resource-id', 'com.android.mms:id/send_button')
.with('text', 'Send')
if $tmusSendButton.isExist
$tmusSendButton.click
elsif $vzwSendButton.isExist
$vzwSendButton.click
end
waitsecond(2)
end
tcase << TestAction.new(:pressBack_5) do
pressBack
end
tcase << TestAction.new(:pressBack_5_1) do
pressBack
end
tcase << TestAction.new(:clickXY_166_220_5) do
click(166,220)
waitsecond(1)
end
tcase << TestAction.new(:LinearLayout_StatusIcons_10) do
$ruiObj = RUIObject.new.with('objectid', 84459867).with('selfid', 906570047).with('textdescid', -1676711387).with('uniqueparentid', 0).with('classresourceid', 1331229891)
.with('classname', 'LinearLayout')
.with('resource-id', 'com.android.mms:id/status_icons')
$ruiObj.isNotExist
waitsecond(1)
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(:gotoApp_2) do
gotoApp('Messaging')
waitsecond(1)
end
tcase << TestAction.new(:ComposeNewMessage_1_1) do
$tmusComposeButton = 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')
$vzwComposeButton = RUIObject.new.with('objectid', 2129085589).with('selfid', 468961841).with('textdescid', -293661237).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'ImageView')
.with('resource-id', 'com.android.mms:id/img1')
.with('content-desc', 'Compose button')
if $tmusComposeButton.isExist
$tmusComposeButton.click
elsif $vzwComposeButton.isExist
$vzwComposeButton.click
end
waitsecond(2)
end
tcase << TestAction.new(:MultiAutoCompleteTextView_2) do
$ruiObj = RUIObject.new.with('objectid', -2030797265).with('selfid', -1346021293).with('textdescid', 1469794257).with('uniqueparentid', 0).with('classresourceid', -1346021293)
.with('uitreeindex', 0)
.with('classname', 'MultiAutoCompleteTextView')
$ruiObj.inputtext('A01 a01')
waitsecond(1)
end
tcase << TestAction.new(:clickXY_92_192_6) do
click(92,192)
waitsecond(1)
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(1)
end
tcase << TestAction.new(:AttachButton_1) do
$tmusAttachButton = 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')
$vzwAttachButton = RUIObject.new.with('objectid', 1000615746).with('selfid', -876235136).with('textdescid', -1072393149).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'ImageButton')
.with('resource-id', 'com.android.mms:id/attachButton_left')
.with('content-desc', 'Attach')
if $tmusAttachButton.isExist
$tmusAttachButton.click
elsif $vzwAttachButton.isExist
$vzwAttachButton.click
end
waitsecond(2)
end
tcase << TestAction.new(:ImageView_Icon_2) do
$ruiObj = RUIObject.new.with('objectid', -1141961992).with('selfid', -465694566).with('textdescid', -1041083352).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('pretext', 'Attach')
.with('classname', 'ImageView')
.with('resource-id', 'com.android.mms:id/icon')
$ruiObj.click
waitsecond(4)
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
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(1)
end
tcase << TestAction.new(:TextView_Title_3) do
$ruiObj = RUIObject.new.with('objectid', -1941383373).with('selfid', 4082754).with('textdescid', 50769842).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 44)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Photos')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_Title_5) do
$ruiObj = RUIObject.new.with('objectid', -2074516409).with('selfid', -1484513934).with('textdescid', 889140747).with('uniqueparentid', 0)
.with('uitreeindex', 10)
.with('classname', 'TextView')
.with('resource-id', 'com.google.android.apps.photos:id/title')
.with('text', '1M')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:clickXY_248_752_9) do
click(248,752)
waitsecond(2)
end
tcase << TestAction.new(:SendButton_1_1) do
$tmusSendButton = 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')
$vzwSendButton = RUIObject.new.with('objectid', 1247717607).with('selfid', -817858366).with('textdescid', -1713609473).with('uniqueparentid', 0)
.with('uitreeindex', 8)
.with('classname', 'Button')
.with('resource-id', 'com.android.mms:id/send_button')
.with('text', 'Send')
if $tmusSendButton.isExist
$tmusSendButton.click
elsif $vzwSendButton.isExist
$vzwSendButton.click
end
waitsecond(4)
end
tcase << TestAction.new(:pressBack_5) do
pressBack
end
tcase << TestAction.new(:pressBack_6) do
pressBack
end
tcase << TestAction.new(:clickXY_158_230_12) do
click(158,230)
waitsecond(1)
end
tcase << TestAction.new(:ProgressBar_Progressbar_6) do
$ruiObj = RUIObject.new.with('objectid', -1692373424).with('selfid', 1538496395).with('textdescid', -923968560).with('uniqueparentid', 0).with('classresourceid', 225978681)
.with('uitreeindex', 10)
.with('classname', 'ProgressBar')
.with('resource-id', 'com.android.mms:id/progressbar')
$ruiObj.isNotExist
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_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(:gotoApp_1) do
gotoApp('Camera')
end
tcase << TestAction.new(:Button_CancelButton_23) do
$ruiObj = RUIObject.new.with('objectid', 2138780457).with('selfid', 765132311).with('textdescid', -782727157).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'Button')
.with('resource-id', 'com.lge.camera:id/cancel_button')
.with('text', 'LATER')
$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(:ImageView_Thumbnail_2) do
$ruiObj = RUIObject.new.with('objectid', -2123601541).with('selfid', -135259702).with('textdescid', 357252685).with('uniqueparentid', 0)
.with('uitreeindex', 17)
.with('classname', 'ImageView')
.with('resource-id', 'com.lge.camera:id/thumbnail')
.with('content-desc', 'Gallery')
$ruiObj.isNotExist
ifFailJumpTo(:shutter)
waitsecond(1)
end
tcase << TestAction.new(:ImageButton_QuickButtonCleanView_2) do
$ruiObj = RUIObject.new.with('objectid', 579583575).with('selfid', -1659256094).with('textdescid', -1654112402).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'ImageButton')
.with('resource-id', 'com.lge.camera:id/quick_button_clean_view')
.with('content-desc', 'View')
$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_ShutterTopComp_6) do
$ruiObj = RUIObject.new.with('objectid', -1799776401).with('selfid', -1930433243).with('textdescid', 415097668).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('pretext', '000008')
.with('classname', 'ImageButton')
.with('resource-id', 'com.lge.camera:id/shutter_top_comp')
.with('content-desc', 'Stop recording')
$ruiObj.isExist
end
tcase << TestAction.new(:ImageButton_ShutterTopCompType_6) do
$ruiObj = RUIObject.new.with('objectid', -1695967134).with('selfid', 685856113).with('textdescid', -1035373570).with('uniqueparentid', 0)
.with('uitreeindex', 10)
.with('classname', 'ImageButton')
.with('resource-id', 'com.lge.camera:id/shutter_top_comp_type')
$ruiObj.click
waitsecond(2)
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_1) do
gotoApp('Gallery')
waitsecond(2)
end
tcase << TestAction.new(:Button_PermissionAllowButton_2) do
$ruiObj = RUIObject.new.with('objectid', 973397371).with('selfid', 1444367499).with('textdescid', -1740624804).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'Button')
.with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
.with('text', 'Allow')
$ruiObj.click
end
tcase << TestAction.new(:ImageButton_Open_2) do
$ruiObj = RUIObject.new.with('objectid', -1596683477).with('selfid', 1589392844).with('textdescid', 426502620).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'ImageButton')
.with('content-desc', 'Open navigation drawer')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:CheckedTextView_DrawerItem_4) do
$ruiObj = RUIObject.new.with('objectid', -401550358).with('selfid', 229733217).with('textdescid', 1081503090).with('uniqueparentid', 0).with('classresourceid', 396870609)
.with('uitreeindex', 4)
.with('classname', 'CheckedTextView')
.with('resource-id', 'com.android.gallery3d:id/drawer_item')
.with('text', 'Videos')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:clickXY_572_388_2) do
click(572,388)
waitsecond(2)
end
tcase << TestAction.new(:clickXY_640_560_2) do
click(640,560)
waitsecond(2)
end
tcase << TestAction.new(:TextView_ResolverText_6) do
$ruiObj = RUIObject.new.with('objectid', 1736845148).with('selfid', 1334281818).with('textdescid', 234547305).with('uniqueparentid', 0).with('classresourceid', -472389065)
.with('uitreeindex', 4)
.with('classname', 'TextView')
.with('resource-id', 'com.lge:id/resolver_text')
.with('text', 'Video')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_AllowButton_9) 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(1)
end
tcase << TestAction.new(:Button_PermissionAllowButton_11) 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
end
tcase << TestAction.new(:wait10second_4) do
waitsecond(10)
end
tcase << TestAction.new(:clickXY_296_832_8) do
click(296,832)
waitsecond(1)
end
tcase << TestAction.new(:ImageButton_Pause_10) do
$ruiObj = RUIObject.new.with('objectid', 321323694).with('selfid', -485281624).with('textdescid', 2077043940).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('pretext', 'Videos')
.with('classname', 'ImageButton')
.with('resource-id', 'com.lge.videoplayer:id/pause')
.with('content-desc', 'Pause')
$ruiObj.isExist
waitsecond(1)
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(:gotoApp_1) do
gotoApp('Camera')
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', 1695477105).with('textdescid', -880470158).with('uniqueparentid', 0).with('classresourceid', -472389065)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'com.lge:id/resolver_text')
.with('text', 'Gallery')
$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(:clickXY_196_782_2) do
click(196,782)
waitsecond(2)
end
tcase << TestAction.new(:Button_BottomMenuLayerItem5_2) do
$ruiObj = RUIObject.new.with('objectid', 786788493).with('selfid', -296540457).with('textdescid', -702028205).with('uniqueparentid', 0)
.with('uitreeindex', 4)
.with('classname', 'Button')
.with('resource-id', 'com.android.gallery3d:id/bottom_menu_layer_item5')
.with('content-desc', 'Delete')
.with('text', 'Delete')
$ruiObj.click
waitsecond(4)
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(:gotoApp_1) do
gotoApp('Camera')
end
tcase << TestAction.new(:Button_OkButton_2_1) do
$ruiObj = RUIObject.new.with('objectid', -658747592).with('selfid', 659685775).with('textdescid', -384972794).with('uniqueparentid', 0)
.with('uitreeindex', 22)
.with('classname', 'Button')
.with('resource-id', 'com.lge.camera:id/ok_button')
.with('text', 'Turn on')
$ruiObj.click
waitsecond(1)
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.click
waitsecond(2)
end
tcase << TestAction.new(:ImageView_Thumbnail_1_1) 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_1) do
$ruiObj = RUIObject.new.with('objectid', 1736845148).with('selfid', 1695477105).with('textdescid', -880470158).with('uniqueparentid', 0).with('classresourceid', -472389065)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'com.lge:id/resolver_text')
.with('text', 'Gallery')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_AllowButton_3_1) 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(: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.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(:gotoApp_1) do
gotoApp('Camera')
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(:TextView_ResolverText_2) do
$ruiObj = RUIObject.new.with('objectid', 1736845148).with('selfid', 1695477105).with('textdescid', -880470158).with('uniqueparentid', 0).with('classresourceid', -472389065)
.with('uitreeindex', 2)
.with('classname', 'TextView')
.with('resource-id', 'com.lge:id/resolver_text')
.with('text', 'Gallery')
$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(:clickXY_270_678_2) do
click(270,678)
waitsecond(1)
end
tcase << TestAction.new(:TextView_ActionConfirmDelete_7) do
$ruiObj = RUIObject.new.with('objectid', -222253851).with('selfid', -308793791).with('textdescid', -1070132250).with('uniqueparentid', 0)
.with('uitreeindex', 6)
.with('classname', 'TextView')
.with('resource-id', 'com.android.gallery3d:id/action_confirm_delete')
.with('content-desc', 'Delete')
$ruiObj.isExist
end
tcase << TestAction.new(:Button_BottomMenuLayerItem5_3) do
$ruiObj = RUIObject.new.with('objectid', 786788493).with('selfid', -296540457).with('textdescid', -702028205).with('uniqueparentid', 0)
.with('uitreeindex', 4)
.with('classname', 'Button')
.with('resource-id', 'com.android.gallery3d:id/bottom_menu_layer_item5')
.with('content-desc', 'Delete')
.with('text', 'Delete')
$ruiObj.click
waitsecond(4)
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 << TestAction.new(:View_GlRootView_1) do
$ruiObj = RUIObject.new.with('objectid', -789837373).with('selfid', -1563922518).with('textdescid', 1284845245).with('uniqueparentid', 0)
.with('uitreeindex', 0)
.with('classname', 'android.view.View')
.with('resource-id', 'com.android.gallery3d:id/gl_root_view')
$ruiObj.click
waitsecond(2)
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(:gotoApp_1) do
gotoApp('Camera')
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(:clickXY_266_620_2) do
click(266,620)
waitsecond(1)
end
tcase << TestAction.new(:TextView_ActionConfirmDelete_8) do
$ruiObj = RUIObject.new.with('objectid', -222253851).with('selfid', -308793791).with('textdescid', -1070132250).with('uniqueparentid', 0)
.with('uitreeindex', 6)
.with('classname', 'TextView')
.with('resource-id', 'com.android.gallery3d:id/action_confirm_delete')
.with('content-desc', 'Delete')
$ruiObj.isExist
waitsecond(1)
end
tcase << TestAction.new(:TextView_ActionConfirmDelete_8_1) do
$ruiObj = RUIObject.new.with('objectid', -222253851).with('selfid', -308793791).with('textdescid', -1070132250).with('uniqueparentid', 0)
.with('uitreeindex', 6)
.with('classname', 'TextView')
.with('resource-id', 'com.android.gallery3d:id/action_confirm_delete')
.with('content-desc', 'Delete')
$ruiObj.click
waitsecond(1)
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(:gotoApp_1) do
gotoApp('YouTube')
waitsecond(2)
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.select('Similiar').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(:gotoApp_1_1) do
gotoApp('Phone')
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(1)
end
tcase << TestAction.new(:ImageButton_Btnlogscall_6) do
$vzwCallButton = $ruiObj = RUIObject.new.with('objectid', -1934426254).with('selfid', -2053967649).with('textdescid', -911487124).with('uniqueparentid', 0)
.with('uitreeindex', 21)
.with('classname', 'ImageButton')
.with('resource-id', 'com.android.contacts:id/btnLogsCall')
.with('content-desc', 'Call')
$tmusCallButton = RUIObject.new.with('objectid', -1313327681).with('selfid', -460279496).with('textdescid', -1259661061).with('uniqueparentid', 0)
.with('uitreeindex', 58)
.with('classname', 'ImageButton')
.with('resource-id', 'com.android.contacts:id/btnVoLTE')
.with('content-desc', 'VoLTE call')
if $vzwCallButton.isExist
$vzwCallButton.click
elsif $tmusCallButton.isExist
$tmusCallButton.click
end
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:wait10second_3) do
waitsecond(5)
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(:gotoApp_1_1) do
gotoApp('Contacts')
waitsecond(2)
end
tcase << TestAction.new(:gotoApp_1_2) do
gotoApp('Messaging')
waitsecond(2)
end
tcase << TestAction.new(:gotoApp_1_3) do
gotoApp('Phone')
waitsecond(2)
end
tcase << TestAction.new(:gotoApp_1_4) do
gotoApp('Play Store')
waitsecond(2)
end
tcase << TestAction.new(:gotoApp_2) do
gotoApp('Camera')
waitsecond(2)
end
tcase << TestAction.new(:gotoApp_1_5_1) do
gotoApp('Chrome')
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
waitsecond(1)
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(:gotoApp_1_1) do
gotoApp('Phone')
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(:gotoApp_1_1) do
gotoApp('Chrome')
end
tcase << TestAction.new(:Button_TermsAccept_5) do
$ruiObj = RUIObject.new.with('objectid', 1131623741).with('selfid', 659232449).with('textdescid', -1120600562).with('uniqueparentid', 0)
.with('uitreeindex', 4)
.with('classname', 'Button')
.with('resource-id', 'com.android.chrome:id/terms_accept')
.with('text', 'Accept continue')
$ruiObj.click
end
tcase << TestAction.new(:Button_PositiveButton_6) do
$ruiObj = RUIObject.new.with('objectid', -1302979962).with('selfid', 780691289).with('textdescid', 1735628115).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'Button')
.with('resource-id', 'com.android.chrome:id/positive_button')
.with('text', 'Next')
$ruiObj.click
end
tcase << TestAction.new(:Button_PositiveButton_7) do
$ruiObj = RUIObject.new.with('objectid', -953817212).with('selfid', 780402664).with('textdescid', 1478534434).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'Button')
.with('resource-id', 'com.android.chrome:id/positive_button')
.with('text', 'Done')
$ruiObj.click
end
tcase << TestAction.new(:EditText_UrlBar_1_1) do
$ruiObj = RUIObject.new.with('objectid', -812560946).with('selfid', 613381324).with('textdescid', 580414482).with('uniqueparentid', 0)
.with('uitreeindex', 218)
.with('classname', 'EditText')
.with('resource-id', 'com.android.chrome:id/url_bar')
$ruiObj.inputtext('')
waitsecond(2)
end
tcase << TestAction.new(:EditText_UrlBar_8) do
$ruiObj = RUIObject.new.with('objectid', 882195433).with('selfid', 613381324).with('textdescid', 1578254679).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'EditText')
.with('resource-id', 'com.android.chrome:id/url_bar')
$ruiObj.inputtext('www.att.com')
waitsecond(1)
end
tcase << TestAction.new(:pressEnter_5_1) do
pressEnter
waitsecond(4)
end
tcase << TestAction.new(:wait2second_2) do
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(:gotoApp_1_1) do
gotoApp('Contacts')
waitsecond(2)
end
tcase << TestAction.new(:gotoApp_1_2) do
gotoApp('Messaging')
waitsecond(2)
end
tcase << TestAction.new(:gotoApp_1_3) do
gotoApp('Phone')
waitsecond(2)
end
tcase << TestAction.new(:gotoApp_1_4) do
gotoApp('Play Store')
waitsecond(2)
end
tcase << TestAction.new(:gotoApp_2) do
gotoApp('Camera')
waitsecond(2)
end
tcase << TestAction.new(:gotoApp_1_5) do
gotoApp('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(:gotoApp_1_1) do
gotoApp('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', 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(:gotoApp_3) do
gotoApp('Settings')
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_6) 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(:Switch_Switchwidget_25) do
$ruiObj = RUIObject.new.with('objectid', 2120363415).with('selfid', 2013927764).with('textdescid', -1882088).with('uniqueparentid', 0).with('classresourceid', -1664951417)
.with('uitreeindex', 7)
.with('classname', 'Switch')
.with('resource-id', 'com.android.settings:id/switchWidget')
$ruiObj.select('ItemFirst').click
waitsecond(2)
end
tcase << TestAction.new(:Button_Button1_2) do
$ruiObj = RUIObject.new.with('objectid', 1345377674).with('selfid', -1318451484).with('textdescid', 2036776494).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'OK')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:wait8second_12) do
waitsecond(10)
end
tcase << TestAction.new(:Switch_Switchwidget_4) do
$ruiObj = RUIObject.new.with('objectid', 2120363415).with('selfid', 2013927764).with('textdescid', -1882088).with('uniqueparentid', 0).with('classresourceid', -1664951417)
.with('uitreeindex', 7)
.with('classname', 'Switch')
.with('resource-id', 'com.android.settings:id/switchWidget')
$ruiObj.select('ItemFirst').click
waitsecond(2)
end
tcase << TestAction.new(:wait8second_12_1) do
waitsecond(10)
end
tcase << TestAction.new(:pressBack_7) do
pressBack
waitsecond(1)
end
tcase << TestAction.new(:pressBack_8) do
pressBack
waitsecond(1)
end
tcase << TestAction.new(:pressBack_18) do
pressBack
waitsecond(1)
end
tcase << TestAction.new(:pressBack_20) 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.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')
end
tcase << TestAction.new(:ImageView_3) do
$ruiObj = RUIObject.new.with('objectid', -30724256).with('selfid', 1125864064).with('textdescid', -952451904).with('uniqueparentid', 0)
.with('uitreeindex', 23)
.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(:Button_Button1_2) do
$ruiObj = RUIObject.new.with('objectid', -1592541968).with('selfid', -1318451484).with('textdescid', 1176208020).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(: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('Calendar')
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(:scriptAction_StartTestLog) do
logStartTest("05_01_06_04_PIM")
end
tcase << TestAction.new(:gotoApp_21) do
gotoApp('Clock')
waitsecond(2)
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_4) 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_6) 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_07_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_1_1) 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(2)
end
tcase << TestAction.new(:Button_PositiveButton_2_1) 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(: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_02(loopTime)
tcase = TestCase.new("StoreFrontDownload_05_01_05_02")
tcase << TestAction.new(:scriptAction_1) do
logStartTest("05_01_05_02_StoreFrontDownload")
end
tcase << TestAction.new(:gotoApp_2) do
gotoApp('Play Store')
waitsecond(8)
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_4) 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_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_ContinueButton_2) do
$ruiObj = RUIObject.new.with('objectid', -1553570735).with('selfid', 1461394585).with('textdescid', 1663670089).with('uniqueparentid', 0)
.with('uitreeindex', 7)
.with('classname', 'Button')
.with('resource-id', 'com.android.vending:id/continue_button')
.with('text', 'ACCEPT')
$ruiObj.click
waitsecond(8)
end
tcase << TestAction.new(:Button_Button1_2) do
$ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', 1349887951).with('textdescid', -101886821).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'Continue')
$ruiObj.click
waitsecond(8)
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_03(loopTime)
tcase = TestCase.new("StoreFrontDownload_05_01_05_03")
tcase << TestAction.new(:scriptAction_1) do
logStartTest("05_01_05_02_StoreFrontDownload")
end
tcase << TestAction.new(:gotoApp_2) do
gotoApp('Play Store')
waitsecond(8)
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_07_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_1_1) 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(2)
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_05(loopTime)
tcase = TestCase.new("StoreFrontDownload_05_01_05_05")
tcase << TestAction.new(:scriptAction_1) do
logStartTest("05_01_05_05_StoreFrontDownload")
end
tcase << TestAction.new(:gotoApp_2) do
gotoApp('ColorNote')
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_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_4) do
pressBack
end
tcase << TestAction.new(:scriptAction_True_False) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason == "Store Front is not loaded"
end
logStopTest("05_01_05_05_StoreFrontDownload")
end
tcase << TestAction.new(:pressHome_1) 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(: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(:Button_PermissionAllowButton_1_1) 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(: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.run(loopTime)
end
def self.StoreFrontDownload_05_01_05_07(loopTime)
tcase = TestCase.new("StoreFrontDownload_05_01_05_07")
tcase << TestAction.new(:scriptAction_1) do
logStartTest("05_01_05_07_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_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(8)
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.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')
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_01_01_Telephony")
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_21) do
$ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', -1022656974).with('textdescid', 1394131968).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'TextView')
.with('resource-id', 'com.android.contacts:id/tabText')
.with('text', 'Recent')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ImageView_ThirdActionIcon_4) do
$ruiObj = RUIObject.new.with('objectid', -718775661).with('selfid', 2013530733).with('textdescid', -788063217).with('uniqueparentid', 0).with('classresourceid', -257596297)
.with('uitreeindex', 11)
.with('pretext', 'Groups?0')
.with('classname', 'ImageView')
.with('resource-id', 'com.android.contacts:id/third_action_icon')
.with('content-desc', 'Call A01 a01')
$ruiObj.click
waitsecond(2)
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(18)
end
tcase << TestAction.new(:wait8second_14) do
waitsecond(8)
end
tcase << TestAction.new(:answerSwipe) do
$UIDev.swipe(288,1860,288,1400,10)
end
tcase << TestAction.new(:Button_UnlockAnswer_2) do
$ruiObj = RUIObject.new.with('objectid', 277743974).with('selfid', -1741270072).with('textdescid', 1251290952).with('uniqueparentid', 0)
.with('uitreeindex', 9)
.with('classname', 'Button')
.with('resource-id', 'com.android.incallui:id/unlock_answer')
.with('text', 'Answer')
$ruiObj.click
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', 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
$UIDev.swipe(288,1860,288,1400,10)
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')
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(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(:FrameLayout_FloatingActionButtonContainer_2) do
$ruiObj = RUIObject.new.with('objectid', 565383936).with('selfid', 1632442836).with('textdescid', -1928520608).with('uniqueparentid', 0)
.with('classname', 'FrameLayout')
.with('resource-id', 'com.android.contacts:id/floating_action_button_container')
.with('content-desc', 'New contact')
$ruiObj.click
waitsecond(2)
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(1)
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.VideoCall_01(loopTime)
tcase = TestCase.new("VideoCall_01")
tcase << TestAction.new(:scriptAction_StartTest_1) do
logStartTest("VideoCall_01")
end
tcase << TestAction.new(:pressHome_4) do
pressHome
end
tcase << TestAction.new(:TextView_Phone_2) do
$ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
.with('uitreeindex', 9)
.with('classname', 'TextView')
.with('content-desc', 'Phone')
.with('text', 'Phone')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_Tabtext_2) do
$ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
.with('uitreeindex', 4)
.with('classname', 'TextView')
.with('resource-id', 'com.android.contacts:id/tabText')
.with('text', 'Contacts')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:EditText_SearchSrcText_2) do
$ruiObj = RUIObject.new.with('objectid', 588070375).with('selfid', -959326622).with('textdescid', -497243406).with('uniqueparentid', 0)
.with('uitreeindex', 6)
.with('classname', 'EditText')
.with('resource-id', 'android:id/search_src_text')
.with('content-desc', 'Search contacts')
$ruiObj.inputtext('A01 a01')
waitsecond(1)
end
tcase << TestAction.new(:TextView_A01_4) do
$ruiObj = RUIObject.new.with('objectid', -728261803).with('selfid', -2094016618).with('textdescid', -1517178717).with('uniqueparentid', 0).with('classresourceid', -938935918)
.with('uitreeindex', 12)
.with('classname', 'TextView')
.with('content-desc', 'A01 a01')
.with('text', 'A01 a01')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:ImageView_EabActionButton_2) do
$ruiObj = 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')
$ruiObj.click
waitsecond(1)
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(:scriptAction_18_1_1) do
sendBTCmd('endCall')
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
$myTestResult = checkLastBTCmdResult
if $myTestResult == false
$myFailReason = "Call not come to other dev"
end
logStopTest("VideoCall_01")
end
tcase << TestAction.new(:Button_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_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(: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(: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(:pressHome_2) 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_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(:TextView_Tabtext_2) do
$ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', -1022656974).with('textdescid', 1394131968).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'TextView')
.with('resource-id', 'com.android.contacts:id/tabText')
.with('text', 'Recent')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:ImageView_SecondaryActionIcon_4) do
$ruiObj = RUIObject.new.with('objectid', 1053896352).with('selfid', -1840503422).with('textdescid', -867959012).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', 'Video call to A01 a01')
$ruiObj.select('ItemFirst').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(: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(: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 << TestAction.new(:scriptAction_6) do
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_1) do
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_21) do
waitsecond(2)
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(: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(: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(: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(:gotoApp_5) do
gotoApp('Settings')
waitsecond(1)
end
tcase << TestAction.new(:FrameLayout_SettingsButtonContainer_4) do
$ruiObj = RUIObject.new.with('objectid', -994030416).with('selfid', 1322766864).with('textdescid', 417942116).with('uniqueparentid', 0)
.with('classname', 'FrameLayout')
.with('resource-id', 'com.android.systemui:id/settings_button_container')
$ruiObj.click
waitsecond(1)
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_1) do
swipe_vertical_back 500
end
tcase << TestAction.new(:TextView_Title_4) do
$ruiObj = RUIObject.new.with('objectid', 2008023572).with('selfid', -589731018).with('textdescid', 498664031).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 8)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'WiFi')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_Button2_2) do
$ruiObj = RUIObject.new.with('objectid', -360890209).with('selfid', -1317527958).with('textdescid', -223504546).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Button')
.with('resource-id', 'android:id/button2')
.with('text', 'No')
$ruiObj.click
waitsecond(4)
end
tcase << TestAction.new(:Switch_ON_2_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', 'ON')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:wait8second_6) do
waitsecond(8)
end
tcase << TestAction.new(:Switch_OFF_3_1) do
$ruiObj = RUIObject.new.with('objectid', 1178284996).with('selfid', -533646533).with('textdescid', -1104515187).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Switch')
.with('text', 'OFF')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(: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(:gotoApp_2) do
gotoApp('Settings')
waitsecond(1)
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_4) do
$ruiObj = RUIObject.new.with('objectid', 2008023572).with('selfid', -589731018).with('textdescid', 498664031).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 8)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'WiFi')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_Empty_25) do
$ruiObj = RUIObject.new.with('objectid', 1333259948).with('selfid', -886975434).with('textdescid', 1201392520).with('uniqueparentid', 0)
.with('uitreeindex', 4)
.with('classname', 'TextView')
.with('resource-id', 'android:id/empty')
.with('text', 'Turn WiFi on in the upper right corner to see available networks')
$ruiObj.isExist
ifFailJumpTo(:wait1second_21)
end
tcase << TestAction.new(:Switch_ON_2_1_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', 'ON')
$ruiObj.click
end
tcase << TestAction.new(:wait1second_21) do
waitsecond(1)
end
tcase << TestAction.new(:check_if_wifi_is_added) do
$ruiObj = RUIObject.new.with('objectid', -1789239232).with('selfid', -789618896).with('textdescid', 272817007).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 11)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'qctcomp')
$ruiObj.isNotExist
ifFailJumpTo(:check_connection)
waitsecond(1)
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(1)
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(1)
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(1)
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(1)
end
tcase << TestAction.new(:check_connection) do
$ruiObj = RUIObject.new.with('objectid', 1399891586).with('selfid', -404041766).with('textdescid', 623785653).with('uniqueparentid', 0).with('classresourceid', -1930775675)
.with('uitreeindex', 10)
.with('classname', 'TextView')
.with('resource-id', 'android:id/summary')
.with('text', 'Connected')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_Button3_15) do
$ruiObj = RUIObject.new.with('objectid', -360890208).with('selfid', 1759634711).with('textdescid', 452800563).with('uniqueparentid', 0)
.with('uitreeindex', 12)
.with('classname', 'Button')
.with('resource-id', 'android:id/button3')
.with('text', 'Forget')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_Title_14) do
$ruiObj = RUIObject.new.with('objectid', -1789239232).with('selfid', -789618896).with('textdescid', 272817007).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 15)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'qctcomp')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:EditText_Password_17) do
$ruiObj = RUIObject.new.with('objectid', -976316462).with('selfid', -2120332491).with('textdescid', -201039218).with('uniqueparentid', 0).with('classresourceid', -714852383)
.with('uitreeindex', 2)
.with('classname', 'EditText')
.with('resource-id', 'com.lge.wifisettings:id/password')
$ruiObj.inputtext('12abcdef34')
waitsecond(1)
end
tcase << TestAction.new(:pressBack_20) do
pressBack
end
tcase << TestAction.new(:Button_Button1_18) do
$ruiObj = RUIObject.new.with('objectid', -360890210).with('selfid', -210572094).with('textdescid', 1221395928).with('uniqueparentid', 0)
.with('uitreeindex', 6)
.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(: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', -533646533).with('textdescid', -1104515187).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Switch')
.with('text', 'OFF')
$ruiObj.click
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_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')
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(:ImageButton_Btnwificall_6) do
$ruiObj = RUIObject.new.with('objectid', -1011300904).with('selfid', 328499424).with('textdescid', -1103889439).with('uniqueparentid', 0)
.with('uitreeindex', 58)
.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(:ImageButton_Endcallbutton_10) do
$ruiObj = RUIObject.new.with('objectid', 1089223879).with('selfid', -2049926087).with('textdescid', -593798087).with('uniqueparentid', 0)
.with('uitreeindex', 30)
.with('classname', 'ImageButton')
.with('resource-id', 'com.callapp.contacts:id/endCallButton')
$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(:pressHome_2) do
pressHome
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_12) do
waitsecond(8)
end
tcase << TestAction.new(:wait8second_14) do
waitsecond(8)
end
tcase << TestAction.new(:answerSwipe) do
$UIDev.swipe(288,1860,288,1400,10)
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', 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
$UIDev.swipe(288,1860,288,1400,10)
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_16_03_WiFI_Calling")
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.WiFi_Calling_Disabled(loopTime)
tcase = TestCase.new("WiFi_Calling_Disabled")
tcase << TestAction.new(:pressHome_1) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_1) do
UiDevice.getInstance.openNotification()
waitsecond(2)
end
tcase << TestAction.new(:Switch_WiFi_3) do
$ruiObj = RUIObject.new.with('objectid', -1467580294).with('selfid', -34376116).with('textdescid', -624940890).with('uniqueparentid', 0)
.with('classname', 'Switch')
.with('content-desc', 'Wi-Fi Calling on.')
.with('text', 'Off')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Switch_Airplane_8) do
$ruiObj = RUIObject.new.with('objectid', -1467580294).with('selfid', -1117553413).with('textdescid', -521334761).with('uniqueparentid', 0)
.with('classname', 'Switch')
.with('content-desc', 'Airplane mode on.')
.with('text', 'Off')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Switch_qctcomp_11) do
$ruiObj = RUIObject.new.with('objectid', -1467580294).with('selfid', 1792588571).with('textdescid', -2004855945).with('uniqueparentid', 0)
.with('classname', 'Switch')
.with('text', 'Off')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:pressHome_15) do
pressHome
waitsecond(2)
end
tcase.run(loopTime)
end
def self.WiFi_Calling_Enabled(loopTime)
tcase = TestCase.new("WiFi_Calling_Enabled")
tcase << TestAction.new(:pressHome_1) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_1) do
UiDevice.getInstance.openNotification()
waitsecond(2)
end
tcase << TestAction.new(:Switch_WiFi_2) do
$ruiObj = RUIObject.new.with('objectid', -1467580294).with('selfid', 1740384654).with('textdescid', -1815263324).with('uniqueparentid', 0)
.with('classname', 'Switch')
.with('content-desc', 'Wi-Fi Calling off.')
.with('text', 'On')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Button1_3) do
$ruiObj = RUIObject.new.with('objectid', 467706165).with('selfid', -1318451484).with('textdescid', 195214425).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(:scriptAction_5) do
UiDevice.getInstance.openNotification()
waitsecond(2)
end
tcase << TestAction.new(:Switch_Airplane_7) do
$ruiObj = RUIObject.new.with('objectid', -1467580294).with('selfid', 657207357).with('textdescid', -1711657195).with('uniqueparentid', 0)
.with('classname', 'Switch')
.with('content-desc', 'Airplane mode off.')
.with('text', 'On')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Button_Button1_8) do
$ruiObj = RUIObject.new.with('objectid', -1349637992).with('selfid', -1318451484).with('textdescid', 1957157436).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'OK')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_9) do
UiDevice.getInstance.openNotification()
waitsecond(2)
end
tcase << TestAction.new(:Switch_WiFi_12) do
$ruiObj = RUIObject.new.with('objectid', -1467580294).with('selfid', 1570561034).with('textdescid', 1428965288).with('uniqueparentid', 0)
.with('classname', 'Switch')
.with('content-desc', 'Wi-Fi off.')
.with('text', 'On')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:pressHome_13) do
pressHome
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(:gotoApp_16) do
gotoApp('HiddenMenuCall')
end
tcase << TestAction.new(:TextView_Title_2) do
$ruiObj = RUIObject.new.with('objectid', 1100751325).with('selfid', -167282287).with('textdescid', -350417171).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 1)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'LG Hidden Menu')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_Title_87) do
$ruiObj = RUIObject.new.with('objectid', 684902757).with('selfid', 538152793).with('textdescid', -1915478867).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 4)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Field Test')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_Text1_10) do
$ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', -141259386).with('textdescid', -734720867).with('uniqueparentid', 0).with('classresourceid', 490068035)
.with('uitreeindex', 1)
.with('classname', 'TextView')
.with('resource-id', 'android:id/text1')
.with('text', 'Modem Settings')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:swipeDown_12) do
swipe_vertical 500
waitsecond(1)
end
tcase << TestAction.new(:TextView_Text1_14) do
$ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', 12767364).with('textdescid', 1760273017).with('uniqueparentid', 0).with('classresourceid', 490068035)
.with('uitreeindex', 6)
.with('classname', 'TextView')
.with('resource-id', 'android:id/text1')
.with('text', 'RAT Selection')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_Text1_2) do
$ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', -244179464).with('textdescid', 496935915).with('uniqueparentid', 0).with('classresourceid', 490068035)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('resource-id', 'android:id/text1')
.with('text', 'GSM WCDMA')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_Button1_18) do
$ruiObj = RUIObject.new.with('objectid', 2089308220).with('selfid', -1318451484).with('textdescid', 1664978912).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'OK')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:pressBack_7) do
pressBack
end
tcase << TestAction.new(:pressBack_8) do
pressBack
end
tcase << TestAction.new(:pressBack_20) do
pressBack
end
tcase << TestAction.new(:pressBack_20_1) do
pressBack
end
tcase << TestAction.new(:pressHome_9) do
pressHome
end
tcase.run(loopTime)
end
def self.change_LTE(loopTime)
tcase = TestCase.new("change_LTE")
tcase << TestAction.new(:gotoApp_16_1) do
gotoApp('HiddenMenuCall')
end
tcase << TestAction.new(:TextView_Title_3) do
$ruiObj = RUIObject.new.with('objectid', 1100751325).with('selfid', -167282287).with('textdescid', -350417171).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 1)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'LG Hidden Menu')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_Title_87) do
$ruiObj = RUIObject.new.with('objectid', 684902757).with('selfid', 538152793).with('textdescid', -1915478867).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 4)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Field Test')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_Text1_10) do
$ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', -141259386).with('textdescid', -734720867).with('uniqueparentid', 0).with('classresourceid', 490068035)
.with('uitreeindex', 1)
.with('classname', 'TextView')
.with('resource-id', 'android:id/text1')
.with('text', 'Modem Settings')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:swipeDown_12) do
swipe_vertical 500
waitsecond(1)
end
tcase << TestAction.new(:TextView_Text1_14) do
$ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', 12767364).with('textdescid', 1760273017).with('uniqueparentid', 0).with('classresourceid', 490068035)
.with('uitreeindex', 6)
.with('classname', 'TextView')
.with('resource-id', 'android:id/text1')
.with('text', 'RAT Selection')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:TextView_Text1_2) do
$ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', 747569194).with('textdescid', -1653100487).with('uniqueparentid', 0).with('classresourceid', 490068035)
.with('uitreeindex', 1)
.with('classname', 'TextView')
.with('resource-id', 'android:id/text1')
.with('text', 'GSM WCDMA LTE auto')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_Button1_18) do
$ruiObj = RUIObject.new.with('objectid', 2089308220).with('selfid', -1318451484).with('textdescid', 1664978912).with('uniqueparentid', 0)
.with('uitreeindex', 1)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'OK')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:pressBack_7) do
pressBack
end
tcase << TestAction.new(:pressBack_8) do
pressBack
end
tcase << TestAction.new(:pressBack_20) do
pressBack
end
tcase << TestAction.new(:pressBack_20_1) do
pressBack
end
tcase << TestAction.new(:pressHome_9) do
pressHome
end
tcase.run(loopTime)
end
def self.connectWifi(loopTime)
tcase = TestCase.new("connectWifi")
tcase << TestAction.new(:scriptAction_2) do
logStartTest("Connect_to_wifi")
end
tcase << TestAction.new(:scriptAction_4) do
gotoSettings
waitsecond(2)
end
tcase << TestAction.new(:TextView_Title_27) do
$ruiObj = RUIObject.new.with('objectid', 674368800).with('selfid', -2078686330).with('textdescid', -957350501).with('uniqueparentid', 0)
.with('uitreeindex', 3)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Networks')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:swipeUp_8) do
swipe_vertical_back 500
end
tcase << TestAction.new(:TextView_Title_4) do
$ruiObj = RUIObject.new.with('objectid', 2008023572).with('selfid', -589731018).with('textdescid', 498664031).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 9)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'WiFi')
$ruiObj.click
waitsecond(1)
end
tcase << TestAction.new(:Button_Button2_2) do
$ruiObj = RUIObject.new.with('objectid', -360890209).with('selfid', 1219598511).with('textdescid', -1570382871).with('uniqueparentid', 0)
.with('uitreeindex', 2)
.with('classname', 'Button')
.with('resource-id', 'android:id/button2')
.with('text', 'CLOSE')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:scriptAction_6) do
if !switchIsOn
uiObj("Switch").click
end
waitsecond(2)
end
tcase << TestAction.new(:ImageButton_More_8) 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_105) 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_12) 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(2)
end
tcase << TestAction.new(:TextView_Text1_14) 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_16) 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_12) do
$ruiObj = RUIObject.new.with('objectid', -976316462).with('selfid', -2120332491).with('textdescid', -201039218).with('uniqueparentid', 0).with('classresourceid', -714852383)
.with('uitreeindex', 2)
.with('classname', 'EditText')
.with('resource-id', 'com.lge.wifisettings:id/password')
$ruiObj.inputtext('12abcdef34')
waitsecond(1)
end
tcase << TestAction.new(:Button_Button1_14) do
$ruiObj = RUIObject.new.with('objectid', -360890210).with('selfid', 736098498).with('textdescid', 503413208).with('uniqueparentid', 0)
.with('uitreeindex', 6)
.with('classname', 'Button')
.with('resource-id', 'android:id/button1')
.with('text', 'Connect')
$ruiObj.click
waitsecond(4)
end
tcase << TestAction.new(:Button_Button2_18) do
$ruiObj = RUIObject.new.with('objectid', 435325163).with('selfid', 871101384).with('textdescid', 1989464844).with('uniqueparentid', 0)
.with('uitreeindex', 4)
.with('classname', 'Button')
.with('resource-id', 'android:id/button2')
.with('text', 'SKIP')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:TextView_Summary_16) do
$ruiObj = RUIObject.new.with('objectid', 1399891586).with('selfid', -404041766).with('textdescid', 623785653).with('uniqueparentid', 0).with('classresourceid', -1930775675)
.with('uitreeindex', 10)
.with('classname', 'TextView')
.with('resource-id', 'android:id/summary')
.with('text', 'Connected')
$ruiObj.isExist
end
tcase << TestAction.new(:scriptAction_23_TrueFalse) do
$myTestResult = checkLastExistResult
if $myTestResult == false
$myFailReason == "WiFi cannot connected"
end
logStopTest("Connect_to_wifi")
end
tcase << TestAction.new(:pressBack_15) do
pressBack
end
tcase << TestAction.new(:pressBack_16) do
pressBack
end
tcase << TestAction.new(:pressHome_17) do
pressHome
end
tcase.run(loopTime)
end
def self.disconnectWifi(loopTime)
tcase = TestCase.new("disconnectWifi")
tcase << TestAction.new(:scriptAction_2) do
gotoSettings
waitsecond(2)
end
tcase << TestAction.new(:TextView_Title_3) do
$ruiObj = RUIObject.new.with('objectid', 10212784).with('selfid', -2078686330).with('textdescid', 1550078507).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Networks')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:swipeUp_8_1) do
swipe_vertical_back 500
end
tcase << TestAction.new(:TextView_Title_7) do
$ruiObj = RUIObject.new.with('objectid', 67205646).with('selfid', -589731018).with('textdescid', 397088473).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(:scriptAction_9) 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')
if switchIsOn
$ruiObj.click
end
waitsecond(2)
end
tcase << TestAction.new(:pressBack_2) do
pressBack
waitsecond(2)
end
tcase << TestAction.new(:pressBack_3) do
pressBack
waitsecond(2)
end
tcase << TestAction.new(:pressBack_4) do
pressBack
waitsecond(2)
end
tcase.run(loopTime)
end
def self.enhanced_LTE_service(loopTime)
tcase = TestCase.new("enhanced_LTE_service")
tcase << TestAction.new(:pressHome_1) do
pressHome
waitsecond(2)
end
tcase << TestAction.new(:gotoApp_5_1) do
gotoApp('Settings')
waitsecond(1)
end
tcase << TestAction.new(:TextView_Title_2) do
$ruiObj = RUIObject.new.with('objectid', 10212784).with('selfid', -2078686330).with('textdescid', 1550078507).with('uniqueparentid', 0)
.with('uitreeindex', 5)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'Networks')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:swipeDown_3) do
swipe_vertical 500
waitsecond(2)
end
tcase << TestAction.new(:TextView_Title_5) do
$ruiObj = RUIObject.new.with('objectid', -2099539841).with('selfid', -590021802).with('textdescid', -1389148054).with('uniqueparentid', 0).with('classresourceid', 490183159)
.with('uitreeindex', 34)
.with('classname', 'TextView')
.with('resource-id', 'android:id/title')
.with('text', 'More')
$ruiObj.click
waitsecond(2)
end
tcase << TestAction.new(:Switch_SwitchWidget_7) do
$ruiObj = RUIObject.new.with('objectid', -1128160036).with('selfid', -1798770950).with('textdescid', -613222716).with('uniqueparentid', 0).with('classresourceid', -205276468)
.with('uitreeindex', 4)
.with('classname', 'Switch')
.with('resource-id', 'android:id/switch_widget')
$ruiObj.click
waitsecond(2)
end
tcase.run(loopTime)
end
def self.startTest(loopTime)
tcase = TestCase.new("startTest")
tcase << TestAction.new(:pressBack_1) do
pressBack
end
tcase << TestAction.new(:pressBack_2) do
pressBack
end
tcase << TestAction.new(:pressHome_3) do
pressHome
end
tcase.run(loopTime)
end
def self.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
if rand(100) < 0
for mode in db('ModemMode')
puts "Change to #{mode}"
if mode == 'LTE'
writelog("Telephony_05_01_01_01_LTE")
change_LTE 1
Telephony_05_01_01_01 60
elsif mode == '3G'
writelog("Telephony_05_01_01_01_3G")
change_3G 1
Telephony_05_01_01_01 20
end
end
end
if rand(100) < 0
for mode in db('ModemMode')
puts "Change to #{mode}"
if mode == 'LTE'
writelog("Telephony_05_01_01_03_LTE")
change_LTE 1
Telephony_05_01_01_03 60
elsif mode == '3G'
writelog("Telephony_05_01_01_03_3G")
change_3G 1
Telephony_05_01_01_03 20
end
end
end
$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
for mode in db('ModemMode')
puts "Change to #{mode}"
if mode == 'LTE'
writelog("Messaging_05_01_02_03_LTE")
change_LTE 1
Messaging_05_01_02_03 30
elsif mode == '3G'
writelog("Messaging_05_01_02_03_3G")
change_3G 1
Messaging_05_01_02_03 20
end
end
end
if rand(100) < 0
for mode in db('ModemMode')
puts "Change to #{mode}"
if mode == 'LTE'
writelog("Messaging_05_01_02_05_LTE")
change_LTE 1
Messaging_05_01_02_05 30
elsif mode == '3G'
writelog("Messaging_05_01_02_05_3G")
change_3G 1
Messaging_05_01_02_05 20
end
end
end
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
if rand(100) < 0
for mode in db('ModemMode')
puts "Change to #{mode}"
if mode == 'LTE'
writelog("Gmail_05_01_03_01_LTE")
change_LTE 1
Gmail_05_01_03_01 30
elsif mode == '3G'
writelog("Gmail_05_01_03_01_3G")
change_3G 1
Gmail_05_01_03_01 20
end
end
end
if rand(100) < 0
for mode in db('ModemMode')
puts "Change to #{mode}"
if mode == 'LTE'
writelog("Gmail_05_01_03_02_LTE")
change_LTE 1
Gmail_05_01_03_02 30
elsif mode == '3G'
writelog("Gmail_05_01_03_02_3G")
change_3G 1
Gmail_05_01_03_02 20
end
end
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
if rand(100) < 0
for mode in db('ModemMode')
puts "Change to #{mode}"
if mode == 'LTE'
writelog("Browser_05_01_04_01_LTE")
change_LTE 1
Browser_05_01_04_01 30
elsif mode == '3G'
writelog("Browser_05_01_04_01_3G")
change_3G 1
Browser_05_01_04_01 20
end
end
end
if rand(100) < 0
for mode in db('ModemMode')
puts "Change to #{mode}"
if mode == 'LTE'
writelog("Browser_05_01_04_02_LTE")
change_LTE 1
Browser_05_01_04_02 30
elsif mode == '3G'
writelog("Browser_05_01_04_02_3G")
change_3G 1
Browser_05_01_04_02 20
end
end
end
if rand(100) < 0
for mode in db('ModemMode')
puts "Change to #{mode}"
if mode == 'LTE'
writelog("Browser_05_01_04_03_LTE")
change_LTE 1
Browser_05_01_04_03 6
elsif mode == '3G'
writelog("Browser_05_01_04_03_3G")
change_3G 1
Browser_05_01_04_03 4
end
end
end
$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 20
$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_03 1
$actionParamInput = "none"
MultiMedia_05_01_07_04 20
$actionParamInput = "none"
MultiMedia_05_01_07_05 20
$actionParamInput = "none"
MultiMedia_05_01_07_06 20
$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_04 1
$actionParamInput = "none"
MultiTasking_05_01_08_05 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
if rand(100) < 0
$actionParamInput = "none"
VideoCall_01 20
end
$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
waitsecond(2)
sendStatus("Done::mainLoop::Loop::#{index}")
writelog("Finish::Loop::#{$curMainLoopNum}")
saveLogFileToGist if $saveLogToGist
index += 1
end
$engineStatus = "Idle"
resetStatus
sendStatus("Finish::mainLoop::END")
end
def self.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.exception_handler
end
$curProjectLogFile = $useLastLogFile
$curProjectLogFile = "DIVA_MTBF_#{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