Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
459
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 228.47 KB | None | 0 0
  1. loadTestDB
  2.  
  3. module JUDY_UIENGINE_MTBF
  4.  
  5. def self.Email_05_01_03_02(loopTime)
  6.  
  7. tcase = TestCase.new("Email_05_01_03_02")
  8.  
  9. tcase << TestAction.new(:scriptAction_12) do
  10. logStartTest("Email_05_01_03_02")
  11. end
  12.  
  13. tcase << TestAction.new(:gotoApp_3) do
  14. gotoApp('Email')
  15. end
  16.  
  17. tcase << TestAction.new(:ImageView_Img1_2) do
  18. $ruiObj = RUIObject.new.with('objectid', 577677288).with('selfid', 1832242753).with('textdescid', 1040024250).with('uniqueparentid', 0)
  19. .with('uitreeindex', 13)
  20. .with('classname', 'ImageView')
  21. .with('resource-id', 'com.lge.email:id/img1')
  22. .with('content-desc', 'Compose')
  23.  
  24. $ruiObj.click
  25.  
  26. waitsecond(1)
  27. end
  28.  
  29. tcase << TestAction.new(:EditText_To_2) do
  30. $ruiObj = RUIObject.new.with('objectid', 949433449).with('selfid', -182898776).with('textdescid', -900253096).with('uniqueparentid', 0).with('classresourceid', 1666676343)
  31. .with('uitreeindex', 6)
  32. .with('pretext', 'To')
  33. .with('classname', 'EditText')
  34. .with('content-desc', 'To: ')
  35.  
  36. $ruiObj.inputtext('dvgats1@gmail.com')
  37. end
  38.  
  39. tcase << TestAction.new(:pressEnter_3) do
  40. pressEnter
  41. end
  42.  
  43. tcase << TestAction.new(:EditText_Txtemailsubject_6) do
  44. $ruiObj = RUIObject.new.with('objectid', 1286174050).with('selfid', -1018848110).with('textdescid', 1216689918).with('uniqueparentid', 1959895911).with('classresourceid', 386631998)
  45. .with('uitreeindex', 11)
  46. .with('classname', 'EditText')
  47. .with('resource-id', 'com.lge.email:id/txtEmailSubject')
  48.  
  49. $ruiObj.inputtext('Email Test')
  50.  
  51. waitsecond(1)
  52. end
  53.  
  54. tcase << TestAction.new(:clickXY_96_920_2) do
  55. click(96,920)
  56.  
  57. waitsecond(1)
  58. end
  59.  
  60. tcase << TestAction.new(:View_EditBox_4) do
  61. $ruiObj = RUIObject.new.with('objectid', 134611444).with('selfid', 1661648749).with('textdescid', 1161931405).with('uniqueparentid', -2001114113).with('classresourceid', -760537482)
  62. .with('uitreeindex', 12)
  63. .with('pretext', 'CcBcc')
  64. .with('classname', 'android.view.View')
  65. .with('resource-id', 'EditBox')
  66. .with('content-desc', '
  67.  
  68. Sent from my LG Mobile')
  69.  
  70. $ruiObj.click
  71. end
  72.  
  73. tcase << TestAction.new(:scriptAction_14) do
  74. $ruiObj.inputtext('Testing UiEngine Email Test!!!')
  75. end
  76.  
  77. tcase << TestAction.new(:Button_BtnattachAtnt_2) do
  78. $ruiObj = RUIObject.new.with('objectid', 61942491).with('selfid', 1685585846).with('textdescid', 746935205).with('uniqueparentid', 0)
  79. .with('uitreeindex', 15)
  80. .with('classname', 'Button')
  81. .with('resource-id', 'com.lge.email:id/btnAttach_atnt')
  82. .with('content-desc', 'Attach')
  83. .with('text', 'ATTACH')
  84.  
  85. $ruiObj.click
  86.  
  87. waitsecond(2)
  88. end
  89.  
  90. tcase << TestAction.new(:ImageView_Iv_15) do
  91. $ruiObj = RUIObject.new.with('objectid', 973762667).with('selfid', -408094862).with('textdescid', 121871637).with('uniqueparentid', 0)
  92. .with('uitreeindex', 1)
  93. .with('pretext', 'Attach 0 B215 MB')
  94. .with('classname', 'ImageView')
  95. .with('resource-id', 'com.lge.email:id/iv')
  96.  
  97. $ruiObj.click
  98.  
  99. waitsecond(4)
  100. end
  101.  
  102. tcase << TestAction.new(:ImageButton_Show_6) do
  103. $ruiObj = RUIObject.new.with('objectid', -1807230859).with('selfid', -929198491).with('textdescid', 629574489).with('uniqueparentid', 0)
  104. .with('uitreeindex', 0)
  105. .with('classname', 'ImageButton')
  106. .with('content-desc', 'Show roots')
  107.  
  108. $ruiObj.click
  109. end
  110.  
  111. tcase << TestAction.new(:TextView_Title_6) do
  112. $ruiObj = RUIObject.new.with('objectid', 942770025).with('selfid', 525544369).with('textdescid', 2103473669).with('uniqueparentid', 0).with('classresourceid', 490183159)
  113. .with('uitreeindex', 15)
  114. .with('classname', 'TextView')
  115. .with('resource-id', 'android:id/title')
  116. .with('text', 'Gallery')
  117.  
  118. $ruiObj.click
  119.  
  120. waitsecond(2)
  121. end
  122.  
  123. tcase << TestAction.new(:clickXY_228_560_6) do
  124. click(228,560)
  125.  
  126. waitsecond(1)
  127. end
  128.  
  129. tcase << TestAction.new(:clickXY_204_544_8) do
  130. click(204,544)
  131.  
  132. waitsecond(1)
  133. end
  134.  
  135. tcase << TestAction.new(:Button_SelectionOk_10) do
  136. $ruiObj = RUIObject.new.with('objectid', 1615080131).with('selfid', 1112270122).with('textdescid', -118829337).with('uniqueparentid', 0)
  137. .with('uitreeindex', 3)
  138. .with('classname', 'Button')
  139. .with('resource-id', 'com.android.gallery3d:id/selection_ok')
  140. .with('text', 'OK')
  141.  
  142. $ruiObj.click
  143.  
  144. waitsecond(1)
  145. end
  146.  
  147. tcase << TestAction.new(:Click_Original) do
  148. $ruiObj = RUIObject.new.with('objectid', -784272264).with('selfid', -1179635554).with('textdescid', -74272089).with('uniqueparentid', 0).with('classresourceid', 490068035)
  149. .with('uitreeindex', 1)
  150. .with('classname', 'TextView')
  151. .with('resource-id', 'android:id/text1')
  152. .with('text', 'Original')
  153.  
  154. $ruiObj.click
  155.  
  156. waitsecond(1)
  157. end
  158.  
  159. tcase << TestAction.new(:Button_BtnsendAtnt_4) do
  160. $ruiObj = RUIObject.new.with('objectid', 1747678584).with('selfid', 1651854553).with('textdescid', 36858568).with('uniqueparentid', 0)
  161. .with('uitreeindex', 21)
  162. .with('classname', 'Button')
  163. .with('resource-id', 'com.lge.email:id/btnSend_atnt')
  164. .with('content-desc', 'Send')
  165. .with('text', 'SEND')
  166.  
  167. $ruiObj.click
  168.  
  169. waitsecond(2)
  170. end
  171.  
  172. tcase << TestAction.new(:ImageView_Img1_23) do
  173. $ruiObj = RUIObject.new.with('objectid', 577677288).with('selfid', 1832242753).with('textdescid', 1040024250).with('uniqueparentid', 0)
  174. .with('uitreeindex', 18)
  175. .with('classname', 'ImageView')
  176. .with('resource-id', 'com.lge.email:id/img1')
  177. .with('content-desc', 'Compose')
  178.  
  179. $ruiObj.isExist
  180.  
  181. waitsecond(2)
  182. end
  183.  
  184. tcase << TestAction.new(:ImageView_Slidedrawerimg_20) do
  185. $ruiObj = RUIObject.new.with('objectid', -431894634).with('selfid', -1542033050).with('textdescid', -503831734).with('uniqueparentid', 0)
  186. .with('uitreeindex', 0)
  187. .with('classname', 'ImageView')
  188. .with('resource-id', 'com.lge.email:id/slidedrawerimg')
  189.  
  190. $ruiObj.click
  191. end
  192.  
  193. tcase << TestAction.new(:TextView_DrawerChildName_22) do
  194. $ruiObj = RUIObject.new.with('objectid', 2119189077).with('selfid', 232899905).with('textdescid', -1453017635).with('uniqueparentid', 0)
  195. .with('uitreeindex', 19)
  196. .with('classname', 'TextView')
  197. .with('resource-id', 'com.lge.email:id/drawer_child_name')
  198. .with('text', 'Sent')
  199.  
  200. $ruiObj.click
  201.  
  202. waitsecond(2)
  203. end
  204.  
  205. tcase << TestAction.new(:clickXY_560_492_12) do
  206. click(560,492)
  207.  
  208. waitsecond(1)
  209. end
  210.  
  211. tcase << TestAction.new(:Button_Btnatntbottomdelete_6) do
  212. $ruiObj = RUIObject.new.with('objectid', -2098725759).with('selfid', 480632483).with('textdescid', 1124287286).with('uniqueparentid', 0)
  213. .with('uitreeindex', 25)
  214. .with('classname', 'Button')
  215. .with('resource-id', 'com.lge.email:id/btnAtntBottomDelete')
  216. .with('text', 'DELETE')
  217.  
  218. $ruiObj.click
  219.  
  220. waitsecond(2)
  221. end
  222.  
  223. tcase << TestAction.new(:Button_Button1_29) do
  224. $ruiObj = RUIObject.new.with('objectid', 892548796).with('selfid', 1012902611).with('textdescid', 1604787793).with('uniqueparentid', 0)
  225. .with('uitreeindex', 3)
  226. .with('classname', 'Button')
  227. .with('resource-id', 'android:id/button1')
  228. .with('text', 'Delete')
  229.  
  230. $ruiObj.click
  231.  
  232. waitsecond(1)
  233. end
  234.  
  235. tcase << TestAction.new(:scriptAction_8) do
  236. $myTestResult = checkLastExistResult
  237.  
  238. if $myTestResult == false
  239. $myFailReason = "Email not sent"
  240. end
  241. logStopTest("Email_05_01_03_02")
  242. end
  243.  
  244. tcase << TestAction.new(:pressBack_3) do
  245. pressBack
  246. end
  247.  
  248. tcase << TestAction.new(:pressBack_4) do
  249. pressBack
  250. end
  251.  
  252. tcase.run(loopTime)
  253.  
  254. end
  255.  
  256. def self.Email_05_01_03_03(loopTime)
  257.  
  258. tcase = TestCase.new("Email_05_01_03_03")
  259.  
  260. tcase << TestAction.new(:scriptAction_3) do
  261. logStartTest("Email_05_01_03_03")
  262. end
  263.  
  264. tcase << TestAction.new(:gotoApp_3) do
  265. gotoApp('Email')
  266. end
  267.  
  268. tcase << TestAction.new(:ImageView_Slidedrawerimg_2) do
  269. $ruiObj = RUIObject.new.with('objectid', -431894634).with('selfid', -1542033050).with('textdescid', -503831734).with('uniqueparentid', 0)
  270. .with('uitreeindex', 0)
  271. .with('classname', 'ImageView')
  272. .with('resource-id', 'com.lge.email:id/slidedrawerimg')
  273.  
  274. $ruiObj.click
  275. end
  276.  
  277. tcase << TestAction.new(:TextView_DrawerChildName_11) do
  278. $ruiObj = RUIObject.new.with('objectid', 2119189077).with('selfid', -1379016195).with('textdescid', 1922754213).with('uniqueparentid', 0)
  279. .with('uitreeindex', 12)
  280. .with('classname', 'TextView')
  281. .with('resource-id', 'com.lge.email:id/drawer_child_name')
  282. .with('text', 'Inbox')
  283.  
  284. $ruiObj.click
  285.  
  286. waitsecond(2)
  287. end
  288.  
  289. tcase << TestAction.new(:clickXY_444_404_8) do
  290. click(444,404)
  291.  
  292. waitsecond(1)
  293. end
  294.  
  295. tcase << TestAction.new(:Button_Btnatntbottomdelete_2) do
  296. $ruiObj = RUIObject.new.with('objectid', -2098725759).with('selfid', 480632483).with('textdescid', 1124287286).with('uniqueparentid', 0)
  297. .with('uitreeindex', 19)
  298. .with('classname', 'Button')
  299. .with('resource-id', 'com.lge.email:id/btnAtntBottomDelete')
  300. .with('text', 'DELETE')
  301.  
  302. $ruiObj.click
  303.  
  304. waitsecond(2)
  305. end
  306.  
  307. tcase << TestAction.new(:Button_Button1_4) do
  308. $ruiObj = RUIObject.new.with('objectid', 892548796).with('selfid', 982364851).with('textdescid', 658117233).with('uniqueparentid', 0)
  309. .with('uitreeindex', 3)
  310. .with('classname', 'Button')
  311. .with('resource-id', 'android:id/button1')
  312. .with('text', 'DELETE')
  313.  
  314. $ruiObj.click
  315.  
  316. waitsecond(2)
  317. end
  318.  
  319. tcase << TestAction.new(:scriptAction_8_1_1) do
  320. $myTestResult = checkLastExistResult
  321.  
  322. if $myTestResult == false
  323. $myFailReason = "Email not opened"
  324. end
  325. logStopTest("Email_05_01_03_03")
  326. end
  327.  
  328. tcase << TestAction.new(:pressBack_1) do
  329. pressBack
  330. end
  331.  
  332. tcase << TestAction.new(:pressBack_2) do
  333. pressBack
  334. end
  335.  
  336. tcase.run(loopTime)
  337.  
  338. end
  339.  
  340. def self.GPU_WebCrawler(loopTime)
  341.  
  342. tcase = TestCase.new("GPU_WebCrawler")
  343.  
  344. tcase << TestAction.new(:gotoApp_2) do
  345. gotoApp('WebCrawler')
  346.  
  347. waitsecond(2)
  348. end
  349.  
  350. tcase << TestAction.new(:Button_Start_6) do
  351. $ruiObj = RUIObject.new.with('objectid', 759506754).with('selfid', 1749104131).with('textdescid', 384870857).with('uniqueparentid', 0).with('classresourceid', -53051820)
  352. .with('uitreeindex', 3)
  353. .with('classname', 'Button')
  354. .with('resource-id', 'com.android.webcrawler:id/start')
  355. .with('text', 'Start Crawling')
  356.  
  357. $ruiObj.click
  358.  
  359. waitsecond(2)
  360. end
  361.  
  362. tcase << TestAction.new(:wait32second_9) do
  363. waitsecond(100)
  364. end
  365.  
  366. tcase << TestAction.new(:pressBack_11) do
  367. pressBack
  368.  
  369. waitsecond(2)
  370. end
  371.  
  372. tcase << TestAction.new(:pressBack_2) do
  373. pressBack
  374.  
  375. waitsecond(2)
  376. end
  377.  
  378. tcase.run(loopTime)
  379.  
  380. end
  381.  
  382. def self.Gmail_05_01_03_01(loopTime)
  383.  
  384. tcase = TestCase.new("Gmail_05_01_03_01")
  385.  
  386. tcase << TestAction.new(:pressHome_2) do
  387. pressHome
  388. end
  389.  
  390. tcase << TestAction.new(:scriptAction_12_1) do
  391. logStartTest("Gmail_05_01_03_01")
  392. end
  393.  
  394. tcase << TestAction.new(:gotoApp_3) do
  395. gotoApp('Gmail')
  396.  
  397. waitsecond(2)
  398. end
  399.  
  400. tcase << TestAction.new(:ImageButton_ComposeButton_2) do
  401. $ruiObj = RUIObject.new.with('objectid', 2010391035).with('selfid', 1808564263).with('textdescid', -481574643).with('uniqueparentid', 0)
  402. .with('uitreeindex', 26)
  403. .with('classname', 'ImageButton')
  404. .with('resource-id', 'com.google.android.gm:id/compose_button')
  405. .with('content-desc', 'Compose')
  406.  
  407. $ruiObj.click
  408.  
  409. waitsecond(1)
  410. end
  411.  
  412. tcase << TestAction.new(:MultiAutoCompleteTextView_To_5) do
  413. $ruiObj = RUIObject.new.with('objectid', 1308296701).with('selfid', 678761455).with('textdescid', 1902492099).with('uniqueparentid', 0).with('classresourceid', 1488875515)
  414. .with('uitreeindex', 9)
  415. .with('classname', 'MultiAutoCompleteTextView')
  416. .with('resource-id', 'com.google.android.gm:id/to')
  417.  
  418. $ruiObj.inputtext('dvgats1@gmail.com')
  419.  
  420. waitsecond(2)
  421. end
  422.  
  423. tcase << TestAction.new(:pressEnter_3) do
  424. pressEnter
  425. end
  426.  
  427. tcase << TestAction.new(:EditText_Subject_6) do
  428. $ruiObj = RUIObject.new.with('objectid', 1144045145).with('selfid', -477614756).with('textdescid', 1105661159).with('uniqueparentid', 0).with('classresourceid', 927865352)
  429. .with('uitreeindex', 12)
  430. .with('classname', 'EditText')
  431. .with('resource-id', 'com.google.android.gm:id/subject')
  432.  
  433. $ruiObj.inputtext('Email Test')
  434.  
  435. waitsecond(1)
  436. end
  437.  
  438. tcase << TestAction.new(:View_Compose_2) do
  439. $ruiObj = RUIObject.new.with('objectid', -2101420856).with('selfid', -497970335).with('textdescid', 1027339414).with('uniqueparentid', 1227675605).with('classresourceid', 1815484335)
  440. .with('uitreeindex', 14)
  441. .with('classname', 'android.view.View')
  442. .with('content-desc', 'Compose email')
  443.  
  444. $ruiObj.click
  445.  
  446. waitsecond(2)
  447. end
  448.  
  449. tcase << TestAction.new(:scriptAction_14) do
  450. $ruiObj.inputtext('Testing UiEngine Email Test!!!')
  451. end
  452.  
  453. tcase << TestAction.new(:TextView_Send_10) do
  454. $ruiObj = RUIObject.new.with('objectid', 1131985907).with('selfid', 2103341243).with('textdescid', -1405558155).with('uniqueparentid', 0)
  455. .with('uitreeindex', 3)
  456. .with('classname', 'TextView')
  457. .with('resource-id', 'com.google.android.gm:id/send')
  458. .with('content-desc', 'Send')
  459.  
  460. $ruiObj.click
  461.  
  462. waitsecond(1)
  463. end
  464.  
  465. tcase << TestAction.new(:ImageButton_ComposeButton_12) do
  466. $ruiObj = RUIObject.new.with('objectid', 2010391035).with('selfid', 1808564263).with('textdescid', -481574643).with('uniqueparentid', 0)
  467. .with('uitreeindex', 26)
  468. .with('classname', 'ImageButton')
  469. .with('resource-id', 'com.google.android.gm:id/compose_button')
  470. .with('content-desc', 'Compose')
  471.  
  472. $ruiObj.isExist
  473.  
  474. waitsecond(1)
  475. end
  476.  
  477. tcase << TestAction.new(:ImageButton_Open_2) do
  478. $ruiObj = RUIObject.new.with('objectid', -387960062).with('selfid', 1589392844).with('textdescid', -1233194523).with('uniqueparentid', 0)
  479. .with('uitreeindex', 0)
  480. .with('classname', 'ImageButton')
  481. .with('content-desc', 'Open navigation drawer')
  482.  
  483. $ruiObj.click
  484.  
  485. waitsecond(2)
  486. end
  487.  
  488. tcase << TestAction.new(:TextView_Name_4) do
  489. $ruiObj = RUIObject.new.with('objectid', -630461263).with('selfid', -610816808).with('textdescid', 727067449).with('uniqueparentid', 0).with('classresourceid', 790406410)
  490. .with('uitreeindex', 23)
  491. .with('classname', 'TextView')
  492. .with('resource-id', 'com.google.android.gm:id/name')
  493. .with('text', 'Sent')
  494.  
  495. $ruiObj.click
  496.  
  497. waitsecond(2)
  498. end
  499.  
  500. tcase << TestAction.new(:clickXY_428_768_19) do
  501. click(428,768)
  502.  
  503. waitsecond(1)
  504. end
  505.  
  506. tcase << TestAction.new(:TextView_Delete_4) do
  507. $ruiObj = RUIObject.new.with('objectid', 1211721173).with('selfid', -390800203).with('textdescid', -538482442).with('uniqueparentid', 0)
  508. .with('uitreeindex', 1)
  509. .with('classname', 'TextView')
  510. .with('resource-id', 'com.google.android.gm:id/delete')
  511. .with('content-desc', 'Delete')
  512.  
  513. $ruiObj.click
  514.  
  515. waitsecond(2)
  516. end
  517.  
  518. tcase << TestAction.new(:scriptAction_8) do
  519. $myTestResult = checkLastExistResult
  520.  
  521. if $myTestResult == false
  522. $myFailReason = "Email not sent"
  523. end
  524. logStopTest("Gmail_05_01_03_01")
  525. end
  526.  
  527. tcase << TestAction.new(:pressBack_3) do
  528. pressBack
  529. end
  530.  
  531. tcase << TestAction.new(:pressBack_4) do
  532. pressBack
  533. end
  534.  
  535. tcase << TestAction.new(:pressHome_21) do
  536. pressHome
  537.  
  538. waitsecond(2)
  539. end
  540.  
  541. tcase.run(loopTime)
  542.  
  543. end
  544.  
  545. def self.Gmail_05_01_03_02(loopTime)
  546.  
  547. tcase = TestCase.new("Gmail_05_01_03_02")
  548.  
  549. tcase << TestAction.new(:scriptAction_12) do
  550. logStartTest("Gmail_05_01_03_02")
  551. end
  552.  
  553. tcase << TestAction.new(:gotoApp_3) do
  554. gotoApp('Gmail')
  555.  
  556. waitsecond(2)
  557. end
  558.  
  559. tcase << TestAction.new(:ImageButton_ComposeButton_2) do
  560. $ruiObj = RUIObject.new.with('objectid', 2010391035).with('selfid', 1808564263).with('textdescid', -481574643).with('uniqueparentid', 0)
  561. .with('uitreeindex', 24)
  562. .with('classname', 'ImageButton')
  563. .with('resource-id', 'com.google.android.gm:id/compose_button')
  564. .with('content-desc', 'Compose')
  565.  
  566. $ruiObj.click
  567.  
  568. waitsecond(2)
  569. end
  570.  
  571. tcase << TestAction.new(:MultiAutoCompleteTextView_To_49) do
  572. $ruiObj = RUIObject.new.with('objectid', 1308296701).with('selfid', 678761455).with('textdescid', 1902492099).with('uniqueparentid', 0).with('classresourceid', 1488875515)
  573. .with('uitreeindex', 9)
  574. .with('classname', 'MultiAutoCompleteTextView')
  575. .with('resource-id', 'com.google.android.gm:id/to')
  576.  
  577. $ruiObj.inputtext('dvgats1@gmail.com')
  578.  
  579. waitsecond(2)
  580. end
  581.  
  582. tcase << TestAction.new(:pressEnter_7) do
  583. pressEnter
  584.  
  585. waitsecond(1)
  586. end
  587.  
  588. tcase << TestAction.new(:EditText_Subject_9) do
  589. $ruiObj = RUIObject.new.with('objectid', 1144045145).with('selfid', -477614756).with('textdescid', 1105661159).with('uniqueparentid', 0).with('classresourceid', 927865352)
  590. .with('uitreeindex', 12)
  591. .with('classname', 'EditText')
  592. .with('resource-id', 'com.google.android.gm:id/subject')
  593.  
  594. $ruiObj.inputtext('Email Test')
  595.  
  596. waitsecond(1)
  597. end
  598.  
  599. tcase << TestAction.new(:View_Compose_2) do
  600. $ruiObj = RUIObject.new.with('objectid', -2101420856).with('selfid', -497970335).with('textdescid', 1027339414).with('uniqueparentid', 1227675605).with('classresourceid', 1815484335)
  601. .with('uitreeindex', 14)
  602. .with('classname', 'android.view.View')
  603. .with('content-desc', 'Compose email')
  604.  
  605. $ruiObj.click
  606.  
  607. waitsecond(2)
  608. end
  609.  
  610. tcase << TestAction.new(:scriptAction_14) do
  611. $ruiObj.inputtext('Testing UiEngine Email Test!!!')
  612. end
  613.  
  614. tcase << TestAction.new(:TextView_AddAttachment_13) do
  615. $ruiObj = RUIObject.new.with('objectid', 915724844).with('selfid', 1566257663).with('textdescid', -1753719389).with('uniqueparentid', 0)
  616. .with('uitreeindex', 2)
  617. .with('classname', 'TextView')
  618. .with('resource-id', 'com.google.android.gm:id/add_attachment')
  619. .with('content-desc', 'Attach file')
  620.  
  621. $ruiObj.click
  622.  
  623. waitsecond(1)
  624. end
  625.  
  626. tcase << TestAction.new(:TextView_Title_4) do
  627. $ruiObj = RUIObject.new.with('objectid', 665784376).with('selfid', -1478650284).with('textdescid', 1395090321).with('uniqueparentid', 0).with('classresourceid', -1261418567)
  628. .with('uitreeindex', 0)
  629. .with('classname', 'TextView')
  630. .with('resource-id', 'com.google.android.gm:id/title')
  631. .with('text', 'Attach file')
  632.  
  633. $ruiObj.click
  634.  
  635. waitsecond(2)
  636. end
  637.  
  638. tcase << TestAction.new(:ImageButton_Show_2) do
  639. $ruiObj = RUIObject.new.with('objectid', -1807230859).with('selfid', -929198491).with('textdescid', 629574489).with('uniqueparentid', 0)
  640. .with('uitreeindex', 0)
  641. .with('classname', 'ImageButton')
  642. .with('content-desc', 'Show roots')
  643.  
  644. $ruiObj.click
  645.  
  646. waitsecond(1)
  647. end
  648.  
  649. tcase << TestAction.new(:TextView_Title_14) do
  650. $ruiObj = RUIObject.new.with('objectid', -1941383373).with('selfid', 4082754).with('textdescid', 50769842).with('uniqueparentid', 0).with('classresourceid', 490183159)
  651. .with('uitreeindex', 30)
  652. .with('classname', 'TextView')
  653. .with('resource-id', 'android:id/title')
  654. .with('text', 'Photos')
  655.  
  656. $ruiObj.click
  657.  
  658. waitsecond(2)
  659. end
  660.  
  661. tcase << TestAction.new(:Button_PermissionAllowButton_12) do
  662. $ruiObj = RUIObject.new.with('objectid', -886457929).with('selfid', 1443382411).with('textdescid', 270556320).with('uniqueparentid', 0)
  663. .with('uitreeindex', 3)
  664. .with('classname', 'Button')
  665. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  666. .with('text', 'ALLOW')
  667.  
  668. $ruiObj.click
  669.  
  670. waitsecond(2)
  671. end
  672.  
  673. tcase << TestAction.new(:TextView_Title_16) do
  674. $ruiObj = RUIObject.new.with('objectid', -2074516409).with('selfid', -1484513934).with('textdescid', 889140747).with('uniqueparentid', 0)
  675. .with('uitreeindex', 19)
  676. .with('classname', 'TextView')
  677. .with('resource-id', 'com.google.android.apps.photos:id/title')
  678. .with('text', '1M')
  679.  
  680. $ruiObj.click
  681.  
  682. waitsecond(2)
  683. end
  684.  
  685. tcase << TestAction.new(:View_Photo_18) do
  686. $ruiObj = RUIObject.new.with('objectid', 2023669211).with('selfid', -986702481).with('textdescid', -1518879013).with('uniqueparentid', 0)
  687. .with('uitreeindex', 2)
  688. .with('classname', 'android.view.ViewGroup')
  689.  
  690. $ruiObj.select('Similiar').click
  691.  
  692. waitsecond(2)
  693. end
  694.  
  695. tcase << TestAction.new(:TextView_DoneButton_20) do
  696. $ruiObj = RUIObject.new.with('objectid', -984795698).with('selfid', -885365197).with('textdescid', 1453085810).with('uniqueparentid', 0)
  697. .with('uitreeindex', 11)
  698. .with('classname', 'TextView')
  699. .with('resource-id', 'com.google.android.apps.photos:id/done_button')
  700. .with('content-desc', 'Done')
  701. .with('text', 'DONE')
  702.  
  703. $ruiObj.click
  704.  
  705. waitsecond(2)
  706. end
  707.  
  708. tcase << TestAction.new(:TextView_Send_23) do
  709. $ruiObj = RUIObject.new.with('objectid', 1131985907).with('selfid', 2103341243).with('textdescid', -1405558155).with('uniqueparentid', 0)
  710. .with('uitreeindex', 3)
  711. .with('classname', 'TextView')
  712. .with('resource-id', 'com.google.android.gm:id/send')
  713. .with('content-desc', 'Send')
  714.  
  715. $ruiObj.click
  716.  
  717. waitsecond(2)
  718. end
  719.  
  720. tcase << TestAction.new(:ImageButton_ComposeButton_6) do
  721. $ruiObj = RUIObject.new.with('objectid', 1598291378).with('selfid', 1808564263).with('textdescid', -1604213756).with('uniqueparentid', 0)
  722. .with('uitreeindex', 16)
  723. .with('classname', 'ImageButton')
  724. .with('resource-id', 'com.google.android.gm:id/compose_button')
  725. .with('content-desc', 'Compose')
  726.  
  727. $ruiObj.isExist
  728. end
  729.  
  730. tcase << TestAction.new(:ImageButton_Open_2) do
  731. $ruiObj = RUIObject.new.with('objectid', -1013150848).with('selfid', 1589392844).with('textdescid', -993230041).with('uniqueparentid', 0)
  732. .with('uitreeindex', 0)
  733. .with('classname', 'ImageButton')
  734. .with('content-desc', 'Open navigation drawer')
  735.  
  736. $ruiObj.click
  737.  
  738. waitsecond(2)
  739. end
  740.  
  741. tcase << TestAction.new(:clickXY_3195_1800_4) do
  742. click(319.5,1800)
  743.  
  744. waitsecond(2)
  745. end
  746.  
  747. tcase << TestAction.new(:clickXY_7065_8865_6) do
  748. click(706.5,886.5)
  749.  
  750. waitsecond(2)
  751. end
  752.  
  753. tcase << TestAction.new(:TextView_Delete_36) do
  754. $ruiObj = RUIObject.new.with('objectid', -15615667).with('selfid', -390800203).with('textdescid', -1373012866).with('uniqueparentid', 0)
  755. .with('uitreeindex', 1)
  756. .with('classname', 'TextView')
  757. .with('resource-id', 'com.google.android.gm:id/delete')
  758. .with('content-desc', 'Delete')
  759.  
  760. $ruiObj.click
  761.  
  762. waitsecond(1)
  763. end
  764.  
  765. tcase << TestAction.new(:scriptAction_8) do
  766. $myTestResult = checkLastExistResult
  767.  
  768. if $myTestResult == false
  769. $myFailReason = "Email not sent"
  770. end
  771. logStopTest("Gmail_05_01_03_02")
  772. end
  773.  
  774. tcase << TestAction.new(:pressBack_3) do
  775. pressBack
  776. end
  777.  
  778. tcase << TestAction.new(:pressBack_4) do
  779. pressBack
  780. end
  781.  
  782. tcase << TestAction.new(:pressHome_2) do
  783. pressHome
  784.  
  785. waitsecond(0)
  786. end
  787.  
  788. tcase.run(loopTime)
  789.  
  790. end
  791.  
  792. def self.Gmail_05_01_03_03(loopTime)
  793.  
  794. tcase = TestCase.new("Gmail_05_01_03_03")
  795.  
  796. tcase << TestAction.new(:scriptAction_3) do
  797. logStartTest("Gmail_05_01_03_03")
  798. end
  799.  
  800. tcase << TestAction.new(:gotoApp_3) do
  801. gotoApp('Gmail')
  802. end
  803.  
  804. tcase << TestAction.new(:ImageButton_Navigate_4) do
  805. $ruiObj = RUIObject.new.with('objectid', -387960062).with('selfid', -123872605).with('textdescid', -1698616212).with('uniqueparentid', 0)
  806. .with('uitreeindex', 0)
  807. .with('classname', 'ImageButton')
  808. .with('content-desc', 'Navigate up')
  809.  
  810. $ruiObj.click
  811.  
  812. waitsecond(1)
  813. end
  814.  
  815. tcase << TestAction.new(:TextView_Name_2) do
  816. $ruiObj = RUIObject.new.with('objectid', -630461263).with('selfid', -610816808).with('textdescid', 727067449).with('uniqueparentid', 0).with('classresourceid', 790406410)
  817. .with('uitreeindex', 26)
  818. .with('classname', 'TextView')
  819. .with('resource-id', 'com.google.android.gm:id/name')
  820. .with('text', 'Sent')
  821.  
  822. $ruiObj.click
  823.  
  824. waitsecond(1)
  825. end
  826.  
  827. tcase << TestAction.new(:clickXY_672_824_5) do
  828. click(672,824)
  829.  
  830. waitsecond(1)
  831. end
  832.  
  833. tcase << TestAction.new(:TextView_Delete_10) do
  834. $ruiObj = RUIObject.new.with('objectid', -15615667).with('selfid', -390800203).with('textdescid', -1373012866).with('uniqueparentid', 0)
  835. .with('uitreeindex', 2)
  836. .with('classname', 'TextView')
  837. .with('resource-id', 'com.google.android.gm:id/delete')
  838. .with('content-desc', 'Delete')
  839.  
  840. $ruiObj.isExist
  841. end
  842.  
  843. tcase << TestAction.new(:scriptAction_8_1_1) do
  844. $myTestResult = checkLastExistResult
  845.  
  846. if $myTestResult == false
  847. $myFailReason = "Email not opened"
  848. end
  849. logStopTest("Gmail_05_01_03_03")
  850. end
  851.  
  852. tcase << TestAction.new(:pressBack_1) do
  853. pressBack
  854. end
  855.  
  856. tcase << TestAction.new(:pressBack_2) do
  857. pressBack
  858. end
  859.  
  860. tcase << TestAction.new(:pressHome_4) do
  861. pressHome
  862.  
  863. waitsecond(2)
  864. end
  865.  
  866. tcase.run(loopTime)
  867.  
  868. end
  869.  
  870. def self.mainLoop(loopTime)
  871.  
  872. WebSocketXServer.setAutoUpdate(false)
  873.  
  874. index = $mainResumeMainLoop
  875. $mainResumeMainLoop = 0
  876.  
  877. writelog("mainLoop::#{index}::Resume") if index > 0
  878.  
  879. while index < loopTime
  880.  
  881. $curMainLoopNum = index
  882.  
  883. $saveLogToGist = false
  884. $POWERLOG = true
  885.  
  886.  
  887. if rand(100) < 0
  888.  
  889. for mode in db('ModemMode')
  890. puts "Change to #{mode}"
  891. if mode == 'LTE'
  892. writelog("Telephony_05_01_01_01_LTE")
  893. change_LTE 1
  894. Telephony_05_01_01_01 60
  895. elsif mode == '3G'
  896. writelog("Telephony_05_01_01_01_3G")
  897. change_3G 1
  898. Telephony_05_01_01_01 20
  899. end
  900.  
  901. end
  902.  
  903. end
  904.  
  905.  
  906.  
  907. if rand(100) < 0
  908.  
  909. for mode in db('ModemMode')
  910. puts "Change to #{mode}"
  911. if mode == 'LTE'
  912. writelog("Telephony_05_01_01_03_LTE")
  913. change_LTE 1
  914. Telephony_05_01_01_03 60
  915. elsif mode == '3G'
  916. writelog("Telephony_05_01_01_03_3G")
  917. change_3G 1
  918. Telephony_05_01_01_03 20
  919. end
  920.  
  921. end
  922.  
  923. end
  924.  
  925.  
  926. $actionParamInput = "none"
  927. Telephony_05_01_01_01 100
  928.  
  929. $actionParamInput = "none"
  930. Telephony_05_01_01_03 100
  931.  
  932. $actionParamInput = "none"
  933. Telephony_05_01_01_05 100
  934.  
  935. $actionParamInput = "none"
  936. Telephony_05_01_01_07 20
  937.  
  938. $actionParamInput = "none"
  939. Telephony_05_01_01_06 20
  940.  
  941.  
  942. if rand(100) < 0
  943.  
  944. for mode in db('ModemMode')
  945. puts "Change to #{mode}"
  946. if mode == 'LTE'
  947. writelog("Messaging_05_01_02_03_LTE")
  948. change_LTE 1
  949. Messaging_05_01_02_03 30
  950. elsif mode == '3G'
  951. writelog("Messaging_05_01_02_03_3G")
  952. change_3G 1
  953. Messaging_05_01_02_03 20
  954. end
  955.  
  956. end
  957.  
  958. end
  959.  
  960.  
  961.  
  962. if rand(100) < 0
  963.  
  964. for mode in db('ModemMode')
  965. puts "Change to #{mode}"
  966. if mode == 'LTE'
  967. writelog("Messaging_05_01_02_05_LTE")
  968. change_LTE 1
  969. Messaging_05_01_02_05 30
  970. elsif mode == '3G'
  971. writelog("Messaging_05_01_02_05_3G")
  972. change_3G 1
  973. Messaging_05_01_02_05 20
  974. end
  975.  
  976. end
  977.  
  978. end
  979.  
  980.  
  981. $actionParamInput = "none"
  982. Messaging_05_01_02_03 50
  983.  
  984. $actionParamInput = "none"
  985. Messaging_05_01_02_05 50
  986.  
  987. $actionParamInput = "none"
  988. Messaging_05_01_02_06 50
  989.  
  990.  
  991. if rand(100) < 0
  992.  
  993. for mode in db('ModemMode')
  994. puts "Change to #{mode}"
  995. if mode == 'LTE'
  996. writelog("Gmail_05_01_03_01_LTE")
  997. change_LTE 1
  998. Gmail_05_01_03_01 30
  999. elsif mode == '3G'
  1000. writelog("Gmail_05_01_03_01_3G")
  1001. change_3G 1
  1002. Gmail_05_01_03_01 20
  1003. end
  1004.  
  1005. end
  1006.  
  1007. end
  1008.  
  1009.  
  1010.  
  1011. if rand(100) < 0
  1012.  
  1013. for mode in db('ModemMode')
  1014. puts "Change to #{mode}"
  1015. if mode == 'LTE'
  1016. writelog("Gmail_05_01_03_02_LTE")
  1017. change_LTE 1
  1018. Gmail_05_01_03_02 30
  1019. elsif mode == '3G'
  1020. writelog("Gmail_05_01_03_02_3G")
  1021. change_3G 1
  1022. Gmail_05_01_03_02 20
  1023. end
  1024.  
  1025. end
  1026.  
  1027. end
  1028.  
  1029.  
  1030. $actionParamInput = "none"
  1031. Gmail_05_01_03_01 50
  1032.  
  1033. $actionParamInput = "none"
  1034. Gmail_05_01_03_02 50
  1035.  
  1036. $actionParamInput = "none"
  1037. Gmail_05_01_03_03 50
  1038.  
  1039.  
  1040. if rand(100) < 0
  1041.  
  1042. for mode in db('ModemMode')
  1043. puts "Change to #{mode}"
  1044. if mode == 'LTE'
  1045. writelog("Browser_05_01_04_01_LTE")
  1046. change_LTE 1
  1047. Browser_05_01_04_01 30
  1048. elsif mode == '3G'
  1049. writelog("Browser_05_01_04_01_3G")
  1050. change_3G 1
  1051. Browser_05_01_04_01 20
  1052. end
  1053.  
  1054. end
  1055.  
  1056. end
  1057.  
  1058.  
  1059.  
  1060. if rand(100) < 0
  1061.  
  1062. for mode in db('ModemMode')
  1063. puts "Change to #{mode}"
  1064. if mode == 'LTE'
  1065. writelog("Browser_05_01_04_02_LTE")
  1066. change_LTE 1
  1067. Browser_05_01_04_02 30
  1068. elsif mode == '3G'
  1069. writelog("Browser_05_01_04_02_3G")
  1070. change_3G 1
  1071. Browser_05_01_04_02 20
  1072. end
  1073.  
  1074. end
  1075.  
  1076. end
  1077.  
  1078.  
  1079.  
  1080. if rand(100) < 0
  1081.  
  1082. for mode in db('ModemMode')
  1083. puts "Change to #{mode}"
  1084. if mode == 'LTE'
  1085. writelog("Browser_05_01_04_03_LTE")
  1086. change_LTE 1
  1087. Browser_05_01_04_03 6
  1088. elsif mode == '3G'
  1089. writelog("Browser_05_01_04_03_3G")
  1090. change_3G 1
  1091. Browser_05_01_04_03 4
  1092. end
  1093.  
  1094. end
  1095.  
  1096. end
  1097.  
  1098.  
  1099. $actionParamInput = "none"
  1100. Browser_05_01_04_01 50
  1101.  
  1102. $actionParamInput = "none"
  1103. Browser_05_01_04_02 50
  1104.  
  1105. $actionParamInput = "none"
  1106. Browser_05_01_04_03 10
  1107.  
  1108. $actionParamInput = "none"
  1109. StoreFrontDownload_05_01_05_01 20
  1110.  
  1111. $actionParamInput = "none"
  1112. StoreFrontDownload_05_01_05_03 10
  1113.  
  1114. $actionParamInput = "none"
  1115. StoreFrontDownload_05_01_05_04 1
  1116.  
  1117. $actionParamInput = "none"
  1118. StoreFrontDownload_05_01_05_06 20
  1119.  
  1120. $actionParamInput = "none"
  1121. StoreFrontDownload_05_01_05_08 1
  1122.  
  1123. $actionParamInput = "none"
  1124. PIM_05_01_06_01 5
  1125.  
  1126. $actionParamInput = "none"
  1127. PIM_05_01_06_02 1
  1128.  
  1129. $actionParamInput = "none"
  1130. PIM_05_01_06_03 5
  1131.  
  1132. $actionParamInput = "none"
  1133. PIM_05_01_06_04 1
  1134.  
  1135. $actionParamInput = "none"
  1136. MultiMedia_05_01_07_01 1
  1137.  
  1138. $actionParamInput = "none"
  1139. MultiMedia_05_01_07_03 1
  1140.  
  1141. $actionParamInput = "none"
  1142. MultiMedia_05_01_07_04 20
  1143.  
  1144. $actionParamInput = "none"
  1145. MultiMedia_05_01_07_05 20
  1146.  
  1147. $actionParamInput = "none"
  1148. MultiMedia_05_01_07_06 20
  1149.  
  1150. $actionParamInput = "none"
  1151. MultiMedia_05_01_07_10 10
  1152.  
  1153. $actionParamInput = "none"
  1154. MultiTasking_05_01_08_01 1
  1155.  
  1156. $actionParamInput = "none"
  1157. MultiTasking_05_01_08_02 50
  1158.  
  1159. $actionParamInput = "none"
  1160. MultiTasking_05_01_08_03 1
  1161.  
  1162. $actionParamInput = "none"
  1163. MultiTasking_05_01_08_04 1
  1164.  
  1165. $actionParamInput = "none"
  1166. MultiTasking_05_01_08_05 50
  1167.  
  1168. $actionParamInput = "none"
  1169. MultiTasking_05_01_08_06 1
  1170.  
  1171. $actionParamInput = "none"
  1172. MenuNavigation_05_01_09_01 1
  1173.  
  1174. $actionParamInput = "none"
  1175. WiFi_05_01_10_01 20
  1176.  
  1177. $actionParamInput = "none"
  1178. WiFi_05_01_10_02 20
  1179.  
  1180. $actionParamInput = "none"
  1181. NFC_05_01_11_01 1
  1182.  
  1183.  
  1184. if rand(100) < 0
  1185.  
  1186. $actionParamInput = "none"
  1187. VideoCall_01 20
  1188.  
  1189. end
  1190.  
  1191.  
  1192. $actionParamInput = "none"
  1193. VideoTelephony_05_01_14_01 50
  1194.  
  1195. $actionParamInput = "none"
  1196. VideoTelephony_05_01_14_02 25
  1197.  
  1198. $actionParamInput = "none"
  1199. VideoTelephony_05_01_14_03 25
  1200.  
  1201. $actionParamInput = "none"
  1202. connectWifi 1
  1203.  
  1204. $actionParamInput = "none"
  1205. VideoTelephony_05_01_14_04 25
  1206.  
  1207. $actionParamInput = "none"
  1208. VideoTelephony_05_01_14_05 25
  1209.  
  1210. $actionParamInput = "none"
  1211. disconnectWifi 1
  1212.  
  1213.  
  1214. if rand(100) < 0
  1215.  
  1216.  
  1217.  
  1218. waitsecond(2)
  1219.  
  1220. end
  1221.  
  1222.  
  1223.  
  1224. sendStatus("Done::mainLoop::Loop::#{index}")
  1225.  
  1226.  
  1227. writelog("Finish::Loop::#{$curMainLoopNum}")
  1228.  
  1229.  
  1230. saveLogFileToGist if $saveLogToGist
  1231.  
  1232. index += 1
  1233.  
  1234. end
  1235.  
  1236. $engineStatus = "Idle"
  1237. resetStatus
  1238. sendStatus("Finish::mainLoop::END")
  1239.  
  1240. end
  1241.  
  1242. def self.MenuNavigation_05_01_09_01(loopTime)
  1243.  
  1244. tcase = TestCase.new("MenuNavigation_05_01_09_01")
  1245.  
  1246. tcase << TestAction.new(:pressHome_1) do
  1247. pressHome
  1248. end
  1249.  
  1250. tcase << TestAction.new(:scriptAction_off) do
  1251. $ignoreDefaultExpHandler = true
  1252.  
  1253. waitsecond(2)
  1254. end
  1255.  
  1256. tcase << TestAction.new(:scriptAction_StartTestLog) do
  1257. logStartTest("05_01_09_01_Menu_Navigation")
  1258.  
  1259.  
  1260. waitsecond(2)
  1261. end
  1262.  
  1263. tcase << TestAction.new(:scriptAction_resetCounter) do
  1264. $appCounter = 0
  1265.  
  1266. waitsecond(2)
  1267. end
  1268.  
  1269. tcase << TestAction.new(:scriptAction_loop) do
  1270.  
  1271. until $appCounter > 31
  1272. $appCounter += 1
  1273. gotoApp(db('NavApp')[$appCounter-1])
  1274. waitsecond(2)
  1275. allow_popup
  1276. waitsecond(2)
  1277. pressHome
  1278. $ruiObj = RUIObject.new.with('objectid', -1351376744).with('selfid', -1318451484).with('textdescid', -1794026948).with('uniqueparentid', 0)
  1279. .with('uitreeindex', 1)
  1280. .with('classname', 'Button')
  1281. .with('resource-id', 'android:id/button1')
  1282. .with('text', 'OK')
  1283.  
  1284. $ruiObj.click
  1285. end
  1286.  
  1287. waitsecond(2)
  1288. end
  1289.  
  1290. tcase << TestAction.new(:scriptAction_StopLogTest) do
  1291. if $appCounter == 26
  1292. $myTestResult = true
  1293. else
  1294. $myTestRsult = false
  1295. $myFailReason = "Failed"
  1296. end
  1297. logStopTest("05_01_09_01_Menu_Navigation")
  1298.  
  1299. waitsecond(2)
  1300. end
  1301.  
  1302. tcase.run(loopTime)
  1303.  
  1304. end
  1305.  
  1306. def self.Messaging_05_01_02_03(loopTime)
  1307.  
  1308. tcase = TestCase.new("Messaging_05_01_02_03")
  1309.  
  1310. tcase << TestAction.new(:scriptAction_28) do
  1311. logStartTest("Messaging_05_01_02_03")
  1312. end
  1313.  
  1314. tcase << TestAction.new(:gotoApp_2) do
  1315. gotoApp('Messaging')
  1316.  
  1317. waitsecond(1)
  1318. end
  1319.  
  1320. tcase << TestAction.new(:Button_Button1_2) do
  1321. $ruiObj = RUIObject.new.with('objectid', -1004548822).with('selfid', 2077686463).with('textdescid', 307253103).with('uniqueparentid', 0).with('classresourceid', 1834539358)
  1322. .with('uitreeindex', 4)
  1323. .with('classname', 'Button')
  1324. .with('resource-id', 'android:id/button1')
  1325. .with('text', 'YES')
  1326.  
  1327. $ruiObj.click
  1328.  
  1329. waitsecond(2)
  1330. end
  1331.  
  1332. tcase << TestAction.new(:ComposeNewMessage) do
  1333. $tmusComposeButton = RUIObject.new.with('objectid', -547009504).with('selfid', 1638137891).with('textdescid', 1140939687).with('uniqueparentid', 0)
  1334. .with('uitreeindex', 5)
  1335. .with('classname', 'ImageView')
  1336. .with('resource-id', 'com.android.mms:id/fab_img')
  1337. .with('content-desc', 'New message')
  1338.  
  1339. $vzwComposeButton = RUIObject.new.with('objectid', 2129085589).with('selfid', 468961841).with('textdescid', -293661237).with('uniqueparentid', 0)
  1340. .with('uitreeindex', 5)
  1341. .with('classname', 'ImageView')
  1342. .with('resource-id', 'com.android.mms:id/img1')
  1343. .with('content-desc', 'Compose button')
  1344.  
  1345. if $tmusComposeButton.isExist
  1346. $tmusComposeButton.click
  1347. elsif $vzwComposeButton.isExist
  1348. $vzwComposeButton.click
  1349. end
  1350.  
  1351. waitsecond(2)
  1352. end
  1353.  
  1354. tcase << TestAction.new(:MultiAutoCompleteTextView_2) do
  1355. $ruiObj = RUIObject.new.with('objectid', -2030797265).with('selfid', -1346021293).with('textdescid', 1469794257).with('uniqueparentid', 0).with('classresourceid', -1346021293)
  1356. .with('uitreeindex', 0)
  1357. .with('classname', 'MultiAutoCompleteTextView')
  1358.  
  1359. $ruiObj.inputtext('A01 a01')
  1360.  
  1361. waitsecond(1)
  1362. end
  1363.  
  1364. tcase << TestAction.new(:clickXY_110_182_6) do
  1365. click(110,182)
  1366.  
  1367. waitsecond(1)
  1368. end
  1369.  
  1370. tcase << TestAction.new(:EditText_Enter_8) do
  1371. $ruiObj = RUIObject.new.with('objectid', -1637280020).with('selfid', -454502120).with('textdescid', -1217933909).with('uniqueparentid', 0).with('classresourceid', 1666676343)
  1372. .with('uitreeindex', 5)
  1373. .with('classname', 'EditText')
  1374. .with('content-desc', 'Enter message')
  1375.  
  1376. $ruiObj.click
  1377.  
  1378. waitsecond(1)
  1379. end
  1380.  
  1381. tcase << TestAction.new(:scriptAction_141_1) do
  1382. $ruiObj.inputtext('Abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzaaaaaaaaaabbbbbbbbbbcccccccccc')
  1383.  
  1384. waitsecond(4)
  1385. end
  1386.  
  1387. tcase << TestAction.new(:SendButton) do
  1388. $tmusSendButton = RUIObject.new.with('objectid', 353843972).with('selfid', 742186862).with('textdescid', -1914765924).with('uniqueparentid', 0)
  1389. .with('uitreeindex', 8)
  1390. .with('classname', 'Button')
  1391. .with('resource-id', 'com.android.mms:id/send_button_text')
  1392. .with('content-desc', 'Send')
  1393. .with('text', 'Send')
  1394.  
  1395. $vzwSendButton = RUIObject.new.with('objectid', 1247717607).with('selfid', -817858366).with('textdescid', -1713609473).with('uniqueparentid', 0)
  1396. .with('uitreeindex', 8)
  1397. .with('classname', 'Button')
  1398. .with('resource-id', 'com.android.mms:id/send_button')
  1399. .with('text', 'Send')
  1400.  
  1401. if $tmusSendButton.isExist
  1402. $tmusSendButton.click
  1403. elsif $vzwSendButton.isExist
  1404. $vzwSendButton.click
  1405. end
  1406.  
  1407. waitsecond(2)
  1408. end
  1409.  
  1410. tcase << TestAction.new(:pressBack_5) do
  1411. pressBack
  1412. end
  1413.  
  1414. tcase << TestAction.new(:pressBack_6) do
  1415. pressBack
  1416. end
  1417.  
  1418. tcase << TestAction.new(:clickXY_164_208_12) do
  1419. click(164,208)
  1420.  
  1421. waitsecond(1)
  1422. end
  1423.  
  1424. tcase << TestAction.new(:TextView_TimestampView_2) do
  1425. $ruiObj = RUIObject.new.with('objectid', 780859453).with('selfid', -108293667).with('textdescid', -1097305943).with('uniqueparentid', 0).with('classresourceid', 1659956455)
  1426. .with('uitreeindex', 8)
  1427. .with('classname', 'TextView')
  1428. .with('resource-id', 'com.android.mms:id/timestamp_view')
  1429. .with('text', 'Sending')
  1430.  
  1431. $ruiObj.isNotExist
  1432. end
  1433.  
  1434. tcase << TestAction.new(:TextView_Delete_6) do
  1435. $ruiObj = RUIObject.new.with('objectid', -1337172653).with('selfid', 1644806947).with('textdescid', -2074083528).with('uniqueparentid', 0)
  1436. .with('uitreeindex', 4)
  1437. .with('classname', 'TextView')
  1438. .with('content-desc', 'Delete')
  1439.  
  1440. $ruiObj.click
  1441.  
  1442. waitsecond(1)
  1443. end
  1444.  
  1445. tcase << TestAction.new(:TextView_Title_2) do
  1446. $ruiObj = RUIObject.new.with('objectid', 930093027).with('selfid', -1054998202).with('textdescid', 908714598).with('uniqueparentid', 0)
  1447. .with('uitreeindex', 1)
  1448. .with('classname', 'TextView')
  1449. .with('resource-id', 'com.android.mms:id/title')
  1450. .with('text', 'Select all')
  1451.  
  1452. $ruiObj.click
  1453. end
  1454.  
  1455. tcase << TestAction.new(:Button_Button1_7) do
  1456. $ruiObj = RUIObject.new.with('objectid', -1505530336).with('selfid', 982364851).with('textdescid', 652125653).with('uniqueparentid', 0)
  1457. .with('uitreeindex', 2)
  1458. .with('classname', 'Button')
  1459. .with('resource-id', 'android:id/button1')
  1460. .with('text', 'DELETE')
  1461.  
  1462. $ruiObj.click
  1463.  
  1464. waitsecond(2)
  1465. end
  1466.  
  1467. tcase << TestAction.new(:Button_Button1_18) do
  1468. $ruiObj = RUIObject.new.with('objectid', -1505530336).with('selfid', 2077687487).with('textdescid', -1187425223).with('uniqueparentid', 0)
  1469. .with('uitreeindex', 3)
  1470. .with('classname', 'Button')
  1471. .with('resource-id', 'android:id/button1')
  1472. .with('text', 'Yes')
  1473.  
  1474. $ruiObj.click
  1475.  
  1476. waitsecond(1)
  1477. end
  1478.  
  1479. tcase << TestAction.new(:scriptAction_30) do
  1480. $myTestResult = checkLastExistResult
  1481.  
  1482. if $myTestResult == false
  1483. $myFailReason = "Message not sent"
  1484. end
  1485. logStopTest("Messaging_05_01_02_03")
  1486. end
  1487.  
  1488. tcase << TestAction.new(:pressBack_53) do
  1489. pressBack
  1490.  
  1491. waitsecond(1)
  1492. end
  1493.  
  1494. tcase << TestAction.new(:pressBack_26) do
  1495. pressBack
  1496.  
  1497. waitsecond(1)
  1498. end
  1499.  
  1500. tcase.run(loopTime)
  1501.  
  1502. end
  1503.  
  1504. def self.Messaging_05_01_02_05(loopTime)
  1505.  
  1506. tcase = TestCase.new("Messaging_05_01_02_05")
  1507.  
  1508. tcase << TestAction.new(:scriptAction_28) do
  1509. logStartTest("Messaging_05_01_02_05")
  1510. end
  1511.  
  1512. tcase << TestAction.new(:gotoApp_2) do
  1513. gotoApp('Messaging')
  1514.  
  1515. waitsecond(1)
  1516. end
  1517.  
  1518. tcase << TestAction.new(:ComposeNewMessage_1) do
  1519. $tmusComposeButton = RUIObject.new.with('objectid', -547009504).with('selfid', 1638137891).with('textdescid', 1140939687).with('uniqueparentid', 0)
  1520. .with('uitreeindex', 5)
  1521. .with('classname', 'ImageView')
  1522. .with('resource-id', 'com.android.mms:id/fab_img')
  1523. .with('content-desc', 'New message')
  1524.  
  1525. $vzwComposeButton = RUIObject.new.with('objectid', 2129085589).with('selfid', 468961841).with('textdescid', -293661237).with('uniqueparentid', 0)
  1526. .with('uitreeindex', 5)
  1527. .with('classname', 'ImageView')
  1528. .with('resource-id', 'com.android.mms:id/img1')
  1529. .with('content-desc', 'Compose button')
  1530.  
  1531. if $tmusComposeButton.isExist
  1532. $tmusComposeButton.click
  1533. elsif $vzwComposeButton.isExist
  1534. $vzwComposeButton.click
  1535. end
  1536.  
  1537. waitsecond(2)
  1538. end
  1539.  
  1540. tcase << TestAction.new(:MultiAutoCompleteTextView_2) do
  1541. $ruiObj = RUIObject.new.with('objectid', -2030797265).with('selfid', -1346021293).with('textdescid', 1469794257).with('uniqueparentid', 0).with('classresourceid', -1346021293)
  1542. .with('uitreeindex', 0)
  1543. .with('classname', 'MultiAutoCompleteTextView')
  1544.  
  1545. $ruiObj.inputtext('A01 a01')
  1546.  
  1547. waitsecond(1)
  1548. end
  1549.  
  1550. tcase << TestAction.new(:clickXY_88_174_6) do
  1551. click(88,174)
  1552.  
  1553. waitsecond(1)
  1554. end
  1555.  
  1556. tcase << TestAction.new(:EditText_Enter_2) do
  1557. $ruiObj = RUIObject.new.with('objectid', -1677830865).with('selfid', -454502120).with('textdescid', 724968942).with('uniqueparentid', 0).with('classresourceid', 1666676343)
  1558. .with('uitreeindex', 9)
  1559. .with('classname', 'EditText')
  1560. .with('content-desc', 'Enter message')
  1561.  
  1562. $ruiObj.click
  1563.  
  1564. waitsecond(1)
  1565. end
  1566.  
  1567. tcase << TestAction.new(:scriptAction_141_1) do
  1568. $ruiObj.inputtext('Abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzaaaaaaaaaabbbbbbbbbbcccccccccc')
  1569.  
  1570. waitsecond(4)
  1571. end
  1572.  
  1573. tcase << TestAction.new(:AttachButton) do
  1574. $tmusAttachButton = RUIObject.new.with('objectid', 874172794).with('selfid', -1211001229).with('textdescid', -704319221).with('uniqueparentid', 0)
  1575. .with('uitreeindex', 6)
  1576. .with('classname', 'ImageButton')
  1577. .with('resource-id', 'com.android.mms:id/attachButton_right')
  1578. .with('content-desc', 'Attach')
  1579.  
  1580. $vzwAttachButton = RUIObject.new.with('objectid', 1000615746).with('selfid', -876235136).with('textdescid', -1072393149).with('uniqueparentid', 0)
  1581. .with('uitreeindex', 5)
  1582. .with('classname', 'ImageButton')
  1583. .with('resource-id', 'com.android.mms:id/attachButton_left')
  1584. .with('content-desc', 'Attach')
  1585.  
  1586. if $tmusAttachButton.isExist
  1587. $tmusAttachButton.click
  1588. elsif $vzwAttachButton.isExist
  1589. $vzwAttachButton.click
  1590. end
  1591.  
  1592. waitsecond(2)
  1593. end
  1594.  
  1595. tcase << TestAction.new(:Video) do
  1596. $ruiObj = RUIObject.new.with('objectid', -1141961992).with('selfid', -465694566).with('textdescid', -1041083352).with('uniqueparentid', 0)
  1597. .with('uitreeindex', 5)
  1598. .with('pretext', 'Take photo')
  1599. .with('classname', 'ImageView')
  1600. .with('resource-id', 'com.android.mms:id/icon')
  1601.  
  1602. $ruiObj.click
  1603.  
  1604. waitsecond(8)
  1605. end
  1606.  
  1607. tcase << TestAction.new(:Button_PermissionAllowButton_6) do
  1608. $ruiObj = RUIObject.new.with('objectid', -886457929).with('selfid', 1443382411).with('textdescid', 270556320).with('uniqueparentid', 0)
  1609. .with('uitreeindex', 3)
  1610. .with('classname', 'Button')
  1611. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  1612. .with('text', 'ALLOW')
  1613.  
  1614. $ruiObj.click
  1615.  
  1616. waitsecond(1)
  1617. end
  1618.  
  1619. tcase << TestAction.new(:ImageButton_Show_6) do
  1620. $ruiObj = RUIObject.new.with('objectid', 1571666208).with('selfid', -929198491).with('textdescid', 2010273934).with('uniqueparentid', 0)
  1621. .with('uitreeindex', 0)
  1622. .with('classname', 'ImageButton')
  1623. .with('content-desc', 'Show roots')
  1624.  
  1625. $ruiObj.click
  1626.  
  1627. waitsecond(2)
  1628. end
  1629.  
  1630. tcase << TestAction.new(:TextView_Title_8) do
  1631. $ruiObj = RUIObject.new.with('objectid', -1941383373).with('selfid', 4082754).with('textdescid', 50769842).with('uniqueparentid', 0).with('classresourceid', 490183159)
  1632. .with('uitreeindex', 30)
  1633. .with('classname', 'TextView')
  1634. .with('resource-id', 'android:id/title')
  1635. .with('text', 'Photos')
  1636.  
  1637. $ruiObj.click
  1638.  
  1639. waitsecond(2)
  1640. end
  1641.  
  1642. tcase << TestAction.new(:Button_PermissionAllowButton_10) do
  1643. $ruiObj = RUIObject.new.with('objectid', -886457929).with('selfid', 1443382411).with('textdescid', 270556320).with('uniqueparentid', 0)
  1644. .with('uitreeindex', 3)
  1645. .with('classname', 'Button')
  1646. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  1647. .with('text', 'ALLOW')
  1648.  
  1649. $ruiObj.click
  1650.  
  1651. waitsecond(2)
  1652. end
  1653.  
  1654. tcase << TestAction.new(:TextView_Title_24) do
  1655. $ruiObj = RUIObject.new.with('objectid', -2074516409).with('selfid', 1224707480).with('textdescid', 1793532939).with('uniqueparentid', 0)
  1656. .with('uitreeindex', 4)
  1657. .with('classname', 'TextView')
  1658. .with('resource-id', 'com.google.android.apps.photos:id/title')
  1659. .with('text', '10M')
  1660.  
  1661. $ruiObj.click
  1662.  
  1663. waitsecond(2)
  1664. end
  1665.  
  1666. tcase << TestAction.new(:clickXY_232_736_16) do
  1667. click(232,736)
  1668.  
  1669. waitsecond(2)
  1670. end
  1671.  
  1672. tcase << TestAction.new(:TrimAndSave) do
  1673. $reduceButton = RUIObject.new.with('objectid', -1505530336).with('selfid', 1382949486).with('textdescid', 185347450).with('uniqueparentid', 0)
  1674. .with('uitreeindex', 3)
  1675. .with('classname', 'Button')
  1676. .with('resource-id', 'android:id/button1')
  1677. .with('text', 'REDUCE')
  1678.  
  1679. if $reduceButton.isExist
  1680. $reduceButton.click
  1681.  
  1682. waitsecond(1)
  1683.  
  1684. RUIObject.new.with('objectid', -886457929).with('selfid', 1443382411).with('textdescid', 270556320).with('uniqueparentid', 0)
  1685. .with('uitreeindex', 3)
  1686. .with('classname', 'Button')
  1687. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  1688. .with('text', 'ALLOW').click
  1689.  
  1690. waitsecond(1)
  1691.  
  1692. RUIObject.new.with('objectid', -2139312908).with('selfid', 893316343).with('textdescid', -1979207657).with('uniqueparentid', 0)
  1693. .with('uitreeindex', 28)
  1694. .with('classname', 'Button')
  1695. .with('resource-id', 'com.lge.videostudio:id/trim_area_save')
  1696. .with('text', 'SAVE').click
  1697.  
  1698. end
  1699.  
  1700. waitsecond(2)
  1701. end
  1702.  
  1703. tcase << TestAction.new(:Button_TrimAreaSave_4) do
  1704. $ruiObj = RUIObject.new.with('objectid', -1223836307).with('selfid', 892882684).with('textdescid', 865181803).with('uniqueparentid', 0)
  1705. .with('uitreeindex', 31)
  1706. .with('classname', 'Button')
  1707. .with('resource-id', 'com.lge.videostudio:id/trim_area_save')
  1708. .with('text', 'DONE')
  1709.  
  1710. $ruiObj.click
  1711.  
  1712. waitsecond(2)
  1713. end
  1714.  
  1715. tcase << TestAction.new(:Button_SendButtonText_6) do
  1716. $ruiObj = RUIObject.new.with('objectid', -1452330871).with('selfid', 742186862).with('textdescid', -1346972937).with('uniqueparentid', 0)
  1717. .with('uitreeindex', 11)
  1718. .with('classname', 'Button')
  1719. .with('resource-id', 'com.android.mms:id/send_button_text')
  1720. .with('content-desc', 'Send')
  1721. .with('text', 'Send')
  1722.  
  1723. $ruiObj.click
  1724.  
  1725. waitsecond(2)
  1726. end
  1727.  
  1728. tcase << TestAction.new(:pressBack_8) do
  1729. pressBack
  1730.  
  1731. waitsecond(2)
  1732. end
  1733.  
  1734. tcase << TestAction.new(:pressBack_10) do
  1735. pressBack
  1736.  
  1737. waitsecond(2)
  1738. end
  1739.  
  1740. tcase << TestAction.new(:clickXY_166_220_5) do
  1741. click(166,220)
  1742.  
  1743. waitsecond(1)
  1744. end
  1745.  
  1746. tcase << TestAction.new(:LinearLayout_StatusIcons_10) do
  1747. $ruiObj = RUIObject.new.with('objectid', 84459867).with('selfid', 906570047).with('textdescid', -1676711387).with('uniqueparentid', 0).with('classresourceid', 1331229891)
  1748. .with('classname', 'LinearLayout')
  1749. .with('resource-id', 'com.android.mms:id/status_icons')
  1750.  
  1751. $ruiObj.isNotExist
  1752.  
  1753. waitsecond(1)
  1754. end
  1755.  
  1756. tcase << TestAction.new(:TextView_Delete_12) do
  1757. $ruiObj = RUIObject.new.with('objectid', -1337172653).with('selfid', 1644806947).with('textdescid', -2074083528).with('uniqueparentid', 0)
  1758. .with('uitreeindex', 4)
  1759. .with('classname', 'TextView')
  1760. .with('content-desc', 'Delete')
  1761.  
  1762. $ruiObj.click
  1763.  
  1764. waitsecond(1)
  1765. end
  1766.  
  1767. tcase << TestAction.new(:Button_Button1_12) do
  1768. $ruiObj = RUIObject.new.with('objectid', -1505530336).with('selfid', 982364851).with('textdescid', 652125653).with('uniqueparentid', 0)
  1769. .with('uitreeindex', 2)
  1770. .with('classname', 'Button')
  1771. .with('resource-id', 'android:id/button1')
  1772. .with('text', 'DELETE')
  1773.  
  1774. $ruiObj.click
  1775.  
  1776. waitsecond(2)
  1777. end
  1778.  
  1779. tcase << TestAction.new(:scriptAction_30_1) do
  1780. $myTestResult = checkLastExistResult
  1781.  
  1782. if $myTestResult == false
  1783. $myFailReason = "Message not sent"
  1784. end
  1785. logStopTest("Messaging_05_01_02_05")
  1786. end
  1787.  
  1788. tcase << TestAction.new(:pressBack_53) do
  1789. pressBack
  1790. end
  1791.  
  1792. tcase << TestAction.new(:pressBack_26) do
  1793. pressBack
  1794. end
  1795.  
  1796. tcase << TestAction.new(:pressHome_12) do
  1797. pressHome
  1798. end
  1799.  
  1800. tcase.run(loopTime)
  1801.  
  1802. end
  1803.  
  1804. def self.Messaging_05_01_02_06(loopTime)
  1805.  
  1806. tcase = TestCase.new("Messaging_05_01_02_06")
  1807.  
  1808. tcase << TestAction.new(:scriptAction_28) do
  1809. logStartTest("Messaging_05_01_02_06")
  1810. end
  1811.  
  1812. tcase << TestAction.new(:gotoApp_2) do
  1813. gotoApp('Messaging')
  1814.  
  1815. waitsecond(1)
  1816. end
  1817.  
  1818. tcase << TestAction.new(:ComposeNewMessage_1_1) do
  1819. $tmusComposeButton = RUIObject.new.with('objectid', -547009504).with('selfid', 1638137891).with('textdescid', 1140939687).with('uniqueparentid', 0)
  1820. .with('uitreeindex', 5)
  1821. .with('classname', 'ImageView')
  1822. .with('resource-id', 'com.android.mms:id/fab_img')
  1823. .with('content-desc', 'New message')
  1824.  
  1825. $vzwComposeButton = RUIObject.new.with('objectid', 2129085589).with('selfid', 468961841).with('textdescid', -293661237).with('uniqueparentid', 0)
  1826. .with('uitreeindex', 5)
  1827. .with('classname', 'ImageView')
  1828. .with('resource-id', 'com.android.mms:id/img1')
  1829. .with('content-desc', 'Compose button')
  1830.  
  1831. if $tmusComposeButton.isExist
  1832. $tmusComposeButton.click
  1833. elsif $vzwComposeButton.isExist
  1834. $vzwComposeButton.click
  1835. end
  1836.  
  1837. waitsecond(2)
  1838. end
  1839.  
  1840. tcase << TestAction.new(:MultiAutoCompleteTextView_2) do
  1841. $ruiObj = RUIObject.new.with('objectid', -2030797265).with('selfid', -1346021293).with('textdescid', 1469794257).with('uniqueparentid', 0).with('classresourceid', -1346021293)
  1842. .with('uitreeindex', 0)
  1843. .with('classname', 'MultiAutoCompleteTextView')
  1844.  
  1845. $ruiObj.inputtext('A01 a01')
  1846.  
  1847. waitsecond(1)
  1848. end
  1849.  
  1850. tcase << TestAction.new(:clickXY_92_192_6) do
  1851. click(92,192)
  1852.  
  1853. waitsecond(1)
  1854. end
  1855.  
  1856. tcase << TestAction.new(:EditText_Enter_8) do
  1857. $ruiObj = RUIObject.new.with('objectid', -1637280020).with('selfid', -454502120).with('textdescid', -1217933909).with('uniqueparentid', 0).with('classresourceid', 1666676343)
  1858. .with('uitreeindex', 5)
  1859. .with('classname', 'EditText')
  1860. .with('content-desc', 'Enter message')
  1861.  
  1862. $ruiObj.click
  1863.  
  1864. waitsecond(1)
  1865. end
  1866.  
  1867. tcase << TestAction.new(:scriptAction_141_1) do
  1868. $ruiObj.inputtext('Abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzaaaaaaaaaabbbbbbbbbbcccccccccc')
  1869.  
  1870. waitsecond(1)
  1871. end
  1872.  
  1873. tcase << TestAction.new(:AttachButton_1) do
  1874. $tmusAttachButton = RUIObject.new.with('objectid', 874172794).with('selfid', -1211001229).with('textdescid', -704319221).with('uniqueparentid', 0)
  1875. .with('uitreeindex', 6)
  1876. .with('classname', 'ImageButton')
  1877. .with('resource-id', 'com.android.mms:id/attachButton_right')
  1878. .with('content-desc', 'Attach')
  1879.  
  1880. $vzwAttachButton = RUIObject.new.with('objectid', 1000615746).with('selfid', -876235136).with('textdescid', -1072393149).with('uniqueparentid', 0)
  1881. .with('uitreeindex', 5)
  1882. .with('classname', 'ImageButton')
  1883. .with('resource-id', 'com.android.mms:id/attachButton_left')
  1884. .with('content-desc', 'Attach')
  1885.  
  1886. if $tmusAttachButton.isExist
  1887. $tmusAttachButton.click
  1888. elsif $vzwAttachButton.isExist
  1889. $vzwAttachButton.click
  1890. end
  1891.  
  1892. waitsecond(2)
  1893. end
  1894.  
  1895. tcase << TestAction.new(:ImageView_Icon_2) do
  1896. $ruiObj = RUIObject.new.with('objectid', -1141961992).with('selfid', -465694566).with('textdescid', -1041083352).with('uniqueparentid', 0)
  1897. .with('uitreeindex', 1)
  1898. .with('pretext', 'Attach')
  1899. .with('classname', 'ImageView')
  1900. .with('resource-id', 'com.android.mms:id/icon')
  1901.  
  1902. $ruiObj.click
  1903.  
  1904. waitsecond(4)
  1905. end
  1906.  
  1907. tcase << TestAction.new(:Button_PermissionAllowButton_6) do
  1908. $ruiObj = RUIObject.new.with('objectid', 973397371).with('selfid', 1444367499).with('textdescid', -1740624804).with('uniqueparentid', 0)
  1909. .with('uitreeindex', 3)
  1910. .with('classname', 'Button')
  1911. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  1912. .with('text', 'Allow')
  1913.  
  1914. $ruiObj.click
  1915. end
  1916.  
  1917. tcase << TestAction.new(:ImageButton_Show_6) do
  1918. $ruiObj = RUIObject.new.with('objectid', -1807230859).with('selfid', -929198491).with('textdescid', 629574489).with('uniqueparentid', 0)
  1919. .with('uitreeindex', 0)
  1920. .with('classname', 'ImageButton')
  1921. .with('content-desc', 'Show roots')
  1922.  
  1923. $ruiObj.click
  1924.  
  1925. waitsecond(1)
  1926. end
  1927.  
  1928. tcase << TestAction.new(:TextView_Title_3) do
  1929. $ruiObj = RUIObject.new.with('objectid', -1941383373).with('selfid', 4082754).with('textdescid', 50769842).with('uniqueparentid', 0).with('classresourceid', 490183159)
  1930. .with('uitreeindex', 44)
  1931. .with('classname', 'TextView')
  1932. .with('resource-id', 'android:id/title')
  1933. .with('text', 'Photos')
  1934.  
  1935. $ruiObj.click
  1936.  
  1937. waitsecond(2)
  1938. end
  1939.  
  1940. tcase << TestAction.new(:TextView_Title_5) do
  1941. $ruiObj = RUIObject.new.with('objectid', -2074516409).with('selfid', -1484513934).with('textdescid', 889140747).with('uniqueparentid', 0)
  1942. .with('uitreeindex', 10)
  1943. .with('classname', 'TextView')
  1944. .with('resource-id', 'com.google.android.apps.photos:id/title')
  1945. .with('text', '1M')
  1946.  
  1947. $ruiObj.click
  1948.  
  1949. waitsecond(2)
  1950. end
  1951.  
  1952. tcase << TestAction.new(:clickXY_248_752_9) do
  1953. click(248,752)
  1954.  
  1955. waitsecond(2)
  1956. end
  1957.  
  1958. tcase << TestAction.new(:TextView_DoneButton_2) do
  1959. $ruiObj = RUIObject.new.with('objectid', -958387193).with('selfid', -885365197).with('textdescid', 1900114073).with('uniqueparentid', 0)
  1960. .with('uitreeindex', 11)
  1961. .with('classname', 'TextView')
  1962. .with('resource-id', 'com.google.android.apps.photos:id/done_button')
  1963. .with('content-desc', 'Done')
  1964. .with('text', 'DONE')
  1965.  
  1966. $ruiObj.click
  1967.  
  1968. waitsecond(2)
  1969. end
  1970.  
  1971. tcase << TestAction.new(:SendButton_1_1) do
  1972. $tmusSendButton = RUIObject.new.with('objectid', 353843972).with('selfid', 742186862).with('textdescid', -1914765924).with('uniqueparentid', 0)
  1973. .with('uitreeindex', 8)
  1974. .with('classname', 'Button')
  1975. .with('resource-id', 'com.android.mms:id/send_button_text')
  1976. .with('content-desc', 'Send')
  1977. .with('text', 'Send')
  1978.  
  1979. $vzwSendButton = RUIObject.new.with('objectid', 1247717607).with('selfid', -817858366).with('textdescid', -1713609473).with('uniqueparentid', 0)
  1980. .with('uitreeindex', 8)
  1981. .with('classname', 'Button')
  1982. .with('resource-id', 'com.android.mms:id/send_button')
  1983. .with('text', 'Send')
  1984.  
  1985. if $tmusSendButton.isExist
  1986. $tmusSendButton.click
  1987. elsif $vzwSendButton.isExist
  1988. $vzwSendButton.click
  1989. end
  1990.  
  1991. waitsecond(4)
  1992. end
  1993.  
  1994. tcase << TestAction.new(:pressBack_5) do
  1995. pressBack
  1996. end
  1997.  
  1998. tcase << TestAction.new(:pressBack_6) do
  1999. pressBack
  2000. end
  2001.  
  2002. tcase << TestAction.new(:clickXY_158_230_12) do
  2003. click(158,230)
  2004.  
  2005. waitsecond(1)
  2006. end
  2007.  
  2008. tcase << TestAction.new(:ProgressBar_Progressbar_6) do
  2009. $ruiObj = RUIObject.new.with('objectid', -1692373424).with('selfid', 1538496395).with('textdescid', -923968560).with('uniqueparentid', 0).with('classresourceid', 225978681)
  2010. .with('uitreeindex', 10)
  2011. .with('classname', 'ProgressBar')
  2012. .with('resource-id', 'com.android.mms:id/progressbar')
  2013.  
  2014. $ruiObj.isNotExist
  2015. end
  2016.  
  2017. tcase << TestAction.new(:TextView_Delete_8) do
  2018. $ruiObj = RUIObject.new.with('objectid', -1337172653).with('selfid', 1644806947).with('textdescid', -2074083528).with('uniqueparentid', 0)
  2019. .with('uitreeindex', 4)
  2020. .with('classname', 'TextView')
  2021. .with('content-desc', 'Delete')
  2022.  
  2023. $ruiObj.click
  2024.  
  2025. waitsecond(1)
  2026. end
  2027.  
  2028. tcase << TestAction.new(:Button_Button1_4) do
  2029. $ruiObj = RUIObject.new.with('objectid', 72365522).with('selfid', 982364851).with('textdescid', 46766983).with('uniqueparentid', 0).with('classresourceid', 1834539358)
  2030. .with('uitreeindex', 2)
  2031. .with('classname', 'Button')
  2032. .with('resource-id', 'android:id/button1')
  2033. .with('text', 'DELETE')
  2034.  
  2035. $ruiObj.click
  2036.  
  2037. waitsecond(2)
  2038. end
  2039.  
  2040. tcase << TestAction.new(:scriptAction_30_1) do
  2041. $myTestResult = checkLastExistResult
  2042.  
  2043. if $myTestResult == false
  2044. $myFailReason = "End button not found"
  2045. end
  2046. logStopTest("Messaging_05_01_02_06")
  2047. end
  2048.  
  2049. tcase << TestAction.new(:pressBack_53) do
  2050. pressBack
  2051. end
  2052.  
  2053. tcase << TestAction.new(:pressBack_26) do
  2054. pressBack
  2055. end
  2056.  
  2057. tcase << TestAction.new(:pressHome_6) do
  2058. pressHome
  2059. end
  2060.  
  2061. tcase.run(loopTime)
  2062.  
  2063. end
  2064.  
  2065. def self.MultiMedia_05_01_07_01(loopTime)
  2066.  
  2067. tcase = TestCase.new("MultiMedia_05_01_07_01")
  2068.  
  2069. tcase << TestAction.new(:scriptAction_1) do
  2070. logStartTest("05_01_07_01_MultiMedia")
  2071. end
  2072.  
  2073. tcase << TestAction.new(:gotoApp_1) do
  2074. gotoApp('Camera')
  2075. end
  2076.  
  2077. tcase << TestAction.new(:Button_CancelButton_23) do
  2078. $ruiObj = RUIObject.new.with('objectid', 2138780457).with('selfid', 765132311).with('textdescid', -782727157).with('uniqueparentid', 0)
  2079. .with('uitreeindex', 3)
  2080. .with('classname', 'Button')
  2081. .with('resource-id', 'com.lge.camera:id/cancel_button')
  2082. .with('text', 'LATER')
  2083.  
  2084. $ruiObj.click
  2085.  
  2086. waitsecond(2)
  2087. end
  2088.  
  2089. tcase << TestAction.new(:Button_PermissionAllowButton_4) do
  2090. $ruiObj = RUIObject.new.with('objectid', 973397371).with('selfid', 1444367499).with('textdescid', -1740624804).with('uniqueparentid', 0)
  2091. .with('uitreeindex', 3)
  2092. .with('classname', 'Button')
  2093. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  2094. .with('text', 'Allow')
  2095.  
  2096. $ruiObj.click
  2097.  
  2098. waitsecond(1)
  2099. end
  2100.  
  2101. tcase << TestAction.new(:Button_CancelButton_2) do
  2102. $ruiObj = RUIObject.new.with('objectid', -1613946387).with('selfid', -1673499114).with('textdescid', -814734932).with('uniqueparentid', 0)
  2103. .with('uitreeindex', 3)
  2104. .with('classname', 'Button')
  2105. .with('resource-id', 'com.lge.camera:id/cancel_button')
  2106. .with('text', 'No')
  2107.  
  2108. $ruiObj.click
  2109.  
  2110. waitsecond(1)
  2111. end
  2112.  
  2113. tcase << TestAction.new(:ImageView_Thumbnail_2) do
  2114. $ruiObj = RUIObject.new.with('objectid', -2123601541).with('selfid', -135259702).with('textdescid', 357252685).with('uniqueparentid', 0)
  2115. .with('uitreeindex', 17)
  2116. .with('classname', 'ImageView')
  2117. .with('resource-id', 'com.lge.camera:id/thumbnail')
  2118. .with('content-desc', 'Gallery')
  2119.  
  2120. $ruiObj.isNotExist
  2121. ifFailJumpTo(:shutter)
  2122.  
  2123. waitsecond(1)
  2124. end
  2125.  
  2126. tcase << TestAction.new(:ImageButton_QuickButtonCleanView_2) do
  2127. $ruiObj = RUIObject.new.with('objectid', 579583575).with('selfid', -1659256094).with('textdescid', -1654112402).with('uniqueparentid', 0)
  2128. .with('uitreeindex', 1)
  2129. .with('classname', 'ImageButton')
  2130. .with('resource-id', 'com.lge.camera:id/quick_button_clean_view')
  2131. .with('content-desc', 'View')
  2132.  
  2133. $ruiObj.click
  2134.  
  2135. waitsecond(1)
  2136. end
  2137.  
  2138. tcase << TestAction.new(:shutter) do
  2139. $ruiObj = RUIObject.new.with('objectid', -1799776401).with('selfid', -1818636331).with('textdescid', -839551902).with('uniqueparentid', 0)
  2140. .with('uitreeindex', 13)
  2141. .with('classname', 'ImageButton')
  2142. .with('resource-id', 'com.lge.camera:id/shutter_top_comp')
  2143. .with('content-desc', 'Start recording')
  2144.  
  2145. $ruiObj.click
  2146.  
  2147. waitsecond(1)
  2148. end
  2149.  
  2150. tcase << TestAction.new(:wait30second_14) do
  2151. waitsecond(30)
  2152. end
  2153.  
  2154. tcase << TestAction.new(:ImageButton_ShutterTopComp_6) do
  2155. $ruiObj = RUIObject.new.with('objectid', -1799776401).with('selfid', -1930433243).with('textdescid', 415097668).with('uniqueparentid', 0)
  2156. .with('uitreeindex', 5)
  2157. .with('pretext', '000008')
  2158. .with('classname', 'ImageButton')
  2159. .with('resource-id', 'com.lge.camera:id/shutter_top_comp')
  2160. .with('content-desc', 'Stop recording')
  2161.  
  2162. $ruiObj.isExist
  2163. end
  2164.  
  2165. tcase << TestAction.new(:ImageButton_ShutterTopCompType_6) do
  2166. $ruiObj = RUIObject.new.with('objectid', -1695967134).with('selfid', 685856113).with('textdescid', -1035373570).with('uniqueparentid', 0)
  2167. .with('uitreeindex', 10)
  2168. .with('classname', 'ImageButton')
  2169. .with('resource-id', 'com.lge.camera:id/shutter_top_comp_type')
  2170.  
  2171. $ruiObj.click
  2172.  
  2173. waitsecond(2)
  2174. end
  2175.  
  2176. tcase << TestAction.new(:scriptAction_5) do
  2177. $myTestResult = checkLastExistResult
  2178.  
  2179. if $myTestResult == false
  2180. $myFailReason == "Video does not exist"
  2181. end
  2182. logStopTest("05_01_07_01_MultiMedia")
  2183. end
  2184.  
  2185. tcase << TestAction.new(:pressBack_6) do
  2186. pressBack
  2187. end
  2188.  
  2189. tcase << TestAction.new(:pressBack_7) do
  2190. pressBack
  2191. end
  2192.  
  2193. tcase << TestAction.new(:pressHome_8) do
  2194. pressHome
  2195. end
  2196.  
  2197. tcase.run(loopTime)
  2198.  
  2199. end
  2200.  
  2201. def self.MultiMedia_05_01_07_02(loopTime)
  2202.  
  2203. tcase = TestCase.new("MultiMedia_05_01_07_02")
  2204.  
  2205. tcase << TestAction.new(:scriptAction_1) do
  2206. logStartTest("05_01_07_02_MultiMedia")
  2207. end
  2208.  
  2209. tcase << TestAction.new(:gotoApp_1) do
  2210. gotoApp('Gallery')
  2211.  
  2212. waitsecond(2)
  2213. end
  2214.  
  2215. tcase << TestAction.new(:Button_PermissionAllowButton_2) do
  2216. $ruiObj = RUIObject.new.with('objectid', 973397371).with('selfid', 1444367499).with('textdescid', -1740624804).with('uniqueparentid', 0)
  2217. .with('uitreeindex', 3)
  2218. .with('classname', 'Button')
  2219. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  2220. .with('text', 'Allow')
  2221.  
  2222. $ruiObj.click
  2223. end
  2224.  
  2225. tcase << TestAction.new(:ImageButton_Open_2) do
  2226. $ruiObj = RUIObject.new.with('objectid', -1596683477).with('selfid', 1589392844).with('textdescid', 426502620).with('uniqueparentid', 0)
  2227. .with('uitreeindex', 1)
  2228. .with('classname', 'ImageButton')
  2229. .with('content-desc', 'Open navigation drawer')
  2230.  
  2231. $ruiObj.click
  2232.  
  2233. waitsecond(2)
  2234. end
  2235.  
  2236. tcase << TestAction.new(:CheckedTextView_DrawerItem_4) do
  2237. $ruiObj = RUIObject.new.with('objectid', -401550358).with('selfid', 229733217).with('textdescid', 1081503090).with('uniqueparentid', 0).with('classresourceid', 396870609)
  2238. .with('uitreeindex', 4)
  2239. .with('classname', 'CheckedTextView')
  2240. .with('resource-id', 'com.android.gallery3d:id/drawer_item')
  2241. .with('text', 'Videos')
  2242.  
  2243. $ruiObj.click
  2244.  
  2245. waitsecond(2)
  2246. end
  2247.  
  2248. tcase << TestAction.new(:clickXY_572_388_2) do
  2249. click(572,388)
  2250.  
  2251. waitsecond(2)
  2252. end
  2253.  
  2254. tcase << TestAction.new(:clickXY_640_560_2) do
  2255. click(640,560)
  2256.  
  2257. waitsecond(2)
  2258. end
  2259.  
  2260. tcase << TestAction.new(:TextView_ResolverText_6) do
  2261. $ruiObj = RUIObject.new.with('objectid', 1736845148).with('selfid', 1334281818).with('textdescid', 234547305).with('uniqueparentid', 0).with('classresourceid', -472389065)
  2262. .with('uitreeindex', 4)
  2263. .with('classname', 'TextView')
  2264. .with('resource-id', 'com.lge:id/resolver_text')
  2265. .with('text', 'Video')
  2266.  
  2267. $ruiObj.click
  2268.  
  2269. waitsecond(2)
  2270. end
  2271.  
  2272. tcase << TestAction.new(:Button_AllowButton_9) do
  2273. $ruiObj = RUIObject.new.with('objectid', -1049422851).with('selfid', -808516471).with('textdescid', -374437087).with('uniqueparentid', 0).with('classresourceid', 771022871)
  2274. .with('uitreeindex', 8)
  2275. .with('classname', 'Button')
  2276. .with('resource-id', 'com.lge:id/allow_button')
  2277. .with('text', 'OK')
  2278.  
  2279. $ruiObj.click
  2280.  
  2281. waitsecond(1)
  2282. end
  2283.  
  2284. tcase << TestAction.new(:Button_PermissionAllowButton_11) do
  2285. $ruiObj = RUIObject.new.with('objectid', -886457929).with('selfid', 1443382411).with('textdescid', 270556320).with('uniqueparentid', 0)
  2286. .with('uitreeindex', 3)
  2287. .with('classname', 'Button')
  2288. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  2289. .with('text', 'ALLOW')
  2290.  
  2291. $ruiObj.click
  2292. end
  2293.  
  2294. tcase << TestAction.new(:wait10second_4) do
  2295. waitsecond(10)
  2296. end
  2297.  
  2298. tcase << TestAction.new(:clickXY_296_832_8) do
  2299. click(296,832)
  2300.  
  2301. waitsecond(1)
  2302. end
  2303.  
  2304. tcase << TestAction.new(:ImageButton_Pause_10) do
  2305. $ruiObj = RUIObject.new.with('objectid', 321323694).with('selfid', -485281624).with('textdescid', 2077043940).with('uniqueparentid', 0)
  2306. .with('uitreeindex', 3)
  2307. .with('pretext', 'Videos')
  2308. .with('classname', 'ImageButton')
  2309. .with('resource-id', 'com.lge.videoplayer:id/pause')
  2310. .with('content-desc', 'Pause')
  2311.  
  2312. $ruiObj.isExist
  2313.  
  2314. waitsecond(1)
  2315. end
  2316.  
  2317. tcase << TestAction.new(:scriptAction_7) do
  2318. $myTestResult = checkLastExistResult
  2319.  
  2320. if $myTestResult == false
  2321. $myFailReason = "Video did not play successfuly"
  2322. end
  2323. logStopTest("05_01_07_02_MultiMedia")
  2324. end
  2325.  
  2326. tcase << TestAction.new(:pressBack_8) do
  2327. pressBack
  2328. end
  2329.  
  2330. tcase << TestAction.new(:pressBack_9) do
  2331. pressBack
  2332. end
  2333.  
  2334. tcase << TestAction.new(:pressHome_10) do
  2335. pressHome
  2336. end
  2337.  
  2338. tcase.run(loopTime)
  2339.  
  2340. end
  2341.  
  2342. def self.MultiMedia_05_01_07_03(loopTime)
  2343.  
  2344. tcase = TestCase.new("MultiMedia_05_01_07_03")
  2345.  
  2346. tcase << TestAction.new(:scriptAction_1) do
  2347. logStartTest("05_01_07_03_MultiMedia")
  2348. end
  2349.  
  2350. tcase << TestAction.new(:gotoApp_1) do
  2351. gotoApp('Camera')
  2352.  
  2353. waitsecond(2)
  2354. end
  2355.  
  2356. tcase << TestAction.new(:ImageView_Thumbnail_2) do
  2357. $ruiObj = RUIObject.new.with('objectid', -2123601541).with('selfid', -135259702).with('textdescid', 357252685).with('uniqueparentid', 0)
  2358. .with('uitreeindex', 15)
  2359. .with('classname', 'ImageView')
  2360. .with('resource-id', 'com.lge.camera:id/thumbnail')
  2361. .with('content-desc', 'Gallery')
  2362.  
  2363. $ruiObj.click
  2364.  
  2365. waitsecond(2)
  2366. end
  2367.  
  2368. tcase << TestAction.new(:TextView_ResolverText_2) do
  2369. $ruiObj = RUIObject.new.with('objectid', 1736845148).with('selfid', 1695477105).with('textdescid', -880470158).with('uniqueparentid', 0).with('classresourceid', -472389065)
  2370. .with('uitreeindex', 2)
  2371. .with('classname', 'TextView')
  2372. .with('resource-id', 'com.lge:id/resolver_text')
  2373. .with('text', 'Gallery')
  2374.  
  2375. $ruiObj.click
  2376.  
  2377. waitsecond(2)
  2378. end
  2379.  
  2380. tcase << TestAction.new(:Button_AllowButton_4) do
  2381. $ruiObj = RUIObject.new.with('objectid', -1049422851).with('selfid', -808516471).with('textdescid', -374437087).with('uniqueparentid', 0).with('classresourceid', 771022871)
  2382. .with('uitreeindex', 8)
  2383. .with('classname', 'Button')
  2384. .with('resource-id', 'com.lge:id/allow_button')
  2385. .with('text', 'OK')
  2386.  
  2387. $ruiObj.click
  2388.  
  2389. waitsecond(2)
  2390. end
  2391.  
  2392. tcase << TestAction.new(:clickXY_196_782_2) do
  2393. click(196,782)
  2394.  
  2395. waitsecond(2)
  2396. end
  2397.  
  2398. tcase << TestAction.new(:Button_BottomMenuLayerItem5_2) do
  2399. $ruiObj = RUIObject.new.with('objectid', 786788493).with('selfid', -296540457).with('textdescid', -702028205).with('uniqueparentid', 0)
  2400. .with('uitreeindex', 4)
  2401. .with('classname', 'Button')
  2402. .with('resource-id', 'com.android.gallery3d:id/bottom_menu_layer_item5')
  2403. .with('content-desc', 'Delete')
  2404. .with('text', 'Delete')
  2405.  
  2406. $ruiObj.click
  2407.  
  2408. waitsecond(4)
  2409. end
  2410.  
  2411. tcase << TestAction.new(:scriptAction_4) do
  2412. $myTestResult = checkLastExistResult
  2413.  
  2414. if $myTestResult == false
  2415. $myFailReason == "Video fail to delete"
  2416. end
  2417. logStopTest("05_01_07_03_MultiMedia")
  2418. end
  2419.  
  2420. tcase << TestAction.new(:pressBack_5) do
  2421. pressBack
  2422. end
  2423.  
  2424. tcase << TestAction.new(:pressBack_6) do
  2425. pressBack
  2426. end
  2427.  
  2428. tcase << TestAction.new(:pressHome_7) do
  2429. pressHome
  2430. end
  2431.  
  2432. tcase.run(loopTime)
  2433.  
  2434. end
  2435.  
  2436. def self.MultiMedia_05_01_07_04(loopTime)
  2437.  
  2438. tcase = TestCase.new("MultiMedia_05_01_07_04")
  2439.  
  2440. tcase << TestAction.new(:scriptAction_1) do
  2441. logStartTest("05_01_07_04_MultiMedia")
  2442. end
  2443.  
  2444. tcase << TestAction.new(:gotoApp_1) do
  2445. gotoApp('Camera')
  2446. end
  2447.  
  2448. tcase << TestAction.new(:Button_OkButton_2_1) do
  2449. $ruiObj = RUIObject.new.with('objectid', -658747592).with('selfid', 659685775).with('textdescid', -384972794).with('uniqueparentid', 0)
  2450. .with('uitreeindex', 22)
  2451. .with('classname', 'Button')
  2452. .with('resource-id', 'com.lge.camera:id/ok_button')
  2453. .with('text', 'Turn on')
  2454.  
  2455. $ruiObj.click
  2456.  
  2457. waitsecond(1)
  2458. end
  2459.  
  2460. tcase << TestAction.new(:Button_PermissionAllowButton_4_1) do
  2461. $ruiObj = RUIObject.new.with('objectid', 973397371).with('selfid', 1444367499).with('textdescid', -1740624804).with('uniqueparentid', 0)
  2462. .with('uitreeindex', 3)
  2463. .with('classname', 'Button')
  2464. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  2465. .with('text', 'Allow')
  2466.  
  2467. $ruiObj.click
  2468.  
  2469. waitsecond(1)
  2470. end
  2471.  
  2472. tcase << TestAction.new(:ImageButton_ShutterBottomCompType_2) do
  2473. $ruiObj = RUIObject.new.with('objectid', 215322368).with('selfid', -857985467).with('textdescid', -1914941152).with('uniqueparentid', 0)
  2474. .with('uitreeindex', 10)
  2475. .with('classname', 'ImageButton')
  2476. .with('resource-id', 'com.lge.camera:id/shutter_bottom_comp_type')
  2477.  
  2478. $ruiObj.click
  2479.  
  2480. waitsecond(2)
  2481. end
  2482.  
  2483. tcase << TestAction.new(:ImageView_Thumbnail_1_1) do
  2484. $ruiObj = RUIObject.new.with('objectid', -2123601541).with('selfid', -135259702).with('textdescid', 357252685).with('uniqueparentid', 0)
  2485. .with('uitreeindex', 15)
  2486. .with('classname', 'ImageView')
  2487. .with('resource-id', 'com.lge.camera:id/thumbnail')
  2488. .with('content-desc', 'Gallery')
  2489.  
  2490. $ruiObj.click
  2491.  
  2492. waitsecond(2)
  2493. end
  2494.  
  2495. tcase << TestAction.new(:TextView_ResolverText_2_1) do
  2496. $ruiObj = RUIObject.new.with('objectid', 1736845148).with('selfid', 1695477105).with('textdescid', -880470158).with('uniqueparentid', 0).with('classresourceid', -472389065)
  2497. .with('uitreeindex', 2)
  2498. .with('classname', 'TextView')
  2499. .with('resource-id', 'com.lge:id/resolver_text')
  2500. .with('text', 'Gallery')
  2501.  
  2502. $ruiObj.click
  2503.  
  2504. waitsecond(2)
  2505. end
  2506.  
  2507. tcase << TestAction.new(:Button_AllowButton_3_1) do
  2508. $ruiObj = RUIObject.new.with('objectid', -1049422851).with('selfid', -808516471).with('textdescid', -374437087).with('uniqueparentid', 0).with('classresourceid', 771022871)
  2509. .with('uitreeindex', 8)
  2510. .with('classname', 'Button')
  2511. .with('resource-id', 'com.lge:id/allow_button')
  2512. .with('text', 'OK')
  2513.  
  2514. $ruiObj.click
  2515.  
  2516. waitsecond(2)
  2517. end
  2518.  
  2519. tcase << TestAction.new(:scriptAction_10) do
  2520. $myTestResult = checkLastExistResult
  2521.  
  2522. if $myTestResult == false
  2523. $myFailReason == "Take picture FAILED"
  2524. end
  2525. logStopTest("05_01_07_04_MultiMedia")
  2526. end
  2527.  
  2528. tcase << TestAction.new(:pressBack_11) do
  2529. pressBack
  2530. end
  2531.  
  2532. tcase << TestAction.new(:pressBack_12) do
  2533. pressBack
  2534. end
  2535.  
  2536. tcase << TestAction.new(:pressHome_13) do
  2537. pressHome
  2538. end
  2539.  
  2540. tcase.run(loopTime)
  2541.  
  2542. end
  2543.  
  2544. def self.MultiMedia_05_01_07_05(loopTime)
  2545.  
  2546. tcase = TestCase.new("MultiMedia_05_01_07_05")
  2547.  
  2548. tcase << TestAction.new(:scriptAction_1) do
  2549. logStartTest("05_01_07_05_MultiMedia")
  2550. end
  2551.  
  2552. tcase << TestAction.new(:scriptAction_4) do
  2553. gotoApp("Gallery")
  2554.  
  2555. waitsecond(2)
  2556. end
  2557.  
  2558. tcase << TestAction.new(:Button_Button1_6) do
  2559. $ruiObj = RUIObject.new.with('objectid', 1034541174).with('selfid', -1318451484).with('textdescid', 730622746).with('uniqueparentid', 0)
  2560. .with('uitreeindex', 3)
  2561. .with('classname', 'Button')
  2562. .with('resource-id', 'android:id/button1')
  2563. .with('text', 'OK')
  2564.  
  2565. $ruiObj.click
  2566.  
  2567. waitsecond(2)
  2568. end
  2569.  
  2570. tcase << TestAction.new(:refresh) do
  2571. pressRecentApps
  2572.  
  2573. RUIObject.new.with('text', 'Gallery').click
  2574.  
  2575. waitsecond(2)
  2576. end
  2577.  
  2578. tcase << TestAction.new(:Button_AllowButton_4) do
  2579. $ruiObj = RUIObject.new.with('objectid', -1049422851).with('selfid', -808516471).with('textdescid', -374437087).with('uniqueparentid', 0).with('classresourceid', 771022871)
  2580. .with('uitreeindex', 8)
  2581. .with('classname', 'Button')
  2582. .with('resource-id', 'com.lge:id/allow_button')
  2583. .with('text', 'OK')
  2584.  
  2585. $ruiObj.click
  2586.  
  2587. waitsecond(2)
  2588. end
  2589.  
  2590. tcase << TestAction.new(:clickXY_270_678_2) do
  2591. click(270,678)
  2592.  
  2593. waitsecond(1)
  2594. end
  2595.  
  2596. tcase << TestAction.new(:TextView_ActionDelete_11) do
  2597. $ruiObj = RUIObject.new.with('objectid', -1653355804).with('selfid', -340367424).with('textdescid', 366757063).with('uniqueparentid', 0)
  2598. .with('uitreeindex', 5)
  2599. .with('classname', 'TextView')
  2600. .with('resource-id', 'com.android.gallery3d:id/action_delete')
  2601. .with('content-desc', 'Delete')
  2602.  
  2603. $ruiObj.isExist
  2604.  
  2605. waitsecond(0)
  2606. end
  2607.  
  2608. tcase << TestAction.new(:scriptAction_8) do
  2609. $myTestResult = checkLastExistResult
  2610.  
  2611. if $myTestResult == false
  2612. $myFailReason == "Picutre not open"
  2613. end
  2614. logStopTest("05_01_07_05_MultiMedia")
  2615. end
  2616.  
  2617. tcase << TestAction.new(:pressBack_9) do
  2618. pressBack
  2619. end
  2620.  
  2621. tcase << TestAction.new(:pressBack_10) do
  2622. pressBack
  2623. end
  2624.  
  2625. tcase << TestAction.new(:pressHome_11) do
  2626. pressHome
  2627. end
  2628.  
  2629. tcase << TestAction.new(:View_GlRootView_1) do
  2630. $ruiObj = RUIObject.new.with('objectid', -789837373).with('selfid', -1563922518).with('textdescid', 1284845245).with('uniqueparentid', 0)
  2631. .with('uitreeindex', 0)
  2632. .with('classname', 'android.view.View')
  2633. .with('resource-id', 'com.android.gallery3d:id/gl_root_view')
  2634.  
  2635. $ruiObj.click
  2636.  
  2637. waitsecond(2)
  2638. end
  2639.  
  2640. tcase.run(loopTime)
  2641.  
  2642. end
  2643.  
  2644. def self.MultiMedia_05_01_07_06(loopTime)
  2645.  
  2646. tcase = TestCase.new("MultiMedia_05_01_07_06")
  2647.  
  2648. tcase << TestAction.new(:scriptAction_1) do
  2649. logStartTest("05_01_07_06_MultiMedia")
  2650. end
  2651.  
  2652. tcase << TestAction.new(:gotoApp_1) do
  2653. gotoApp('Gallery')
  2654.  
  2655. waitsecond(2)
  2656. end
  2657.  
  2658. tcase << TestAction.new(:clickXY_266_620_2) do
  2659. click(266,620)
  2660.  
  2661. waitsecond(1)
  2662. end
  2663.  
  2664. tcase << TestAction.new(:TextView_ActionDelete_2) do
  2665. $ruiObj = RUIObject.new.with('objectid', -1653355804).with('selfid', -340367424).with('textdescid', 366757063).with('uniqueparentid', 0)
  2666. .with('uitreeindex', 5)
  2667. .with('classname', 'TextView')
  2668. .with('resource-id', 'com.android.gallery3d:id/action_delete')
  2669. .with('content-desc', 'Delete')
  2670.  
  2671. $ruiObj.isExist
  2672.  
  2673. waitsecond(0)
  2674. end
  2675.  
  2676. tcase << TestAction.new(:TextView_ActionDelete_4) do
  2677. $ruiObj = RUIObject.new.with('objectid', -1653355804).with('selfid', -340367424).with('textdescid', 366757063).with('uniqueparentid', 0)
  2678. .with('uitreeindex', 5)
  2679. .with('classname', 'TextView')
  2680. .with('resource-id', 'com.android.gallery3d:id/action_delete')
  2681. .with('content-desc', 'Delete')
  2682.  
  2683. $ruiObj.click
  2684.  
  2685. waitsecond(2)
  2686. end
  2687.  
  2688. tcase << TestAction.new(:Button_Button1_6) do
  2689. $ruiObj = RUIObject.new.with('objectid', -1700448190).with('selfid', 982364851).with('textdescid', -621990409).with('uniqueparentid', 0).with('classresourceid', 1834539358)
  2690. .with('uitreeindex', 2)
  2691. .with('classname', 'Button')
  2692. .with('resource-id', 'android:id/button1')
  2693. .with('text', 'DELETE')
  2694.  
  2695. $ruiObj.click
  2696.  
  2697. waitsecond(2)
  2698. end
  2699.  
  2700. tcase << TestAction.new(:scriptAction_5) do
  2701. $myTestResult = checkLastExistResult
  2702.  
  2703. if $myTestResult == false
  2704. $myFailReason == "Picture is not found"
  2705. end
  2706. logStopTest("05_01_07_06_MultiMedia")
  2707. end
  2708.  
  2709. tcase << TestAction.new(:pressBack_6) do
  2710. pressBack
  2711. end
  2712.  
  2713. tcase << TestAction.new(:pressBack_7) do
  2714. pressBack
  2715. end
  2716.  
  2717. tcase << TestAction.new(:pressHome_8) do
  2718. pressHome
  2719. end
  2720.  
  2721. tcase.run(loopTime)
  2722.  
  2723. end
  2724.  
  2725. def self.MultiMedia_05_01_07_10(loopTime)
  2726.  
  2727. tcase = TestCase.new("MultiMedia_05_01_07_10")
  2728.  
  2729. tcase << TestAction.new(:scriptAction_1) do
  2730. logStartTest("05_01_07_10_MultiMedia")
  2731. end
  2732.  
  2733. tcase << TestAction.new(:gotoApp_1) do
  2734. gotoApp('YouTube')
  2735.  
  2736. waitsecond(2)
  2737. end
  2738.  
  2739. tcase << TestAction.new(:TextView_LaterButton_2) do
  2740. $ruiObj = RUIObject.new.with('objectid', 949353906).with('selfid', 702590847).with('textdescid', -874020510).with('uniqueparentid', 0)
  2741. .with('uitreeindex', 4)
  2742. .with('classname', 'TextView')
  2743. .with('resource-id', 'com.google.android.youtube:id/later_button')
  2744. .with('text', 'LATER')
  2745.  
  2746. $ruiObj.click
  2747.  
  2748. waitsecond(2)
  2749. end
  2750.  
  2751. tcase << TestAction.new(:TextView_Dismiss_2) do
  2752. $ruiObj = RUIObject.new.with('objectid', 118887004).with('selfid', 517159).with('textdescid', 1827199643).with('uniqueparentid', 0)
  2753. .with('uitreeindex', 5)
  2754. .with('classname', 'TextView')
  2755. .with('resource-id', 'com.google.android.youtube:id/dismiss')
  2756. .with('text', 'Not now')
  2757.  
  2758. $ruiObj.click
  2759.  
  2760. waitsecond(1)
  2761. end
  2762.  
  2763. tcase << TestAction.new(:Button_Image_2) do
  2764. $ruiObj = RUIObject.new.with('objectid', 875876029).with('selfid', 1315484302).with('textdescid', 1788421122).with('uniqueparentid', 0)
  2765. .with('uitreeindex', 4)
  2766. .with('classname', 'Button')
  2767. .with('resource-id', 'com.google.android.youtube:id/image')
  2768. .with('content-desc', 'Home')
  2769.  
  2770. $ruiObj.click
  2771.  
  2772. waitsecond(1)
  2773. end
  2774.  
  2775. tcase << TestAction.new(:ImageView_Thumbnail_3) do
  2776. $ruiObj = RUIObject.new.with('objectid', 875683821).with('selfid', -2120336906).with('textdescid', 1376394707).with('uniqueparentid', 0)
  2777. .with('uitreeindex', 10)
  2778. .with('pretext', 'WATCH MORE')
  2779. .with('classname', 'ImageView')
  2780. .with('resource-id', 'com.google.android.youtube:id/thumbnail')
  2781.  
  2782. $ruiObj.select('Similiar').click
  2783. end
  2784.  
  2785. tcase << TestAction.new(:wait10second_3) do
  2786. waitsecond(10)
  2787. end
  2788.  
  2789. tcase << TestAction.new(:TextView_SubscribeButton_4) do
  2790. $ruiObj = RUIObject.new.with('objectid', 1730328459).with('selfid', 1783143723).with('textdescid', -408811077).with('uniqueparentid', 0).with('classresourceid', -757100379)
  2791. .with('uitreeindex', 10)
  2792. .with('classname', 'TextView')
  2793. .with('resource-id', 'com.google.android.youtube:id/subscribe_button')
  2794. .with('content-desc', 'Subscribe to this channel')
  2795. .with('text', 'Subscribe')
  2796.  
  2797. $ruiObj.select('Similiar').isExist
  2798. end
  2799.  
  2800. tcase << TestAction.new(:scriptAction_9) do
  2801. $myTestResult = checkLastExistResult
  2802.  
  2803. if $myTestResult == false
  2804. $myFailReason == "Video Streaming does not work"
  2805. end
  2806. logStopTest("05_01_07_10_MultiMedia")
  2807. end
  2808.  
  2809. tcase << TestAction.new(:pressBack_10) do
  2810. pressBack
  2811. end
  2812.  
  2813. tcase << TestAction.new(:pressBack_11) do
  2814. pressBack
  2815. end
  2816.  
  2817. tcase << TestAction.new(:pressHome_12) do
  2818. pressHome
  2819. end
  2820.  
  2821. tcase.run(loopTime)
  2822.  
  2823. end
  2824.  
  2825. def self.MultiTasking_05_01_08_01(loopTime)
  2826.  
  2827. tcase = TestCase.new("MultiTasking_05_01_08_01")
  2828.  
  2829. tcase << TestAction.new(:scriptAction_StartTest) do
  2830. logStartTest("05_01_08_01_MultiTasking")
  2831. end
  2832.  
  2833. tcase << TestAction.new(:gotoApp_1_1) do
  2834. gotoApp('Phone')
  2835.  
  2836. waitsecond(2)
  2837. end
  2838.  
  2839. tcase << TestAction.new(:TextView_Tabtext_21) do
  2840. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 566119687).with('textdescid', 1861262411).with('uniqueparentid', 0)
  2841. .with('uitreeindex', 2)
  2842. .with('classname', 'TextView')
  2843. .with('resource-id', 'com.android.contacts:id/tabText')
  2844. .with('text', 'Dial')
  2845.  
  2846. $ruiObj.click
  2847.  
  2848. waitsecond(2)
  2849. end
  2850.  
  2851. tcase << TestAction.new(:EditText_Digits_4) do
  2852. $ruiObj = RUIObject.new.with('objectid', 477485968).with('selfid', -1326421482).with('textdescid', 1917163152).with('uniqueparentid', 0)
  2853. .with('uitreeindex', 7)
  2854. .with('classname', 'EditText')
  2855. .with('resource-id', 'com.android.contacts:id/digits')
  2856.  
  2857. $ruiObj.inputtext('511')
  2858.  
  2859. waitsecond(2)
  2860. end
  2861.  
  2862. tcase << TestAction.new(:ImageButton_Btnlogscall_6) do
  2863. $vzwCallButton = $ruiObj = RUIObject.new.with('objectid', -1934426254).with('selfid', -2053967649).with('textdescid', -911487124).with('uniqueparentid', 0)
  2864. .with('uitreeindex', 21)
  2865. .with('classname', 'ImageButton')
  2866. .with('resource-id', 'com.android.contacts:id/btnLogsCall')
  2867. .with('content-desc', 'Call')
  2868.  
  2869. $tmusCallButton = RUIObject.new.with('objectid', -1313327681).with('selfid', -460279496).with('textdescid', -1259661061).with('uniqueparentid', 0)
  2870. .with('uitreeindex', 58)
  2871. .with('classname', 'ImageButton')
  2872. .with('resource-id', 'com.android.contacts:id/btnVoLTE')
  2873. .with('content-desc', 'VoLTE call')
  2874.  
  2875. if $vzwCallButton.isExist
  2876. $vzwCallButton.click
  2877. elsif $tmusCallButton.isExist
  2878. $tmusCallButton.click
  2879. end
  2880.  
  2881. $ruiObj.click
  2882.  
  2883. waitsecond(1)
  2884. end
  2885.  
  2886. tcase << TestAction.new(:wait10second_3) do
  2887. waitsecond(5)
  2888. end
  2889.  
  2890. tcase << TestAction.new(:Button_Endbutton_2) do
  2891. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  2892. .with('uitreeindex', 10)
  2893. .with('classname', 'Button')
  2894. .with('resource-id', 'com.android.incallui:id/endButton')
  2895. .with('text', 'End')
  2896.  
  2897. $ruiObj.isExist
  2898. end
  2899.  
  2900. tcase << TestAction.new(:scriptAction_4) do
  2901. $myTestResult = checkLastExistResult
  2902.  
  2903. if $myTestResult == false
  2904. $myFailReason = "End button not found"
  2905. end
  2906. logStopTest("05_01_08_01_MultiTasking")
  2907.  
  2908. end
  2909.  
  2910. tcase << TestAction.new(:pressHome_2) do
  2911. pressHome
  2912. end
  2913.  
  2914. tcase.run(loopTime)
  2915.  
  2916. end
  2917.  
  2918. def self.MultiTasking_05_01_08_02(loopTime)
  2919.  
  2920. tcase = TestCase.new("MultiTasking_05_01_08_02")
  2921.  
  2922. tcase << TestAction.new(:scriptAction_StartTestLog) do
  2923. logStartTest("05_01_08_02_MultiTasking")
  2924. end
  2925.  
  2926. tcase << TestAction.new(:gotoApp_1_1) do
  2927. gotoApp('Contacts')
  2928.  
  2929. waitsecond(2)
  2930. end
  2931.  
  2932. tcase << TestAction.new(:gotoApp_1_2) do
  2933. gotoApp('Messaging')
  2934.  
  2935. waitsecond(2)
  2936. end
  2937.  
  2938. tcase << TestAction.new(:gotoApp_1_3) do
  2939. gotoApp('Phone')
  2940.  
  2941. waitsecond(2)
  2942. end
  2943.  
  2944. tcase << TestAction.new(:gotoApp_1_4) do
  2945. gotoApp('Play Store')
  2946.  
  2947. waitsecond(2)
  2948. end
  2949.  
  2950. tcase << TestAction.new(:gotoApp_2) do
  2951. gotoApp('Camera')
  2952.  
  2953. waitsecond(2)
  2954. end
  2955.  
  2956. tcase << TestAction.new(:gotoApp_1_5_1) do
  2957. gotoApp('Chrome')
  2958.  
  2959. waitsecond(2)
  2960. end
  2961.  
  2962. tcase << TestAction.new(:ImageButton_MenuButton_2) do
  2963. $ruiObj = RUIObject.new.with('objectid', 554731264).with('selfid', -17041368).with('textdescid', 1097269587).with('uniqueparentid', 0)
  2964. .with('uitreeindex', 19)
  2965. .with('classname', 'ImageButton')
  2966. .with('resource-id', 'com.android.chrome:id/menu_button')
  2967. .with('content-desc', 'More options')
  2968.  
  2969. $ruiObj.isExist
  2970.  
  2971. waitsecond(0)
  2972. end
  2973.  
  2974. tcase << TestAction.new(:scriptAction_LogStopTest) do
  2975. $myTestResult = checkLastExistResult
  2976. if $myTestResult == false
  2977. $myFailReason = "Apps not loaded"
  2978. end
  2979. logStopTest("05_01_08_02_MultiTasking")
  2980. end
  2981.  
  2982. tcase << TestAction.new(:pressBack_6) do
  2983. pressBack
  2984. end
  2985.  
  2986. tcase << TestAction.new(:pressBack_7) do
  2987. pressBack
  2988. end
  2989.  
  2990. tcase.run(loopTime)
  2991.  
  2992. end
  2993.  
  2994. def self.MultiTasking_05_01_08_03(loopTime)
  2995.  
  2996. tcase = TestCase.new("MultiTasking_05_01_08_03")
  2997.  
  2998. tcase << TestAction.new(:scriptAction_3) do
  2999. wakeUp()
  3000.  
  3001. waitsecond(1)
  3002. end
  3003.  
  3004. tcase << TestAction.new(:scriptAction_StartTestLog_1) do
  3005. logStartTest("05_01_08_03_MultiTasking")
  3006. end
  3007.  
  3008. tcase << TestAction.new(:gotoApp_1_1) do
  3009. gotoApp('Phone')
  3010. end
  3011.  
  3012. tcase << TestAction.new(:Button_Endbutton_2_1_1) do
  3013. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  3014. .with('uitreeindex', 8)
  3015. .with('classname', 'Button')
  3016. .with('resource-id', 'com.android.incallui:id/endButton')
  3017. .with('text', 'End')
  3018.  
  3019. $ruiObj.isExist
  3020.  
  3021. waitsecond(1)
  3022. end
  3023.  
  3024. tcase << TestAction.new(:scriptAction_4_1) do
  3025. $UIDev.swipe(200,
  3026. $UIDev.getDisplayHeight-300,
  3027. $UIDev.getDisplayWidth-50,
  3028. $UIDev.getDisplayHeight-300,
  3029. 10)
  3030. end
  3031.  
  3032. tcase << TestAction.new(:Button_Endbutton_6_1) do
  3033. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  3034. .with('uitreeindex', 12)
  3035. .with('classname', 'Button')
  3036. .with('resource-id', 'com.android.incallui:id/endButton')
  3037. .with('text', 'End')
  3038.  
  3039. $ruiObj.click
  3040.  
  3041. waitsecond(1)
  3042. end
  3043.  
  3044. tcase << TestAction.new(:scriptAction_LogStopTest) do
  3045. $myTestResult = checkLastExistResult
  3046.  
  3047. if $myTestResult == false
  3048. $myFailReason = "End button not found"
  3049. end
  3050. logStopTest("05_01_08_03_MultiTasking")
  3051. end
  3052.  
  3053. tcase << TestAction.new(:pressHome_20) do
  3054. pressHome
  3055. end
  3056.  
  3057. tcase.run(loopTime)
  3058.  
  3059. end
  3060.  
  3061. def self.MultiTasking_05_01_08_04(loopTime)
  3062.  
  3063. tcase = TestCase.new("MultiTasking_05_01_08_04")
  3064.  
  3065. tcase << TestAction.new(:scriptAction_StartTestLog) do
  3066. logStartTest("05_01_08_04_MultiTasking")
  3067. end
  3068.  
  3069. tcase << TestAction.new(:gotoApp_1_1) do
  3070. gotoApp('Chrome')
  3071. end
  3072.  
  3073. tcase << TestAction.new(:Button_TermsAccept_5) do
  3074. $ruiObj = RUIObject.new.with('objectid', 1131623741).with('selfid', 659232449).with('textdescid', -1120600562).with('uniqueparentid', 0)
  3075. .with('uitreeindex', 4)
  3076. .with('classname', 'Button')
  3077. .with('resource-id', 'com.android.chrome:id/terms_accept')
  3078. .with('text', 'Accept continue')
  3079.  
  3080. $ruiObj.click
  3081. end
  3082.  
  3083. tcase << TestAction.new(:Button_PositiveButton_6) do
  3084. $ruiObj = RUIObject.new.with('objectid', -1302979962).with('selfid', 780691289).with('textdescid', 1735628115).with('uniqueparentid', 0)
  3085. .with('uitreeindex', 5)
  3086. .with('classname', 'Button')
  3087. .with('resource-id', 'com.android.chrome:id/positive_button')
  3088. .with('text', 'Next')
  3089.  
  3090. $ruiObj.click
  3091. end
  3092.  
  3093. tcase << TestAction.new(:Button_PositiveButton_7) do
  3094. $ruiObj = RUIObject.new.with('objectid', -953817212).with('selfid', 780402664).with('textdescid', 1478534434).with('uniqueparentid', 0)
  3095. .with('uitreeindex', 7)
  3096. .with('classname', 'Button')
  3097. .with('resource-id', 'com.android.chrome:id/positive_button')
  3098. .with('text', 'Done')
  3099.  
  3100. $ruiObj.click
  3101. end
  3102.  
  3103. tcase << TestAction.new(:EditText_UrlBar_8) do
  3104. $ruiObj = RUIObject.new.with('objectid', 882195433).with('selfid', 613381324).with('textdescid', 1578254679).with('uniqueparentid', 0)
  3105. .with('uitreeindex', 7)
  3106. .with('classname', 'EditText')
  3107. .with('resource-id', 'com.android.chrome:id/url_bar')
  3108.  
  3109. $ruiObj.inputtext('www.att.com')
  3110.  
  3111. waitsecond(1)
  3112. end
  3113.  
  3114. tcase << TestAction.new(:pressEnter_5_1) do
  3115. pressEnter
  3116.  
  3117. waitsecond(4)
  3118. end
  3119.  
  3120. tcase << TestAction.new(:wait2second_2) do
  3121. waitsecond(2)
  3122. end
  3123.  
  3124. tcase << TestAction.new(:scriptAction_LogStopTest) do
  3125. $reload = RUIObject.new.with('objectid', -1485276626).with('selfid', 131798869).with('textdescid', -1148751605).with('uniqueparentid', -932380963)
  3126. .with('uitreeindex', 1)
  3127. .with('classname', 'Button')
  3128. .with('content-desc', 'RELOAD').exists?
  3129.  
  3130. $progressBar = RUIObject.new.with('objectid', 460148827).with('selfid', -703099949).with('textdescid', 1379711781).with('uniqueparentid', 0)
  3131. .with('uitreeindex', 4)
  3132. .with('pretext', 'Block')
  3133. .with('classname', 'ProgressBar')
  3134. .with('resource-id', 'com.android.chrome:id/progress').exists?
  3135.  
  3136. if ($progressBar or $reload) == true
  3137. $myTestResult = false
  3138. else
  3139. $myTestResult = true
  3140. end
  3141. if $myTestResult == false
  3142. $myFailReason = "Browser is not starting"
  3143. end
  3144. logStopTest("05_01_08_04_MultiTasking")
  3145. end
  3146.  
  3147. tcase << TestAction.new(:pressHome_1) do
  3148. pressHome
  3149. end
  3150.  
  3151. tcase.run(loopTime)
  3152.  
  3153. end
  3154.  
  3155. def self.MultiTasking_05_01_08_05(loopTime)
  3156.  
  3157. tcase = TestCase.new("MultiTasking_05_01_08_05")
  3158.  
  3159. tcase << TestAction.new(:scriptAction_StartTestLog) do
  3160. logStartTest("05_01_08_05_MultiTasking")
  3161. end
  3162.  
  3163. tcase << TestAction.new(:gotoApp_1_1) do
  3164. gotoApp('Contacts')
  3165.  
  3166. waitsecond(2)
  3167. end
  3168.  
  3169. tcase << TestAction.new(:gotoApp_1_2) do
  3170. gotoApp('Messaging')
  3171.  
  3172. waitsecond(2)
  3173. end
  3174.  
  3175. tcase << TestAction.new(:gotoApp_1_3) do
  3176. gotoApp('Phone')
  3177.  
  3178. waitsecond(2)
  3179. end
  3180.  
  3181. tcase << TestAction.new(:gotoApp_1_4) do
  3182. gotoApp('Play Store')
  3183.  
  3184. waitsecond(2)
  3185. end
  3186.  
  3187. tcase << TestAction.new(:gotoApp_2) do
  3188. gotoApp('Camera')
  3189.  
  3190. waitsecond(2)
  3191. end
  3192.  
  3193. tcase << TestAction.new(:gotoApp_1_5) do
  3194. gotoApp('Chrome')
  3195.  
  3196. waitsecond(2)
  3197. end
  3198.  
  3199. tcase << TestAction.new(:ImageButton_MenuButton_2) do
  3200. $ruiObj = RUIObject.new.with('objectid', 286278959).with('selfid', -17041368).with('textdescid', 536559428).with('uniqueparentid', 0)
  3201. .with('uitreeindex', 15)
  3202. .with('classname', 'ImageButton')
  3203. .with('resource-id', 'com.android.chrome:id/menu_button')
  3204. .with('content-desc', 'More options')
  3205.  
  3206. $ruiObj.isExist
  3207.  
  3208. waitsecond(0)
  3209. end
  3210.  
  3211. tcase << TestAction.new(:scriptAction_LogStopTest) do
  3212. $myTestResult = checkLastExistResult
  3213. if $myTestResult == false
  3214. $myFailReason = "End button not found"
  3215. end
  3216. logStopTest("05_01_08_05_MultiTasking")
  3217. end
  3218.  
  3219. tcase << TestAction.new(:pressBack_3) do
  3220. pressBack
  3221. end
  3222.  
  3223. tcase << TestAction.new(:pressBack_4) do
  3224. pressBack
  3225. end
  3226.  
  3227. tcase.run(loopTime)
  3228.  
  3229. end
  3230.  
  3231. def self.MultiTasking_05_01_08_06(loopTime)
  3232.  
  3233. tcase = TestCase.new("MultiTasking_05_01_08_06")
  3234.  
  3235. tcase << TestAction.new(:scriptAction_StartTestLog) do
  3236. logStartTest("05_01_08_06_MultiTasking")
  3237. end
  3238.  
  3239. tcase << TestAction.new(:gotoApp_1_1) do
  3240. gotoApp('Chrome')
  3241.  
  3242. waitsecond(2)
  3243. end
  3244.  
  3245. tcase << TestAction.new(:ImageButton_MenuButton_2) do
  3246. $ruiObj = RUIObject.new.with('objectid', 286278959).with('selfid', -17041368).with('textdescid', 536559428).with('uniqueparentid', 0)
  3247. .with('uitreeindex', 101)
  3248. .with('classname', 'ImageButton')
  3249. .with('resource-id', 'com.android.chrome:id/menu_button')
  3250. .with('content-desc', 'More options')
  3251.  
  3252. $ruiObj.isExist
  3253.  
  3254. waitsecond(0)
  3255. end
  3256.  
  3257. tcase << TestAction.new(:scriptAction_LogStopTest) do
  3258. $myTestResult = checkLastExistResult
  3259.  
  3260. if $myTestResult == false
  3261. $myFailReason = "End button not found"
  3262. end
  3263. logStopTest("05_01_08_06_MultiTasking")
  3264. end
  3265.  
  3266. tcase << TestAction.new(:pressHome_1) do
  3267. pressHome
  3268. end
  3269.  
  3270. tcase.run(loopTime)
  3271.  
  3272. end
  3273.  
  3274. def self.NFC_05_01_11_01(loopTime)
  3275.  
  3276. tcase = TestCase.new("NFC_05_01_11_01")
  3277.  
  3278. tcase << TestAction.new(:scriptAction_StartTestLog) do
  3279. logStartTest("05_01_11_01_NFC")
  3280. end
  3281.  
  3282. tcase << TestAction.new(:gotoApp_3) do
  3283. gotoApp('Settings')
  3284.  
  3285. waitsecond(2)
  3286. end
  3287.  
  3288. tcase << TestAction.new(:TextView_Title_2) do
  3289. $ruiObj = RUIObject.new.with('objectid', 674368800).with('selfid', -2078686330).with('textdescid', -957350501).with('uniqueparentid', 0)
  3290. .with('uitreeindex', 2)
  3291. .with('classname', 'TextView')
  3292. .with('resource-id', 'android:id/title')
  3293. .with('text', 'Networks')
  3294.  
  3295. $ruiObj.click
  3296.  
  3297. waitsecond(1)
  3298. end
  3299.  
  3300. tcase << TestAction.new(:swipeDown_6) do
  3301. swipe_vertical 500
  3302.  
  3303. waitsecond(2)
  3304. end
  3305.  
  3306. tcase << TestAction.new(:TextView_Title_4) do
  3307. $ruiObj = RUIObject.new.with('objectid', -487328458).with('selfid', 347833004).with('textdescid', -1018549621).with('uniqueparentid', 0).with('classresourceid', 490183159)
  3308. .with('uitreeindex', 28)
  3309. .with('classname', 'TextView')
  3310. .with('resource-id', 'android:id/title')
  3311. .with('text', 'Share connect')
  3312.  
  3313. $ruiObj.click
  3314.  
  3315. waitsecond(1)
  3316. end
  3317.  
  3318. tcase << TestAction.new(:Switch_Switchwidget_25) do
  3319. $ruiObj = RUIObject.new.with('objectid', 2120363415).with('selfid', 2013927764).with('textdescid', -1882088).with('uniqueparentid', 0).with('classresourceid', -1664951417)
  3320. .with('uitreeindex', 7)
  3321. .with('classname', 'Switch')
  3322. .with('resource-id', 'com.android.settings:id/switchWidget')
  3323.  
  3324. $ruiObj.select('ItemFirst').click
  3325.  
  3326. waitsecond(2)
  3327. end
  3328.  
  3329. tcase << TestAction.new(:Button_Button1_5) do
  3330. $ruiObj = RUIObject.new.with('objectid', -1399075268).with('selfid', -1526282700).with('textdescid', -93090416).with('uniqueparentid', 0).with('classresourceid', 1834539358)
  3331. .with('uitreeindex', 3)
  3332. .with('classname', 'Button')
  3333. .with('resource-id', 'android:id/button1')
  3334. .with('text', 'TURN OFF')
  3335.  
  3336. $ruiObj.click
  3337.  
  3338. waitsecond(2)
  3339. end
  3340.  
  3341. tcase << TestAction.new(:wait8second_12) do
  3342. waitsecond(10)
  3343. end
  3344.  
  3345. tcase << TestAction.new(:Switch_Switchwidget_4) do
  3346. $ruiObj = RUIObject.new.with('objectid', 2120363415).with('selfid', 2013927764).with('textdescid', -1882088).with('uniqueparentid', 0).with('classresourceid', -1664951417)
  3347. .with('uitreeindex', 7)
  3348. .with('classname', 'Switch')
  3349. .with('resource-id', 'com.android.settings:id/switchWidget')
  3350.  
  3351. $ruiObj.select('ItemFirst').click
  3352.  
  3353. waitsecond(2)
  3354. end
  3355.  
  3356. tcase << TestAction.new(:wait8second_12_1) do
  3357. waitsecond(10)
  3358. end
  3359.  
  3360. tcase << TestAction.new(:pressBack_7) do
  3361. pressBack
  3362. end
  3363.  
  3364. tcase << TestAction.new(:pressBack_8) do
  3365. pressBack
  3366. end
  3367.  
  3368. tcase << TestAction.new(:pressBack_18) do
  3369. pressBack
  3370. end
  3371.  
  3372. tcase << TestAction.new(:pressBack_18_1) do
  3373. pressBack
  3374. end
  3375.  
  3376. tcase << TestAction.new(:pressHome_2) do
  3377. pressHome
  3378. end
  3379.  
  3380. tcase << TestAction.new(:scriptAction_LogStopTest) do
  3381. $myTestResult = checkLastExistResult
  3382.  
  3383. if $myTestResult == false
  3384. $myFailReason = "End button not found"
  3385. end
  3386. logStopTest("05_01_11_01_NFC")
  3387. end
  3388.  
  3389. tcase.run(loopTime)
  3390.  
  3391. end
  3392.  
  3393. def self.PIM_05_01_06_01(loopTime)
  3394.  
  3395. tcase = TestCase.new("PIM_05_01_06_01")
  3396.  
  3397. tcase << TestAction.new(:scriptAction_StartTestLog) do
  3398. logStartTest("05_01_06_01_PIM")
  3399. end
  3400.  
  3401. tcase << TestAction.new(:gotoApp_4) do
  3402. gotoApp('Calendar')
  3403.  
  3404. waitsecond(2)
  3405. end
  3406.  
  3407. tcase << TestAction.new(:ImageView_3) do
  3408. $ruiObj = RUIObject.new.with('objectid', -30724256).with('selfid', 1125864064).with('textdescid', -952451904).with('uniqueparentid', 0)
  3409. .with('uitreeindex', 23)
  3410. .with('pretext', 'SAT')
  3411. .with('classname', 'ImageView')
  3412.  
  3413. $ruiObj.click
  3414.  
  3415. waitsecond(2)
  3416. end
  3417.  
  3418. tcase << TestAction.new(:EditText_Title_7) do
  3419. $ruiObj = RUIObject.new.with('objectid', -308497519).with('selfid', 2023914653).with('textdescid', -973488465).with('uniqueparentid', 0).with('classresourceid', 1943514993)
  3420. .with('uitreeindex', 4)
  3421. .with('classname', 'EditText')
  3422. .with('resource-id', 'com.android.calendar:id/title')
  3423.  
  3424. $ruiObj.inputtext('Event')
  3425.  
  3426. waitsecond(2)
  3427. end
  3428.  
  3429. tcase << TestAction.new(:Button_BtnDone_9) do
  3430. $ruiObj = RUIObject.new.with('objectid', 2099795980).with('selfid', 2133354936).with('textdescid', -644044497).with('uniqueparentid', 0)
  3431. .with('uitreeindex', 32)
  3432. .with('classname', 'Button')
  3433. .with('resource-id', 'com.android.calendar:id/btn_done')
  3434. .with('text', 'SAVE')
  3435.  
  3436. $ruiObj.click
  3437.  
  3438. waitsecond(2)
  3439. end
  3440.  
  3441. tcase << TestAction.new(:wait1second_11) do
  3442. waitsecond(1)
  3443. end
  3444.  
  3445. tcase << TestAction.new(:scriptAction_LogStopTest) do
  3446. $myTestResult = checkLastExistResult
  3447.  
  3448. if $myTestResult == false
  3449. $myFailReason = "End button not found"
  3450. end
  3451. logStopTest("05_01_06_01_PIM")
  3452. end
  3453.  
  3454. tcase << TestAction.new(:pressBack_14) do
  3455. pressBack
  3456. end
  3457.  
  3458. tcase << TestAction.new(:pressBack_16) do
  3459. pressBack
  3460. end
  3461.  
  3462. tcase << TestAction.new(:pressHome_2) do
  3463. pressHome
  3464. end
  3465.  
  3466. tcase.run(loopTime)
  3467.  
  3468. end
  3469.  
  3470. def self.PIM_05_01_06_02(loopTime)
  3471.  
  3472. tcase = TestCase.new("PIM_05_01_06_02")
  3473.  
  3474. tcase << TestAction.new(:scriptAction_StartTestLog) do
  3475. logStartTest("05_01_06_02_PIM")
  3476. end
  3477.  
  3478. tcase << TestAction.new(:gotoApp_21) do
  3479. gotoApp('Clock')
  3480.  
  3481. waitsecond(2)
  3482. end
  3483.  
  3484. tcase << TestAction.new(:Button_Button1_2) do
  3485. $ruiObj = RUIObject.new.with('objectid', -1592541968).with('selfid', -1318451484).with('textdescid', 1176208020).with('uniqueparentid', 0)
  3486. .with('uitreeindex', 4)
  3487. .with('classname', 'Button')
  3488. .with('resource-id', 'android:id/button1')
  3489. .with('text', 'OK')
  3490.  
  3491. $ruiObj.click
  3492.  
  3493. waitsecond(2)
  3494. end
  3495.  
  3496. tcase << TestAction.new(:TextView_Title_4) do
  3497. $ruiObj = RUIObject.new.with('objectid', 1224190759).with('selfid', -1121994128).with('textdescid', 1363275560).with('uniqueparentid', 0)
  3498. .with('uitreeindex', 2)
  3499. .with('classname', 'TextView')
  3500. .with('resource-id', 'android:id/title')
  3501. .with('text', 'Alarm')
  3502.  
  3503. $ruiObj.click
  3504.  
  3505. waitsecond(2)
  3506. end
  3507.  
  3508. tcase << TestAction.new(:ImageView_Fab_5) do
  3509. $ruiObj = RUIObject.new.with('objectid', -476403250).with('selfid', -466463568).with('textdescid', -1883598830).with('uniqueparentid', 0)
  3510. .with('uitreeindex', 8)
  3511. .with('classname', 'ImageView')
  3512. .with('resource-id', 'com.lge.clock:id/fab')
  3513.  
  3514. $ruiObj.click
  3515.  
  3516. waitsecond(2)
  3517. end
  3518.  
  3519. tcase << TestAction.new(:swipeDown_7) do
  3520. swipe_vertical 500
  3521.  
  3522. waitsecond(2)
  3523. end
  3524.  
  3525. tcase << TestAction.new(:EditText_MemoInput_9) do
  3526. $ruiObj = RUIObject.new.with('objectid', -560595495).with('selfid', 370574885).with('textdescid', -198591129).with('uniqueparentid', 0).with('classresourceid', -1797104135)
  3527. .with('uitreeindex', 23)
  3528. .with('classname', 'EditText')
  3529. .with('resource-id', 'com.lge.clock:id/memo_input')
  3530.  
  3531. $ruiObj.inputtext('Alarm1')
  3532.  
  3533. waitsecond(2)
  3534. end
  3535.  
  3536. tcase << TestAction.new(:Button_Savebutton_12) do
  3537. $ruiObj = RUIObject.new.with('objectid', -902674558).with('selfid', -575419535).with('textdescid', -816404443).with('uniqueparentid', 0)
  3538. .with('uitreeindex', 30)
  3539. .with('classname', 'Button')
  3540. .with('resource-id', 'com.lge.clock:id/saveButton')
  3541. .with('text', 'SAVE')
  3542.  
  3543. $ruiObj.click
  3544.  
  3545. waitsecond(2)
  3546. end
  3547.  
  3548. tcase << TestAction.new(:wait1second_14) do
  3549. waitsecond(1)
  3550. end
  3551.  
  3552. tcase << TestAction.new(:Switch_AlarmListItemButton_16) do
  3553. $ruiObj = RUIObject.new.with('objectid', -104098710).with('selfid', -385149075).with('textdescid', 1204227435).with('uniqueparentid', 0)
  3554. .with('uitreeindex', 10)
  3555. .with('classname', 'Switch')
  3556. .with('resource-id', 'com.lge.clock:id/alarm_list_item_button')
  3557. .with('text', 'ON')
  3558.  
  3559. $ruiObj.isExist
  3560.  
  3561. waitsecond(2)
  3562. end
  3563.  
  3564. tcase << TestAction.new(:scriptAction_LogStopTest) do
  3565. $myTestResult = checkLastExistResult
  3566.  
  3567. if $myTestResult == false
  3568. $myFailReason = "End button not found"
  3569. end
  3570. logStopTest("05_01_06_02_PIM")
  3571. end
  3572.  
  3573. tcase << TestAction.new(:pressBack_7) do
  3574. pressBack
  3575. end
  3576.  
  3577. tcase << TestAction.new(:pressBack_20) do
  3578. pressBack
  3579. end
  3580.  
  3581. tcase << TestAction.new(:pressHome_2) do
  3582. pressHome
  3583. end
  3584.  
  3585. tcase.run(loopTime)
  3586.  
  3587. end
  3588.  
  3589. def self.PIM_05_01_06_03(loopTime)
  3590.  
  3591. tcase = TestCase.new("PIM_05_01_06_03")
  3592.  
  3593. tcase << TestAction.new(:scriptAction_StartTestLog) do
  3594. logStartTest("05_01_06_03_PIM")
  3595.  
  3596. waitsecond(1)
  3597. end
  3598.  
  3599. tcase << TestAction.new(:gotoApp_2) do
  3600. gotoApp('Calendar')
  3601.  
  3602. waitsecond(1)
  3603. end
  3604.  
  3605. tcase << TestAction.new(:ImageButton_Open_2) do
  3606. $ruiObj = RUIObject.new.with('objectid', 1598382174).with('selfid', 1589392844).with('textdescid', -1452260343).with('uniqueparentid', 0)
  3607. .with('uitreeindex', 0)
  3608. .with('classname', 'ImageButton')
  3609. .with('content-desc', 'Open navigation drawer')
  3610.  
  3611. $ruiObj.click
  3612.  
  3613. waitsecond(2)
  3614. end
  3615.  
  3616. tcase << TestAction.new(:TextView_ButtonView_7) do
  3617. $ruiObj = RUIObject.new.with('objectid', 603982191).with('selfid', -270658080).with('textdescid', 1995102261).with('uniqueparentid', 0).with('classresourceid', 1399022470)
  3618. .with('uitreeindex', 25)
  3619. .with('classname', 'TextView')
  3620. .with('resource-id', 'com.android.calendar:id/button_view')
  3621. .with('text', 'Day')
  3622.  
  3623. $ruiObj.click
  3624.  
  3625. waitsecond(2)
  3626. end
  3627.  
  3628. tcase << TestAction.new(:ImageButton_More_9) do
  3629. $ruiObj = RUIObject.new.with('objectid', -612680593).with('selfid', 1290820192).with('textdescid', 366665732).with('uniqueparentid', 0)
  3630. .with('uitreeindex', 6)
  3631. .with('classname', 'ImageButton')
  3632. .with('content-desc', 'More options')
  3633.  
  3634. $ruiObj.click
  3635.  
  3636. waitsecond(2)
  3637. end
  3638.  
  3639. tcase << TestAction.new(:TextView_Title_11) do
  3640. $ruiObj = RUIObject.new.with('objectid', 188068915).with('selfid', -342341268).with('textdescid', 1772893384).with('uniqueparentid', 0).with('classresourceid', 490183159)
  3641. .with('uitreeindex', 0)
  3642. .with('classname', 'TextView')
  3643. .with('resource-id', 'android:id/title')
  3644. .with('text', 'Delete')
  3645.  
  3646. $ruiObj.click
  3647.  
  3648. waitsecond(2)
  3649. end
  3650.  
  3651. tcase << TestAction.new(:CheckBox_ActionSelectallCheckbox_16) do
  3652. $ruiObj = RUIObject.new.with('objectid', -855663087).with('selfid', 1343055516).with('textdescid', 1579914132).with('uniqueparentid', 0)
  3653. .with('uitreeindex', 0)
  3654. .with('classname', 'CheckBox')
  3655. .with('resource-id', 'com.android.calendar:id/action_selectall_checkbox')
  3656. .with('text', 'Select all')
  3657.  
  3658. $ruiObj.click
  3659.  
  3660. waitsecond(2)
  3661. end
  3662.  
  3663. tcase << TestAction.new(:Button_DeleteAgenda_18) do
  3664. $ruiObj = RUIObject.new.with('objectid', 572018530).with('selfid', 1307339797).with('textdescid', -303618793).with('uniqueparentid', 0)
  3665. .with('uitreeindex', 16)
  3666. .with('classname', 'Button')
  3667. .with('resource-id', 'com.android.calendar:id/delete_agenda')
  3668. .with('text', 'DELETE')
  3669.  
  3670. $ruiObj.click
  3671.  
  3672. waitsecond(2)
  3673. end
  3674.  
  3675. tcase << TestAction.new(:Button_Button1_20) do
  3676. $ruiObj = RUIObject.new.with('objectid', -122532739).with('selfid', 982364851).with('textdescid', 1617680178).with('uniqueparentid', 0)
  3677. .with('uitreeindex', 2)
  3678. .with('classname', 'Button')
  3679. .with('resource-id', 'android:id/button1')
  3680. .with('text', 'DELETE')
  3681.  
  3682. $ruiObj.click
  3683.  
  3684. waitsecond(2)
  3685. end
  3686.  
  3687. tcase << TestAction.new(:wait1second_22) do
  3688. waitsecond(1)
  3689. end
  3690.  
  3691. tcase << TestAction.new(:ImageButton_Open_24) do
  3692. $ruiObj = RUIObject.new.with('objectid', 1598382174).with('selfid', 1589392844).with('textdescid', -1452260343).with('uniqueparentid', 0)
  3693. .with('uitreeindex', 0)
  3694. .with('classname', 'ImageButton')
  3695. .with('content-desc', 'Open navigation drawer')
  3696.  
  3697. $ruiObj.click
  3698.  
  3699. waitsecond(2)
  3700. end
  3701.  
  3702. tcase << TestAction.new(:TextView_ButtonView_26) do
  3703. $ruiObj = RUIObject.new.with('objectid', 603982191).with('selfid', 1899312068).with('textdescid', 2008206737).with('uniqueparentid', 0).with('classresourceid', 1399022470)
  3704. .with('uitreeindex', 18)
  3705. .with('classname', 'TextView')
  3706. .with('resource-id', 'com.android.calendar:id/button_view')
  3707. .with('text', 'Month')
  3708.  
  3709. $ruiObj.click
  3710.  
  3711. waitsecond(2)
  3712. end
  3713.  
  3714. tcase << TestAction.new(:scriptAction_LogStopTest) do
  3715. $myTestResult = checkLastExistResult
  3716.  
  3717. if $myTestResult == false
  3718. $myFailReason = "End button not found"
  3719. end
  3720. logStopTest("05_01_06_03_PIM")
  3721. end
  3722.  
  3723. tcase << TestAction.new(:pressBack_9) do
  3724. pressBack
  3725. end
  3726.  
  3727. tcase << TestAction.new(:pressBack_28) do
  3728. pressBack
  3729. end
  3730.  
  3731. tcase << TestAction.new(:pressHome_2) do
  3732. pressHome
  3733. end
  3734.  
  3735. tcase.run(loopTime)
  3736.  
  3737. end
  3738.  
  3739. def self.PIM_05_01_06_04(loopTime)
  3740.  
  3741. tcase = TestCase.new("PIM_05_01_06_04")
  3742.  
  3743. tcase << TestAction.new(:scriptAction_StartTestLog) do
  3744. logStartTest("05_01_06_04_PIM")
  3745. end
  3746.  
  3747. tcase << TestAction.new(:gotoApp_21) do
  3748. gotoApp('Clock')
  3749.  
  3750. waitsecond(2)
  3751. end
  3752.  
  3753. tcase << TestAction.new(:TextView_Title_21) do
  3754. $ruiObj = RUIObject.new.with('objectid', -322510520).with('selfid', -1121994128).with('textdescid', 2047918567).with('uniqueparentid', 0)
  3755. .with('uitreeindex', 2)
  3756. .with('classname', 'TextView')
  3757. .with('resource-id', 'android:id/title')
  3758. .with('text', 'Alarm')
  3759.  
  3760. $ruiObj.click
  3761.  
  3762. waitsecond(1)
  3763. end
  3764.  
  3765. tcase << TestAction.new(:TextView_DeleteAlarmMenu_5) do
  3766. $ruiObj = RUIObject.new.with('objectid', -627640121).with('selfid', 2100473433).with('textdescid', 1981482564).with('uniqueparentid', 0)
  3767. .with('uitreeindex', 1)
  3768. .with('classname', 'TextView')
  3769. .with('resource-id', 'com.lge.clock:id/delete_alarm_menu')
  3770. .with('content-desc', 'Delete')
  3771.  
  3772. $ruiObj.click
  3773.  
  3774. waitsecond(1)
  3775. end
  3776.  
  3777. tcase << TestAction.new(:CheckBox_Checkall_4) do
  3778. $ruiObj = RUIObject.new.with('objectid', 856038081).with('selfid', 2027227245).with('textdescid', 767376767).with('uniqueparentid', 0)
  3779. .with('uitreeindex', 0)
  3780. .with('classname', 'CheckBox')
  3781. .with('resource-id', 'com.lge.clock:id/checkall')
  3782.  
  3783. $ruiObj.click
  3784.  
  3785. waitsecond(2)
  3786. end
  3787.  
  3788. tcase << TestAction.new(:Button_BtnDelete_6) do
  3789. $ruiObj = RUIObject.new.with('objectid', -568781847).with('selfid', 1633729950).with('textdescid', 1056600734).with('uniqueparentid', 0)
  3790. .with('uitreeindex', 15)
  3791. .with('classname', 'Button')
  3792. .with('resource-id', 'com.lge.clock:id/btn_Delete')
  3793. .with('text', 'DELETE')
  3794.  
  3795. $ruiObj.click
  3796.  
  3797. waitsecond(2)
  3798. end
  3799.  
  3800. tcase << TestAction.new(:Button_Button1_4) do
  3801. $ruiObj = RUIObject.new.with('objectid', -242247236).with('selfid', 982364851).with('textdescid', 1048802673).with('uniqueparentid', 0).with('classresourceid', 1834539358)
  3802. .with('uitreeindex', 2)
  3803. .with('classname', 'Button')
  3804. .with('resource-id', 'android:id/button1')
  3805. .with('text', 'DELETE')
  3806.  
  3807. $ruiObj.click
  3808.  
  3809. waitsecond(2)
  3810. end
  3811.  
  3812. tcase << TestAction.new(:TextView_NoContentsText_5) do
  3813. $ruiObj = RUIObject.new.with('objectid', -906561874).with('selfid', 2062356648).with('textdescid', -1982958191).with('uniqueparentid', 0)
  3814. .with('uitreeindex', 6)
  3815. .with('classname', 'TextView')
  3816. .with('resource-id', 'com.lge.clock:id/no_contents_text')
  3817. .with('text', 'No alarms')
  3818.  
  3819. $ruiObj.isExist
  3820.  
  3821. waitsecond(1)
  3822. end
  3823.  
  3824. tcase << TestAction.new(:pressBack_15) do
  3825. pressBack
  3826. end
  3827.  
  3828. tcase << TestAction.new(:pressBack_16) do
  3829. pressBack
  3830. end
  3831.  
  3832. tcase << TestAction.new(:pressHome_2) do
  3833. pressHome
  3834. end
  3835.  
  3836. tcase << TestAction.new(:scriptAction_LogStopTest) do
  3837. $myTestResult = checkLastExistResult
  3838.  
  3839. if $myTestResult == false
  3840. $myFailReason = "End button not found"
  3841. end
  3842. logStopTest("05_01_06_04_PIM")
  3843. end
  3844.  
  3845. tcase.run(loopTime)
  3846.  
  3847. end
  3848.  
  3849. def self.StoreFrontDownload_05_01_05_01(loopTime)
  3850.  
  3851. tcase = TestCase.new("StoreFrontDownload_05_01_05_01")
  3852.  
  3853. tcase << TestAction.new(:scriptAction_1) do
  3854. logStartTest("05_01_05_07_StoreFrontDownload")
  3855. end
  3856.  
  3857. tcase << TestAction.new(:gotoApp_2) do
  3858. gotoApp('Play Store')
  3859.  
  3860. waitsecond(1)
  3861. end
  3862.  
  3863. tcase << TestAction.new(:ImageView_SearchBoxIdleText_5) do
  3864. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
  3865. .with('uitreeindex', 32)
  3866. .with('classname', 'ImageView')
  3867. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  3868. .with('content-desc', 'Search')
  3869.  
  3870. $ruiObj.click
  3871.  
  3872. waitsecond(1)
  3873. end
  3874.  
  3875. tcase << TestAction.new(:EditText_SearchBoxTextInput_6) do
  3876. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
  3877. .with('uitreeindex', 32)
  3878. .with('classname', 'EditText')
  3879. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  3880.  
  3881. $ruiObj.inputtext('ColorNote')
  3882.  
  3883. waitsecond(1)
  3884. end
  3885.  
  3886. tcase << TestAction.new(:TextView_SuggestText_7_Click_ColorNote) do
  3887. $ruiObj = RUIObject.new.with('objectid', 193809363).with('selfid', 208620854).with('textdescid', 1052874934).with('uniqueparentid', 0)
  3888. .with('uitreeindex', 36)
  3889. .with('classname', 'TextView')
  3890. .with('resource-id', 'com.android.vending:id/suggest_text')
  3891. .with('text', 'ColorNote Notepad Notes')
  3892.  
  3893. $ruiObj.click
  3894.  
  3895. waitsecond(1)
  3896. end
  3897.  
  3898. tcase << TestAction.new(:TextView_LiTitle_2) do
  3899. $ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', -1969590474).with('textdescid', 83190698).with('uniqueparentid', 0)
  3900. .with('uitreeindex', 5)
  3901. .with('classname', 'TextView')
  3902. .with('resource-id', 'com.android.vending:id/li_title')
  3903. .with('content-desc', 'App: ColorNote Notepad Notes')
  3904. .with('text', 'ColorNote Notepad Notes')
  3905.  
  3906. $ruiObj.click
  3907.  
  3908. waitsecond(1)
  3909. end
  3910.  
  3911. tcase << TestAction.new(:Button_UninstallButton_15_pressed) do
  3912. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  3913. .with('uitreeindex', 7)
  3914. .with('classname', 'Button')
  3915. .with('resource-id', 'com.android.vending:id/uninstall_button')
  3916. .with('text', 'UNINSTALL')
  3917.  
  3918. $ruiObj.click
  3919.  
  3920. waitsecond(1)
  3921. end
  3922.  
  3923. tcase << TestAction.new(:Button_Button1_16_pressed_OK) do
  3924. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', 0)
  3925. .with('uitreeindex', 2)
  3926. .with('classname', 'Button')
  3927. .with('resource-id', 'android:id/button1')
  3928. .with('text', 'OK')
  3929.  
  3930. $ruiObj.click
  3931.  
  3932. waitsecond(8)
  3933. end
  3934.  
  3935. tcase << TestAction.new(:Button_BuyButton_1_1) do
  3936. $ruiObj = RUIObject.new.with('objectid', -329901969).with('selfid', -652886121).with('textdescid', 992432790).with('uniqueparentid', 0)
  3937. .with('uitreeindex', 7)
  3938. .with('classname', 'Button')
  3939. .with('resource-id', 'com.android.vending:id/buy_button')
  3940. .with('text', 'INSTALL')
  3941.  
  3942. $ruiObj.click
  3943.  
  3944. waitsecond(2)
  3945. end
  3946.  
  3947. tcase << TestAction.new(:Button_PositiveButton_2_1) do
  3948. $ruiObj = RUIObject.new.with('objectid', 1281581194).with('selfid', -1901489946).with('textdescid', -1976674237).with('uniqueparentid', 0)
  3949. .with('uitreeindex', 2)
  3950. .with('classname', 'Button')
  3951. .with('resource-id', 'com.android.vending:id/positive_button')
  3952. .with('text', 'CONTINUE')
  3953.  
  3954. $ruiObj.click
  3955.  
  3956. waitsecond(2)
  3957. end
  3958.  
  3959. tcase << TestAction.new(:scriptAction_CheckPass) do
  3960. $myTestResult = checkLastExistResult
  3961.  
  3962. if $myTestResult == false
  3963. $myFailReason == "Install Failed"
  3964. end
  3965. logStopTest("05_01_05_07_StoreFrontDownload")
  3966. end
  3967.  
  3968. tcase << TestAction.new(:pressBack_16) do
  3969. pressBack
  3970. end
  3971.  
  3972. tcase << TestAction.new(:pressBack_17) do
  3973. pressBack
  3974. end
  3975.  
  3976. tcase << TestAction.new(:pressHome_19) do
  3977. pressHome
  3978. end
  3979.  
  3980. tcase.run(loopTime)
  3981.  
  3982. end
  3983.  
  3984. def self.StoreFrontDownload_05_01_05_02(loopTime)
  3985.  
  3986. tcase = TestCase.new("StoreFrontDownload_05_01_05_02")
  3987.  
  3988. tcase << TestAction.new(:scriptAction_1) do
  3989. logStartTest("05_01_05_02_StoreFrontDownload")
  3990. end
  3991.  
  3992. tcase << TestAction.new(:gotoApp_2) do
  3993. gotoApp('Play Store')
  3994.  
  3995. waitsecond(8)
  3996. end
  3997.  
  3998. tcase << TestAction.new(:ImageView_SearchBoxIdleText_5) do
  3999. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
  4000. .with('uitreeindex', 32)
  4001. .with('classname', 'ImageView')
  4002. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  4003. .with('content-desc', 'Search')
  4004.  
  4005. $ruiObj.click
  4006.  
  4007. waitsecond(1)
  4008. end
  4009.  
  4010. tcase << TestAction.new(:EditText_SearchBoxTextInput_6) do
  4011. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
  4012. .with('uitreeindex', 32)
  4013. .with('classname', 'EditText')
  4014. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  4015.  
  4016. $ruiObj.inputtext('ColorNote')
  4017.  
  4018. waitsecond(1)
  4019. end
  4020.  
  4021. tcase << TestAction.new(:pressEnter_2) do
  4022. pressEnter
  4023.  
  4024. waitsecond(4)
  4025. end
  4026.  
  4027. tcase << TestAction.new(:TextView_LiTitle_4) do
  4028. $ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', -1969590474).with('textdescid', 83190698).with('uniqueparentid', 0)
  4029. .with('uitreeindex', 5)
  4030. .with('classname', 'TextView')
  4031. .with('resource-id', 'com.android.vending:id/li_title')
  4032. .with('content-desc', 'App: ColorNote Notepad Notes')
  4033. .with('text', 'ColorNote Notepad Notes')
  4034.  
  4035. $ruiObj.click
  4036.  
  4037. waitsecond(2)
  4038. end
  4039.  
  4040. tcase << TestAction.new(:Button_UninstallButton_UnInstall_exist) do
  4041. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  4042. .with('uitreeindex', 7)
  4043. .with('classname', 'Button')
  4044. .with('resource-id', 'com.android.vending:id/uninstall_button')
  4045. .with('text', 'UNINSTALL')
  4046.  
  4047. $ruiObj.isExist
  4048. ifFailJumpTo(:Button_BuyButton_1)
  4049.  
  4050. waitsecond(1)
  4051. end
  4052.  
  4053. tcase << TestAction.new(:Button_UninstallButton_UninstallCK_1) do
  4054. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  4055. .with('uitreeindex', 7)
  4056. .with('classname', 'Button')
  4057. .with('resource-id', 'com.android.vending:id/uninstall_button')
  4058. .with('text', 'UNINSTALL')
  4059.  
  4060. $ruiObj.click
  4061.  
  4062. waitsecond(1)
  4063. end
  4064.  
  4065. tcase << TestAction.new(:Button_Button1_Clk_OK) do
  4066. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', 0)
  4067. .with('uitreeindex', 2)
  4068. .with('classname', 'Button')
  4069. .with('resource-id', 'android:id/button1')
  4070. .with('text', 'OK')
  4071.  
  4072. $ruiObj.click
  4073.  
  4074. waitsecond(8)
  4075. end
  4076.  
  4077. tcase << TestAction.new(:Button_BuyButton_1) do
  4078. $ruiObj = RUIObject.new.with('objectid', 1237348910).with('selfid', -652886121).with('textdescid', 538738615).with('uniqueparentid', 0)
  4079. .with('uitreeindex', 7)
  4080. .with('classname', 'Button')
  4081. .with('resource-id', 'com.android.vending:id/buy_button')
  4082. .with('text', 'INSTALL')
  4083.  
  4084. $ruiObj.click
  4085.  
  4086. waitsecond(2)
  4087. end
  4088.  
  4089. tcase << TestAction.new(:Button_ContinueButton_2) do
  4090. $ruiObj = RUIObject.new.with('objectid', -1553570735).with('selfid', 1461394585).with('textdescid', 1663670089).with('uniqueparentid', 0)
  4091. .with('uitreeindex', 7)
  4092. .with('classname', 'Button')
  4093. .with('resource-id', 'com.android.vending:id/continue_button')
  4094. .with('text', 'ACCEPT')
  4095.  
  4096. $ruiObj.click
  4097.  
  4098. waitsecond(8)
  4099. end
  4100.  
  4101. tcase << TestAction.new(:Button_Button1_2) do
  4102. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', 1349887951).with('textdescid', -101886821).with('uniqueparentid', 0)
  4103. .with('uitreeindex', 1)
  4104. .with('classname', 'Button')
  4105. .with('resource-id', 'android:id/button1')
  4106. .with('text', 'Continue')
  4107.  
  4108. $ruiObj.click
  4109.  
  4110. waitsecond(8)
  4111. end
  4112.  
  4113. tcase << TestAction.new(:Button_UninstallButton_4) do
  4114. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  4115. .with('uitreeindex', 7)
  4116. .with('classname', 'Button')
  4117. .with('resource-id', 'com.android.vending:id/uninstall_button')
  4118. .with('text', 'UNINSTALL')
  4119.  
  4120. $ruiObj.isExist
  4121.  
  4122. waitsecond(1)
  4123. end
  4124.  
  4125. tcase << TestAction.new(:scriptAction_CheckPass) do
  4126. $myTestResult = checkLastExistResult
  4127.  
  4128. if $myTestResult == false
  4129. $myFailReason == "Install Failed"
  4130. end
  4131. logStopTest("05_01_05_02_StoreFrontDownload")
  4132. end
  4133.  
  4134. tcase << TestAction.new(:pressBack_16) do
  4135. pressBack
  4136. end
  4137.  
  4138. tcase << TestAction.new(:pressBack_17) do
  4139. pressBack
  4140. end
  4141.  
  4142. tcase << TestAction.new(:pressHome_19) do
  4143. pressHome
  4144. end
  4145.  
  4146. tcase.run(loopTime)
  4147.  
  4148. end
  4149.  
  4150. def self.StoreFrontDownload_05_01_05_03(loopTime)
  4151.  
  4152. tcase = TestCase.new("StoreFrontDownload_05_01_05_03")
  4153.  
  4154. tcase << TestAction.new(:scriptAction_1) do
  4155. logStartTest("05_01_05_02_StoreFrontDownload")
  4156. end
  4157.  
  4158. tcase << TestAction.new(:gotoApp_2) do
  4159. gotoApp('Play Store')
  4160.  
  4161. waitsecond(4)
  4162. end
  4163.  
  4164. tcase << TestAction.new(:ImageView_SearchBoxIdleText_5) do
  4165. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
  4166. .with('uitreeindex', 32)
  4167. .with('classname', 'ImageView')
  4168. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  4169. .with('content-desc', 'Search')
  4170.  
  4171. $ruiObj.click
  4172.  
  4173. waitsecond(1)
  4174. end
  4175.  
  4176. tcase << TestAction.new(:EditText_SearchBoxTextInput_6) do
  4177. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
  4178. .with('uitreeindex', 32)
  4179. .with('classname', 'EditText')
  4180. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  4181.  
  4182. $ruiObj.inputtext('ColorNote')
  4183.  
  4184. waitsecond(1)
  4185. end
  4186.  
  4187. tcase << TestAction.new(:pressEnter_2) do
  4188. pressEnter
  4189.  
  4190. waitsecond(4)
  4191. end
  4192.  
  4193. tcase << TestAction.new(:Button_UNINSTALL_2) do
  4194. $ruiObj = RUIObject.new.with('objectid', 2010819753).with('selfid', 1103650544).with('textdescid', -1596508299).with('uniqueparentid', 0)
  4195. .with('uitreeindex', 16)
  4196. .with('classname', 'Button')
  4197. .with('text', 'UNINSTALL')
  4198.  
  4199. $ruiObj.click
  4200.  
  4201. waitsecond(2)
  4202. end
  4203.  
  4204. tcase << TestAction.new(:Button_Button1_Clk_OK) do
  4205. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', 0)
  4206. .with('uitreeindex', 2)
  4207. .with('classname', 'Button')
  4208. .with('resource-id', 'android:id/button1')
  4209. .with('text', 'OK')
  4210.  
  4211. $ruiObj.click
  4212.  
  4213. waitsecond(8)
  4214. end
  4215.  
  4216. tcase << TestAction.new(:Button_INSTALL_4) do
  4217. $ruiObj = RUIObject.new.with('objectid', 2010819753).with('selfid', 998476585).with('textdescid', 841801628).with('uniqueparentid', 0)
  4218. .with('uitreeindex', 17)
  4219. .with('classname', 'Button')
  4220. .with('text', 'INSTALL')
  4221.  
  4222. $ruiObj.click
  4223.  
  4224. waitsecond(2)
  4225. end
  4226.  
  4227. tcase << TestAction.new(:Button_PositiveButton_4) do
  4228. $ruiObj = RUIObject.new.with('objectid', 1281581194).with('selfid', -1901489946).with('textdescid', -1976674237).with('uniqueparentid', 0)
  4229. .with('uitreeindex', 2)
  4230. .with('classname', 'Button')
  4231. .with('resource-id', 'com.android.vending:id/positive_button')
  4232. .with('text', 'CONTINUE')
  4233.  
  4234. $ruiObj.click
  4235.  
  4236. waitsecond(2)
  4237. end
  4238.  
  4239. tcase << TestAction.new(:wait1second_6) do
  4240. waitsecond(1)
  4241. end
  4242.  
  4243. tcase << TestAction.new(:Button_UNINSTALL_6) do
  4244. $ruiObj = RUIObject.new.with('objectid', 2010819753).with('selfid', 1103650544).with('textdescid', -1596508299).with('uniqueparentid', 0)
  4245. .with('uitreeindex', 16)
  4246. .with('classname', 'Button')
  4247. .with('text', 'UNINSTALL')
  4248.  
  4249. $ruiObj.isExist
  4250.  
  4251. waitsecond(0)
  4252. end
  4253.  
  4254. tcase << TestAction.new(:scriptAction_CheckPass) do
  4255. $myTestResult = checkLastExistResult
  4256.  
  4257. if $myTestResult == false
  4258. $myFailReason == "Install Failed"
  4259. end
  4260. logStopTest("05_01_05_02_StoreFrontDownload")
  4261. end
  4262.  
  4263. tcase << TestAction.new(:pressBack_16) do
  4264. pressBack
  4265. end
  4266.  
  4267. tcase << TestAction.new(:pressBack_17) do
  4268. pressBack
  4269. end
  4270.  
  4271. tcase << TestAction.new(:pressHome_19) do
  4272. pressHome
  4273. end
  4274.  
  4275. tcase.run(loopTime)
  4276.  
  4277. end
  4278.  
  4279. def self.StoreFrontDownload_05_01_05_04(loopTime)
  4280.  
  4281. tcase = TestCase.new("StoreFrontDownload_05_01_05_04")
  4282.  
  4283. tcase << TestAction.new(:scriptAction_1) do
  4284. logStartTest("05_01_05_07_StoreFrontDownload")
  4285. end
  4286.  
  4287. tcase << TestAction.new(:gotoApp_2) do
  4288. gotoApp('Play Store')
  4289.  
  4290. waitsecond(1)
  4291. end
  4292.  
  4293. tcase << TestAction.new(:ImageView_SearchBoxIdleText_5) do
  4294. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
  4295. .with('uitreeindex', 32)
  4296. .with('classname', 'ImageView')
  4297. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  4298. .with('content-desc', 'Search')
  4299.  
  4300. $ruiObj.click
  4301.  
  4302. waitsecond(1)
  4303. end
  4304.  
  4305. tcase << TestAction.new(:EditText_SearchBoxTextInput_6) do
  4306. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
  4307. .with('uitreeindex', 32)
  4308. .with('classname', 'EditText')
  4309. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  4310.  
  4311. $ruiObj.inputtext('ColorNote')
  4312.  
  4313. waitsecond(2)
  4314. end
  4315.  
  4316. tcase << TestAction.new(:TextView_SuggestText_7_Click_ColorNote) do
  4317. $ruiObj = RUIObject.new.with('objectid', 193809363).with('selfid', 208620854).with('textdescid', 1052874934).with('uniqueparentid', 0)
  4318. .with('uitreeindex', 36)
  4319. .with('classname', 'TextView')
  4320. .with('resource-id', 'com.android.vending:id/suggest_text')
  4321. .with('text', 'ColorNote Notepad Notes')
  4322.  
  4323. $ruiObj.click
  4324.  
  4325. waitsecond(2)
  4326. end
  4327.  
  4328. tcase << TestAction.new(:Button_UninstallButton_15_pressed) do
  4329. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  4330. .with('uitreeindex', 7)
  4331. .with('classname', 'Button')
  4332. .with('resource-id', 'com.android.vending:id/uninstall_button')
  4333. .with('text', 'UNINSTALL')
  4334.  
  4335. $ruiObj.click
  4336.  
  4337. waitsecond(2)
  4338. end
  4339.  
  4340. tcase << TestAction.new(:Button_Button1_16_pressed_OK) do
  4341. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', 0)
  4342. .with('uitreeindex', 2)
  4343. .with('classname', 'Button')
  4344. .with('resource-id', 'android:id/button1')
  4345. .with('text', 'OK')
  4346.  
  4347. $ruiObj.click
  4348.  
  4349. waitsecond(8)
  4350. end
  4351.  
  4352. tcase << TestAction.new(:Button_BuyButton_1_1) do
  4353. $ruiObj = RUIObject.new.with('objectid', -329901969).with('selfid', -652886121).with('textdescid', 992432790).with('uniqueparentid', 0)
  4354. .with('uitreeindex', 7)
  4355. .with('classname', 'Button')
  4356. .with('resource-id', 'com.android.vending:id/buy_button')
  4357. .with('text', 'INSTALL')
  4358.  
  4359. $ruiObj.click
  4360.  
  4361. waitsecond(2)
  4362. end
  4363.  
  4364. tcase << TestAction.new(:scriptAction_CheckPass) do
  4365. $myTestResult = checkLastExistResult
  4366.  
  4367. if $myTestResult == false
  4368. $myFailReason == "Install Failed"
  4369. end
  4370. logStopTest("05_01_05_07_StoreFrontDownload")
  4371. end
  4372.  
  4373. tcase << TestAction.new(:pressBack_16) do
  4374. pressBack
  4375. end
  4376.  
  4377. tcase << TestAction.new(:pressBack_17) do
  4378. pressBack
  4379. end
  4380.  
  4381. tcase << TestAction.new(:pressHome_19) do
  4382. pressHome
  4383. end
  4384.  
  4385. tcase.run(loopTime)
  4386.  
  4387. end
  4388.  
  4389. def self.StoreFrontDownload_05_01_05_05(loopTime)
  4390.  
  4391. tcase = TestCase.new("StoreFrontDownload_05_01_05_05")
  4392.  
  4393. tcase << TestAction.new(:scriptAction_1) do
  4394. logStartTest("05_01_05_05_StoreFrontDownload")
  4395. end
  4396.  
  4397. tcase << TestAction.new(:gotoApp_2) do
  4398. gotoApp('ColorNote')
  4399.  
  4400. waitsecond(2)
  4401. end
  4402.  
  4403. tcase << TestAction.new(:Button_PermissionAllowButton_2) do
  4404. $ruiObj = RUIObject.new.with('objectid', -886457929).with('selfid', 1443382411).with('textdescid', 270556320).with('uniqueparentid', 0)
  4405. .with('uitreeindex', 3)
  4406. .with('classname', 'Button')
  4407. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  4408. .with('text', 'ALLOW')
  4409.  
  4410. $ruiObj.click
  4411.  
  4412. waitsecond(1)
  4413. end
  4414.  
  4415. tcase << TestAction.new(:TextView_EmptyText_AddNoteCK) do
  4416. $ruiObj = RUIObject.new.with('objectid', -1225710509).with('selfid', -126164144).with('textdescid', -1803056542).with('uniqueparentid', 0)
  4417. .with('uitreeindex', 6)
  4418. .with('classname', 'TextView')
  4419. .with('resource-id', 'com.socialnmobile.dictapps.notepad.color.note:id/empty_text')
  4420. .with('text', 'Add Note')
  4421.  
  4422. $ruiObj.isExist
  4423.  
  4424. waitsecond(1)
  4425. end
  4426.  
  4427. tcase << TestAction.new(:pressBack_4) do
  4428. pressBack
  4429. end
  4430.  
  4431. tcase << TestAction.new(:scriptAction_True_False) do
  4432. $myTestResult = checkLastExistResult
  4433.  
  4434. if $myTestResult == false
  4435. $myFailReason == "Store Front is not loaded"
  4436. end
  4437. logStopTest("05_01_05_05_StoreFrontDownload")
  4438. end
  4439.  
  4440. tcase << TestAction.new(:pressHome_1) do
  4441. pressHome
  4442. end
  4443.  
  4444. tcase.run(loopTime)
  4445.  
  4446. end
  4447.  
  4448. def self.StoreFrontDownload_05_01_05_06(loopTime)
  4449.  
  4450. tcase = TestCase.new("StoreFrontDownload_05_01_05_06")
  4451.  
  4452. tcase << TestAction.new(:scriptAction_1) do
  4453. logStartTest("05_01_05_06_StoreFrontDownload")
  4454. end
  4455.  
  4456. tcase << TestAction.new(:gotoApp_2) do
  4457. gotoApp('Play Store')
  4458.  
  4459. waitsecond(1)
  4460. end
  4461.  
  4462. tcase << TestAction.new(:ImageView_SearchBoxIdleText_12) do
  4463. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
  4464. .with('uitreeindex', 28)
  4465. .with('classname', 'ImageView')
  4466. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  4467. .with('content-desc', 'Search')
  4468.  
  4469. $ruiObj.click
  4470.  
  4471. waitsecond(1)
  4472. end
  4473.  
  4474. tcase << TestAction.new(:EditText_SearchBoxTextInput_13) do
  4475. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
  4476. .with('uitreeindex', 28)
  4477. .with('classname', 'EditText')
  4478. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  4479.  
  4480. $ruiObj.inputtext('ColorNote')
  4481.  
  4482. waitsecond(1)
  4483. end
  4484.  
  4485. tcase << TestAction.new(:TextView_SuggestText_16) do
  4486. $ruiObj = RUIObject.new.with('objectid', 193809363).with('selfid', 208620854).with('textdescid', 1052874934).with('uniqueparentid', 0)
  4487. .with('uitreeindex', 32)
  4488. .with('classname', 'TextView')
  4489. .with('resource-id', 'com.android.vending:id/suggest_text')
  4490. .with('text', 'ColorNote Notepad Notes')
  4491.  
  4492. $ruiObj.click
  4493.  
  4494. waitsecond(1)
  4495. end
  4496.  
  4497. tcase << TestAction.new(:TextView_LiTitle_2) do
  4498. $ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', -1969590474).with('textdescid', 83190698).with('uniqueparentid', 0)
  4499. .with('uitreeindex', 5)
  4500. .with('classname', 'TextView')
  4501. .with('resource-id', 'com.android.vending:id/li_title')
  4502. .with('content-desc', 'App: ColorNote Notepad Notes')
  4503. .with('text', 'ColorNote Notepad Notes')
  4504.  
  4505. $ruiObj.click
  4506.  
  4507. waitsecond(1)
  4508. end
  4509.  
  4510. tcase << TestAction.new(:Button_LaunchButton_18) do
  4511. $ruiObj = RUIObject.new.with('objectid', 515078971).with('selfid', 328139855).with('textdescid', 387228145).with('uniqueparentid', 0)
  4512. .with('uitreeindex', 8)
  4513. .with('classname', 'Button')
  4514. .with('resource-id', 'com.android.vending:id/launch_button')
  4515. .with('text', 'OPEN')
  4516.  
  4517. $ruiObj.click
  4518.  
  4519. waitsecond(1)
  4520. end
  4521.  
  4522. tcase << TestAction.new(:TextView_EmptyText_AddNoteCK) do
  4523. $ruiObj = RUIObject.new.with('objectid', -1225710509).with('selfid', -126164144).with('textdescid', -1803056542).with('uniqueparentid', 0)
  4524. .with('uitreeindex', 6)
  4525. .with('classname', 'TextView')
  4526. .with('resource-id', 'com.socialnmobile.dictapps.notepad.color.note:id/empty_text')
  4527. .with('text', 'Add Note')
  4528.  
  4529. $ruiObj.isExist
  4530.  
  4531. waitsecond(1)
  4532. end
  4533.  
  4534. tcase << TestAction.new(:Button_PermissionAllowButton_1_1) do
  4535. $ruiObj = RUIObject.new.with('objectid', -886457929).with('selfid', 1443382411).with('textdescid', 270556320).with('uniqueparentid', 0)
  4536. .with('uitreeindex', 3)
  4537. .with('classname', 'Button')
  4538. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  4539. .with('text', 'ALLOW')
  4540.  
  4541. $ruiObj.click
  4542.  
  4543. waitsecond(2)
  4544. end
  4545.  
  4546. tcase << TestAction.new(:pressBack_20) do
  4547. pressBack
  4548. end
  4549.  
  4550. tcase << TestAction.new(:scriptAction_22) do
  4551. $myTestResult = checkLastExistResult
  4552.  
  4553. if $myTestResult == false
  4554. $myFailReason == "Open DL app from Store Front Fail"
  4555. end
  4556. logStopTest("05_01_05_06_StoreFrontDownload")
  4557. end
  4558.  
  4559. tcase << TestAction.new(:pressBack_23) do
  4560. pressBack
  4561. end
  4562.  
  4563. tcase << TestAction.new(:pressBack_2) do
  4564. pressBack
  4565. end
  4566.  
  4567. tcase << TestAction.new(:pressHome_2) do
  4568. pressHome
  4569. end
  4570.  
  4571. tcase.run(loopTime)
  4572.  
  4573. end
  4574.  
  4575. def self.StoreFrontDownload_05_01_05_07(loopTime)
  4576.  
  4577. tcase = TestCase.new("StoreFrontDownload_05_01_05_07")
  4578.  
  4579. tcase << TestAction.new(:scriptAction_1) do
  4580. logStartTest("05_01_05_07_StoreFrontDownload")
  4581. end
  4582.  
  4583. tcase << TestAction.new(:gotoApp_2) do
  4584. gotoApp('Play Store')
  4585.  
  4586. waitsecond(1)
  4587. end
  4588.  
  4589. tcase << TestAction.new(:ImageView_SearchBoxIdleText_5) do
  4590. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
  4591. .with('uitreeindex', 32)
  4592. .with('classname', 'ImageView')
  4593. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  4594. .with('content-desc', 'Search')
  4595.  
  4596. $ruiObj.click
  4597.  
  4598. waitsecond(1)
  4599. end
  4600.  
  4601. tcase << TestAction.new(:EditText_SearchBoxTextInput_6) do
  4602. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
  4603. .with('uitreeindex', 32)
  4604. .with('classname', 'EditText')
  4605. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  4606.  
  4607. $ruiObj.inputtext('ColorNote')
  4608.  
  4609. waitsecond(1)
  4610. end
  4611.  
  4612. tcase << TestAction.new(:TextView_SuggestText_7_Click_ColorNote) do
  4613. $ruiObj = RUIObject.new.with('objectid', 193809363).with('selfid', 208620854).with('textdescid', 1052874934).with('uniqueparentid', 0)
  4614. .with('uitreeindex', 36)
  4615. .with('classname', 'TextView')
  4616. .with('resource-id', 'com.android.vending:id/suggest_text')
  4617. .with('text', 'ColorNote Notepad Notes')
  4618.  
  4619. $ruiObj.click
  4620.  
  4621. waitsecond(1)
  4622. end
  4623.  
  4624. tcase << TestAction.new(:TextView_LiTitle_2) do
  4625. $ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', -1969590474).with('textdescid', 83190698).with('uniqueparentid', 0)
  4626. .with('uitreeindex', 5)
  4627. .with('classname', 'TextView')
  4628. .with('resource-id', 'com.android.vending:id/li_title')
  4629. .with('content-desc', 'App: ColorNote Notepad Notes')
  4630. .with('text', 'ColorNote Notepad Notes')
  4631.  
  4632. $ruiObj.click
  4633.  
  4634. waitsecond(1)
  4635. end
  4636.  
  4637. tcase << TestAction.new(:Button_UninstallButton_15_pressed) do
  4638. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  4639. .with('uitreeindex', 7)
  4640. .with('classname', 'Button')
  4641. .with('resource-id', 'com.android.vending:id/uninstall_button')
  4642. .with('text', 'UNINSTALL')
  4643.  
  4644. $ruiObj.click
  4645.  
  4646. waitsecond(1)
  4647. end
  4648.  
  4649. tcase << TestAction.new(:Button_Button1_16_pressed_OK) do
  4650. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', 0)
  4651. .with('uitreeindex', 2)
  4652. .with('classname', 'Button')
  4653. .with('resource-id', 'android:id/button1')
  4654. .with('text', 'OK')
  4655.  
  4656. $ruiObj.click
  4657.  
  4658. waitsecond(8)
  4659. end
  4660.  
  4661. tcase << TestAction.new(:Button_BuyButton_18_Install) do
  4662. $ruiObj = RUIObject.new.with('objectid', 1237348910).with('selfid', -652886121).with('textdescid', 538738615).with('uniqueparentid', 0)
  4663. .with('uitreeindex', 7)
  4664. .with('classname', 'Button')
  4665. .with('resource-id', 'com.android.vending:id/buy_button')
  4666. .with('text', 'INSTALL')
  4667.  
  4668. $ruiObj.isExist
  4669.  
  4670. waitsecond(1)
  4671. end
  4672.  
  4673. tcase << TestAction.new(:scriptAction_CheckPass) do
  4674. $myTestResult = checkLastExistResult
  4675.  
  4676. if $myTestResult == false
  4677. $myFailReason == "Install Failed"
  4678. end
  4679. logStopTest("05_01_05_07_StoreFrontDownload")
  4680. end
  4681.  
  4682. tcase << TestAction.new(:pressBack_16) do
  4683. pressBack
  4684. end
  4685.  
  4686. tcase << TestAction.new(:pressBack_17) do
  4687. pressBack
  4688. end
  4689.  
  4690. tcase << TestAction.new(:pressHome_19) do
  4691. pressHome
  4692. end
  4693.  
  4694. tcase.run(loopTime)
  4695.  
  4696. end
  4697.  
  4698. def self.StoreFrontDownload_05_01_05_08(loopTime)
  4699.  
  4700. tcase = TestCase.new("StoreFrontDownload_05_01_05_08")
  4701.  
  4702. tcase << TestAction.new(:scriptAction_1) do
  4703. logStartTest("05_01_05_02_StoreFrontDownload")
  4704. end
  4705.  
  4706. tcase << TestAction.new(:gotoApp_2) do
  4707. gotoApp('Play Store')
  4708.  
  4709. waitsecond(8)
  4710. end
  4711.  
  4712. tcase << TestAction.new(:ImageView_SearchBoxIdleText_5) do
  4713. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
  4714. .with('uitreeindex', 32)
  4715. .with('classname', 'ImageView')
  4716. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  4717. .with('content-desc', 'Search')
  4718.  
  4719. $ruiObj.click
  4720.  
  4721. waitsecond(1)
  4722. end
  4723.  
  4724. tcase << TestAction.new(:EditText_SearchBoxTextInput_6) do
  4725. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
  4726. .with('uitreeindex', 32)
  4727. .with('classname', 'EditText')
  4728. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  4729.  
  4730. $ruiObj.inputtext('ColorNote')
  4731.  
  4732. waitsecond(1)
  4733. end
  4734.  
  4735. tcase << TestAction.new(:pressEnter_2) do
  4736. pressEnter
  4737.  
  4738. waitsecond(4)
  4739. end
  4740.  
  4741. tcase << TestAction.new(:TextView_LiTitle_2) do
  4742. $ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', -1969590474).with('textdescid', 83190698).with('uniqueparentid', 0)
  4743. .with('uitreeindex', 1)
  4744. .with('classname', 'TextView')
  4745. .with('resource-id', 'com.android.vending:id/li_title')
  4746. .with('content-desc', 'App: ColorNote Notepad Notes')
  4747. .with('text', 'ColorNote Notepad Notes')
  4748.  
  4749. $ruiObj.click
  4750.  
  4751. waitsecond(2)
  4752. end
  4753.  
  4754. tcase << TestAction.new(:Button_UninstallButton_UnInstall_exist) do
  4755. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  4756. .with('uitreeindex', 7)
  4757. .with('classname', 'Button')
  4758. .with('resource-id', 'com.android.vending:id/uninstall_button')
  4759. .with('text', 'UNINSTALL')
  4760.  
  4761. $ruiObj.isExist
  4762. ifFailJumpTo(:Button_BuyButton_1)
  4763.  
  4764. waitsecond(1)
  4765. end
  4766.  
  4767. tcase << TestAction.new(:Button_UninstallButton_UninstallCK_1) do
  4768. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  4769. .with('uitreeindex', 7)
  4770. .with('classname', 'Button')
  4771. .with('resource-id', 'com.android.vending:id/uninstall_button')
  4772. .with('text', 'UNINSTALL')
  4773.  
  4774. $ruiObj.click
  4775.  
  4776. waitsecond(1)
  4777. end
  4778.  
  4779. tcase << TestAction.new(:Button_Button1_Clk_OK) do
  4780. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', 0)
  4781. .with('uitreeindex', 2)
  4782. .with('classname', 'Button')
  4783. .with('resource-id', 'android:id/button1')
  4784. .with('text', 'OK')
  4785.  
  4786. $ruiObj.click
  4787.  
  4788. waitsecond(8)
  4789. end
  4790.  
  4791. tcase << TestAction.new(:Button_BuyButton_1) do
  4792. $ruiObj = RUIObject.new.with('objectid', 1237348910).with('selfid', -652886121).with('textdescid', 538738615).with('uniqueparentid', 0)
  4793. .with('uitreeindex', 7)
  4794. .with('classname', 'Button')
  4795. .with('resource-id', 'com.android.vending:id/buy_button')
  4796. .with('text', 'INSTALL')
  4797.  
  4798. $ruiObj.click
  4799.  
  4800. waitsecond(2)
  4801. end
  4802.  
  4803. tcase << TestAction.new(:Button_PositiveButton_4) do
  4804. $ruiObj = RUIObject.new.with('objectid', 1281581194).with('selfid', -1901489946).with('textdescid', -1976674237).with('uniqueparentid', 0)
  4805. .with('uitreeindex', 2)
  4806. .with('classname', 'Button')
  4807. .with('resource-id', 'com.android.vending:id/positive_button')
  4808. .with('text', 'CONTINUE')
  4809.  
  4810. $ruiObj.click
  4811.  
  4812. waitsecond(2)
  4813. end
  4814.  
  4815. tcase << TestAction.new(:wait1second_6) do
  4816. waitsecond(1)
  4817. end
  4818.  
  4819. tcase << TestAction.new(:Button_UninstallButton_4) do
  4820. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  4821. .with('uitreeindex', 7)
  4822. .with('classname', 'Button')
  4823. .with('resource-id', 'com.android.vending:id/uninstall_button')
  4824. .with('text', 'UNINSTALL')
  4825.  
  4826. $ruiObj.isExist
  4827.  
  4828. waitsecond(1)
  4829. end
  4830.  
  4831. tcase << TestAction.new(:scriptAction_CheckPass) do
  4832. $myTestResult = checkLastExistResult
  4833.  
  4834. if $myTestResult == false
  4835. $myFailReason == "Install Failed"
  4836. end
  4837. logStopTest("05_01_05_02_StoreFrontDownload")
  4838. end
  4839.  
  4840. tcase << TestAction.new(:pressBack_16) do
  4841. pressBack
  4842. end
  4843.  
  4844. tcase << TestAction.new(:pressBack_17) do
  4845. pressBack
  4846. end
  4847.  
  4848. tcase << TestAction.new(:pressHome_19) do
  4849. pressHome
  4850. end
  4851.  
  4852. tcase.run(loopTime)
  4853.  
  4854. end
  4855.  
  4856. def self.Telephony_05_01_01_01(loopTime)
  4857.  
  4858. tcase = TestCase.new("Telephony_05_01_01_01")
  4859.  
  4860. tcase << TestAction.new(:scriptAction_StartTest_1) do
  4861. logStartTest("05_01_01_01_Telephony")
  4862. end
  4863.  
  4864. tcase << TestAction.new(:pressHome_4) do
  4865. pressHome
  4866. end
  4867.  
  4868. tcase << TestAction.new(:TextView_Phone_2) do
  4869. $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
  4870. .with('uitreeindex', 9)
  4871. .with('classname', 'TextView')
  4872. .with('content-desc', 'Phone')
  4873. .with('text', 'Phone')
  4874.  
  4875. $ruiObj.click
  4876.  
  4877. waitsecond(1)
  4878. end
  4879.  
  4880. tcase << TestAction.new(:TextView_Tabtext_2) do
  4881. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
  4882. .with('uitreeindex', 4)
  4883. .with('classname', 'TextView')
  4884. .with('resource-id', 'com.android.contacts:id/tabText')
  4885. .with('text', 'Contacts')
  4886.  
  4887. $ruiObj.click
  4888.  
  4889. waitsecond(1)
  4890. end
  4891.  
  4892. tcase << TestAction.new(:TextView_MenuUnifiedSearch_2) do
  4893. $ruiObj = RUIObject.new.with('objectid', 706565921).with('selfid', 1315899886).with('textdescid', 449577447).with('uniqueparentid', 0)
  4894. .with('uitreeindex', 1)
  4895. .with('classname', 'TextView')
  4896. .with('resource-id', 'com.android.contacts:id/menu_unified_search')
  4897. .with('content-desc', 'Search')
  4898.  
  4899. $ruiObj.click
  4900.  
  4901. waitsecond(1)
  4902. end
  4903.  
  4904. tcase << TestAction.new(:EditText_SearchSrcText_4) do
  4905. $ruiObj = RUIObject.new.with('objectid', 588070375).with('selfid', -959326622).with('textdescid', -497243406).with('uniqueparentid', 0)
  4906. .with('uitreeindex', 6)
  4907. .with('classname', 'EditText')
  4908. .with('resource-id', 'android:id/search_src_text')
  4909. .with('content-desc', 'Search contacts')
  4910.  
  4911. $ruiObj.inputtext('A01')
  4912.  
  4913. waitsecond(1)
  4914. end
  4915.  
  4916. tcase << TestAction.new(:scriptAction_10_1) do
  4917. sendBTCmd('pressHome')
  4918. end
  4919.  
  4920. tcase << TestAction.new(:ImageView_Button1_4) do
  4921. $ruiObj = RUIObject.new.with('objectid', 527611238).with('selfid', 643737864).with('textdescid', -1665703716).with('uniqueparentid', 0).with('classresourceid', -1143292048)
  4922. .with('uitreeindex', 7)
  4923. .with('pretext', 'A01 a01?0')
  4924. .with('classname', 'ImageView')
  4925. .with('resource-id', 'android:id/button1')
  4926. .with('content-desc', 'Call A01 a01')
  4927.  
  4928. $ruiObj.click
  4929.  
  4930. waitsecond(12)
  4931. end
  4932.  
  4933. tcase << TestAction.new(:scriptAction_10) do
  4934. sendBTCmd('answerCall')
  4935.  
  4936. waitsecond(8)
  4937. end
  4938.  
  4939. tcase << TestAction.new(:scriptAction_10_1) do
  4940. sendBTCmd('endCall')
  4941.  
  4942. waitsecond(1)
  4943. end
  4944.  
  4945. tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
  4946. $myTestResult = checkLastBTCmdResult
  4947. if $myTestResult == false
  4948. $myFailReason = "Call not come to other dev"
  4949. end
  4950. logStopTest("05_01_01_01_Telephony")
  4951.  
  4952. end
  4953.  
  4954. tcase << TestAction.new(:Button_Endbutton_2) do
  4955. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  4956. .with('uitreeindex', 8)
  4957. .with('classname', 'Button')
  4958. .with('resource-id', 'com.android.incallui:id/endButton')
  4959. .with('text', 'End')
  4960.  
  4961. $ruiObj.click
  4962.  
  4963. waitsecond(1)
  4964. end
  4965.  
  4966. tcase << TestAction.new(:pressBack_3) do
  4967. pressBack
  4968. end
  4969.  
  4970. tcase << TestAction.new(:pressBack_4) do
  4971. pressBack
  4972. end
  4973.  
  4974. tcase.run(loopTime)
  4975.  
  4976. end
  4977.  
  4978. def self.Telephony_05_01_01_03(loopTime)
  4979.  
  4980. tcase = TestCase.new("Telephony_05_01_01_03")
  4981.  
  4982. tcase << TestAction.new(:scriptAction_StartTest_1) do
  4983. logStartTest("05_01_01_03_Telephony")
  4984. end
  4985.  
  4986. tcase << TestAction.new(:gotoApp_1_1) do
  4987. gotoApp('Phone')
  4988. end
  4989.  
  4990. tcase << TestAction.new(:TextView_Tabtext_2) do
  4991. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 715664122).with('textdescid', 24268628).with('uniqueparentid', 0)
  4992. .with('uitreeindex', 3)
  4993. .with('classname', 'TextView')
  4994. .with('resource-id', 'com.android.contacts:id/tabText')
  4995. .with('text', 'Call logs')
  4996.  
  4997. $ruiObj.click
  4998.  
  4999. waitsecond(2)
  5000. end
  5001.  
  5002. tcase << TestAction.new(:ImageView_SecondaryActionIcon_4) do
  5003. $ruiObj = RUIObject.new.with('objectid', 1053896352).with('selfid', -1241359936).with('textdescid', 579079266).with('uniqueparentid', 0).with('classresourceid', -550590844)
  5004. .with('uitreeindex', 9)
  5005. .with('classname', 'ImageView')
  5006. .with('resource-id', 'com.android.contacts:id/secondary_action_icon')
  5007. .with('content-desc', 'Call A01 a01')
  5008.  
  5009. $ruiObj.click
  5010.  
  5011. waitsecond(2)
  5012. end
  5013.  
  5014. tcase << TestAction.new(:wait8second_31) do
  5015. waitsecond(8)
  5016. end
  5017.  
  5018. tcase << TestAction.new(:scriptAction_10_1) do
  5019. sendBTCmd('answerCall')
  5020.  
  5021. waitsecond(8)
  5022. end
  5023.  
  5024. tcase << TestAction.new(:scriptAction_10_1_1) do
  5025. sendBTCmd('endCall')
  5026.  
  5027. waitsecond(1)
  5028. end
  5029.  
  5030. tcase << TestAction.new(:scriptAction_LogStopTest) do
  5031. $myTestResult = checkLastBTCmdResult
  5032. if $myTestResult == false
  5033. $myFailReason = "Call not come to other dev"
  5034. end
  5035. logStopTest("05_01_01_03_Telephony")
  5036.  
  5037. end
  5038.  
  5039. tcase << TestAction.new(:Button_Endbutton_6) do
  5040. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  5041. .with('uitreeindex', 8)
  5042. .with('classname', 'Button')
  5043. .with('resource-id', 'com.android.incallui:id/endButton')
  5044. .with('text', 'End')
  5045.  
  5046. $ruiObj.click
  5047.  
  5048. waitsecond(1)
  5049. end
  5050.  
  5051. tcase << TestAction.new(:pressBack_1) do
  5052. pressBack
  5053. end
  5054.  
  5055. tcase << TestAction.new(:pressBack_2) do
  5056. pressBack
  5057. end
  5058.  
  5059. tcase << TestAction.new(:pressHome_6) do
  5060. pressHome
  5061. end
  5062.  
  5063. tcase.run(loopTime)
  5064.  
  5065. end
  5066.  
  5067. def self.Telephony_05_01_01_05(loopTime)
  5068.  
  5069. tcase = TestCase.new("Telephony_05_01_01_05")
  5070.  
  5071. tcase << TestAction.new(:pressHome_2) do
  5072. pressHome
  5073. end
  5074.  
  5075. tcase << TestAction.new(:scriptAction_StartTestLog_1) do
  5076. logStartTest("05_01_01_05_Telephony")
  5077. end
  5078.  
  5079. tcase << TestAction.new(:scriptAction_BTMakeCall) do
  5080. sendBTCmd("makeCall(#{db('CallNumber')[0]}.to_s)")
  5081.  
  5082. waitsecond(8)
  5083. end
  5084.  
  5085. tcase << TestAction.new(:wait8second_12) do
  5086. waitsecond(18)
  5087. end
  5088.  
  5089. tcase << TestAction.new(:wait8second_14) do
  5090. waitsecond(8)
  5091. end
  5092.  
  5093. tcase << TestAction.new(:answerSwipe_1) do
  5094. $UIDev.swipe(288,2083.5,828,1192.5,10)
  5095.  
  5096.  
  5097. waitsecond(8)
  5098. end
  5099.  
  5100. tcase << TestAction.new(:Button_Endbutton_2_1) do
  5101. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  5102. .with('uitreeindex', 10)
  5103. .with('classname', 'Button')
  5104. .with('resource-id', 'com.android.incallui:id/endButton')
  5105. .with('text', 'End')
  5106.  
  5107. $ruiObj.isExist
  5108.  
  5109. waitsecond(0)
  5110. end
  5111.  
  5112. tcase << TestAction.new(:scriptAction_LogStopTest_1) do
  5113. $myTestResult = checkLastExistResult
  5114. if $myTestResult == false
  5115. $myFailReason = "End button not found"
  5116. end
  5117. logStopTest("05_01_01_05_Telephony")
  5118.  
  5119. end
  5120.  
  5121. tcase << TestAction.new(:Button_Endbutton_2_1_1) do
  5122. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  5123. .with('uitreeindex', 10)
  5124. .with('classname', 'Button')
  5125. .with('resource-id', 'com.android.incallui:id/endButton')
  5126. .with('text', 'End')
  5127.  
  5128. $ruiObj.click
  5129.  
  5130. waitsecond(0)
  5131. end
  5132.  
  5133. tcase << TestAction.new(:pressBack_1) do
  5134. pressBack
  5135. end
  5136.  
  5137. tcase << TestAction.new(:pressBack_2) do
  5138. pressBack
  5139. end
  5140.  
  5141. tcase << TestAction.new(:pressHome_24) do
  5142. pressHome
  5143.  
  5144. waitsecond(0)
  5145. end
  5146.  
  5147. tcase.run(loopTime)
  5148.  
  5149. end
  5150.  
  5151. def self.Telephony_05_01_01_06(loopTime)
  5152.  
  5153. tcase = TestCase.new("Telephony_05_01_01_06")
  5154.  
  5155. tcase << TestAction.new(:scriptAction_StartTestLog) do
  5156. logStartTest("05_01_01_06_Telephony")
  5157. end
  5158.  
  5159. tcase << TestAction.new(:gotoApp_3) do
  5160. gotoApp('Phone')
  5161. end
  5162.  
  5163. tcase << TestAction.new(:TextView_Tabtext_2) do
  5164. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
  5165. .with('uitreeindex', 4)
  5166. .with('classname', 'TextView')
  5167. .with('resource-id', 'com.android.contacts:id/tabText')
  5168. .with('text', 'Contacts')
  5169.  
  5170. $ruiObj.click
  5171.  
  5172. waitsecond(1)
  5173. end
  5174.  
  5175. tcase << TestAction.new(:TextView_MenuUnifiedSearch_2) do
  5176. $ruiObj = RUIObject.new.with('objectid', 706565921).with('selfid', 1315899886).with('textdescid', 449577447).with('uniqueparentid', 0)
  5177. .with('uitreeindex', 1)
  5178. .with('classname', 'TextView')
  5179. .with('resource-id', 'com.android.contacts:id/menu_unified_search')
  5180. .with('content-desc', 'Search')
  5181.  
  5182. $ruiObj.click
  5183.  
  5184. waitsecond(1)
  5185. end
  5186.  
  5187. tcase << TestAction.new(:EditText_SearchSrcText_2) do
  5188. $ruiObj = RUIObject.new.with('objectid', 588070375).with('selfid', -959326622).with('textdescid', -497243406).with('uniqueparentid', 0)
  5189. .with('uitreeindex', 6)
  5190. .with('classname', 'EditText')
  5191. .with('resource-id', 'android:id/search_src_text')
  5192. .with('content-desc', 'Search contacts')
  5193.  
  5194. $ruiObj.inputtext('tn tn')
  5195.  
  5196. waitsecond(1)
  5197. end
  5198.  
  5199. tcase << TestAction.new(:TextView_tn_6) do
  5200. $ruiObj = RUIObject.new.with('objectid', 1836583107).with('selfid', -71120562).with('textdescid', 984860861).with('uniqueparentid', 0).with('classresourceid', -938935918)
  5201. .with('uitreeindex', 13)
  5202. .with('classname', 'TextView')
  5203. .with('content-desc', 'tn tn')
  5204. .with('text', 'tn tn')
  5205.  
  5206. $ruiObj.select('ItemFirst').click
  5207.  
  5208. waitsecond(1)
  5209. end
  5210.  
  5211. tcase << TestAction.new(:TextView_MenuDelete_2) do
  5212. $ruiObj = RUIObject.new.with('objectid', -1318735913).with('selfid', 1219450656).with('textdescid', 2068859689).with('uniqueparentid', 0)
  5213. .with('uitreeindex', 23)
  5214. .with('pretext', 'NOTIFICATION SOUND')
  5215. .with('classname', 'TextView')
  5216. .with('resource-id', 'com.android.contacts:id/menu_delete')
  5217.  
  5218. $ruiObj.click
  5219.  
  5220. waitsecond(1)
  5221. end
  5222.  
  5223. tcase << TestAction.new(:Button_Button1_43) do
  5224. $ruiObj = RUIObject.new.with('objectid', -195446968).with('selfid', 982364851).with('textdescid', -1387444483).with('uniqueparentid', 0)
  5225. .with('uitreeindex', 2)
  5226. .with('classname', 'Button')
  5227. .with('resource-id', 'android:id/button1')
  5228. .with('text', 'DELETE')
  5229.  
  5230. $ruiObj.isExist
  5231.  
  5232. waitsecond(1)
  5233. end
  5234.  
  5235. tcase << TestAction.new(:Button_Button1_22_1) do
  5236. $ruiObj = RUIObject.new.with('objectid', -195446968).with('selfid', -1318451484).with('textdescid', 917278956).with('uniqueparentid', 0)
  5237. .with('uitreeindex', 2)
  5238. .with('classname', 'Button')
  5239. .with('resource-id', 'android:id/button1')
  5240. .with('text', 'OK')
  5241.  
  5242. $ruiObj.click
  5243.  
  5244. waitsecond(1)
  5245. end
  5246.  
  5247. tcase << TestAction.new(:scriptAction_LogStopTest) do
  5248. $myTestResult = checkLastExistResult
  5249. if $myTestResult == false
  5250. $myFailReason = "End button not found"
  5251. end
  5252. logStopTest("05_01_01_06_Telephony")
  5253. end
  5254.  
  5255. tcase << TestAction.new(:pressBack_2) do
  5256. pressBack
  5257. end
  5258.  
  5259. tcase << TestAction.new(:pressBack_3) do
  5260. pressBack
  5261. end
  5262.  
  5263. tcase.run(loopTime)
  5264.  
  5265. end
  5266.  
  5267. def self.Telephony_05_01_01_07(loopTime)
  5268.  
  5269. tcase = TestCase.new("Telephony_05_01_01_07")
  5270.  
  5271. tcase << TestAction.new(:scriptAction_StartTestLog) do
  5272. logStartTest("05_01_01_07_Telephony")
  5273. end
  5274.  
  5275. tcase << TestAction.new(:gotoApp_3) do
  5276. gotoApp('Phone')
  5277.  
  5278. waitsecond(1)
  5279. end
  5280.  
  5281. tcase << TestAction.new(:TextView_Tabtext_2) do
  5282. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
  5283. .with('uitreeindex', 4)
  5284. .with('classname', 'TextView')
  5285. .with('resource-id', 'com.android.contacts:id/tabText')
  5286. .with('text', 'Contacts')
  5287.  
  5288. $ruiObj.click
  5289.  
  5290. waitsecond(1)
  5291. end
  5292.  
  5293. tcase << TestAction.new(:FrameLayout_FloatingActionButtonContainer_2) do
  5294. $ruiObj = RUIObject.new.with('objectid', 565383936).with('selfid', 1632442836).with('textdescid', -1928520608).with('uniqueparentid', 0)
  5295. .with('classname', 'FrameLayout')
  5296. .with('resource-id', 'com.android.contacts:id/floating_action_button_container')
  5297. .with('content-desc', 'New contact')
  5298.  
  5299. $ruiObj.click
  5300.  
  5301. waitsecond(2)
  5302. end
  5303.  
  5304. tcase << TestAction.new(:EditText_14) do
  5305. $ruiObj = RUIObject.new.with('objectid', -2023645967).with('selfid', 1666676343).with('textdescid', 1691484495).with('uniqueparentid', 0).with('classresourceid', 1666676343)
  5306. .with('uitreeindex', 6)
  5307. .with('pretext', 'Phone?0')
  5308. .with('classname', 'EditText')
  5309.  
  5310. $ruiObj.inputtext('tn tn')
  5311.  
  5312. waitsecond(1)
  5313. end
  5314.  
  5315. tcase << TestAction.new(:ImageButton_AddContactButton_2) do
  5316. $ruiObj = RUIObject.new.with('objectid', 168201771).with('selfid', 2046190261).with('textdescid', 1812475979).with('uniqueparentid', 0)
  5317. .with('uitreeindex', 8)
  5318. .with('classname', 'ImageButton')
  5319. .with('resource-id', 'com.android.contacts:id/add_contact_button')
  5320. .with('content-desc', 'New contact')
  5321.  
  5322. $ruiObj.click
  5323.  
  5324. waitsecond(2)
  5325. end
  5326.  
  5327. tcase << TestAction.new(:EditText_4) do
  5328. $ruiObj = RUIObject.new.with('objectid', 1622197326).with('selfid', 1666676343).with('textdescid', -1251490414).with('uniqueparentid', 0).with('classresourceid', 1666676343)
  5329. .with('uitreeindex', 10)
  5330. .with('pretext', 'Phone?1')
  5331. .with('classname', 'EditText')
  5332.  
  5333. $ruiObj.inputtext('00000000')
  5334.  
  5335. waitsecond(1)
  5336. end
  5337.  
  5338. tcase << TestAction.new(:Button_BtnSave_4) do
  5339. $ruiObj = RUIObject.new.with('objectid', 344009592).with('selfid', -1684371128).with('textdescid', -1561576549).with('uniqueparentid', 0)
  5340. .with('uitreeindex', 19)
  5341. .with('classname', 'Button')
  5342. .with('resource-id', 'com.android.contacts:id/btn_save')
  5343. .with('text', 'SAVE')
  5344.  
  5345. $ruiObj.isExist
  5346.  
  5347. waitsecond(1)
  5348. end
  5349.  
  5350. tcase << TestAction.new(:Button_BtnSave_20) do
  5351. $ruiObj = RUIObject.new.with('objectid', 344009592).with('selfid', -1684339352).with('textdescid', -1560591493).with('uniqueparentid', 0)
  5352. .with('uitreeindex', 16)
  5353. .with('classname', 'Button')
  5354. .with('resource-id', 'com.android.contacts:id/btn_save')
  5355. .with('text', 'Save')
  5356.  
  5357. $ruiObj.click
  5358.  
  5359. waitsecond(1)
  5360. end
  5361.  
  5362. tcase << TestAction.new(:scriptAction_LogStopTest) do
  5363. $myTestResult = checkLastExistResult
  5364. if $myTestResult == false
  5365. $myFailReason = "Contact is not saved"
  5366. end
  5367. logStopTest("05_01_01_07_Telephony")
  5368. end
  5369.  
  5370. tcase << TestAction.new(:pressBack_5) do
  5371. pressBack
  5372. end
  5373.  
  5374. tcase << TestAction.new(:pressBack_6) do
  5375. pressBack
  5376. end
  5377.  
  5378. tcase.run(loopTime)
  5379.  
  5380. end
  5381.  
  5382. def self.VideoCall_01(loopTime)
  5383.  
  5384. tcase = TestCase.new("VideoCall_01")
  5385.  
  5386. tcase << TestAction.new(:scriptAction_StartTest_1) do
  5387. logStartTest("VideoCall_01")
  5388. end
  5389.  
  5390. tcase << TestAction.new(:pressHome_4) do
  5391. pressHome
  5392. end
  5393.  
  5394. tcase << TestAction.new(:TextView_Phone_2) do
  5395. $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
  5396. .with('uitreeindex', 9)
  5397. .with('classname', 'TextView')
  5398. .with('content-desc', 'Phone')
  5399. .with('text', 'Phone')
  5400.  
  5401. $ruiObj.click
  5402.  
  5403. waitsecond(1)
  5404. end
  5405.  
  5406. tcase << TestAction.new(:TextView_Tabtext_2) do
  5407. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
  5408. .with('uitreeindex', 4)
  5409. .with('classname', 'TextView')
  5410. .with('resource-id', 'com.android.contacts:id/tabText')
  5411. .with('text', 'Contacts')
  5412.  
  5413. $ruiObj.click
  5414.  
  5415. waitsecond(1)
  5416. end
  5417.  
  5418. tcase << TestAction.new(:EditText_SearchSrcText_2) do
  5419. $ruiObj = RUIObject.new.with('objectid', 588070375).with('selfid', -959326622).with('textdescid', -497243406).with('uniqueparentid', 0)
  5420. .with('uitreeindex', 6)
  5421. .with('classname', 'EditText')
  5422. .with('resource-id', 'android:id/search_src_text')
  5423. .with('content-desc', 'Search contacts')
  5424.  
  5425. $ruiObj.inputtext('A01 a01')
  5426.  
  5427. waitsecond(1)
  5428. end
  5429.  
  5430. tcase << TestAction.new(:TextView_A01_4) do
  5431. $ruiObj = RUIObject.new.with('objectid', -728261803).with('selfid', -2094016618).with('textdescid', -1517178717).with('uniqueparentid', 0).with('classresourceid', -938935918)
  5432. .with('uitreeindex', 12)
  5433. .with('classname', 'TextView')
  5434. .with('content-desc', 'A01 a01')
  5435. .with('text', 'A01 a01')
  5436.  
  5437. $ruiObj.click
  5438.  
  5439. waitsecond(1)
  5440. end
  5441.  
  5442. tcase << TestAction.new(:ImageView_EabActionButton_2) do
  5443. $ruiObj = RUIObject.new.with('objectid', -209436562).with('selfid', 14418249).with('textdescid', 2097401202).with('uniqueparentid', 0).with('classresourceid', -1382351217)
  5444. .with('uitreeindex', 9)
  5445. .with('classname', 'ImageView')
  5446. .with('resource-id', 'com.android.contacts:id/eab_action_button')
  5447.  
  5448. $ruiObj.click
  5449.  
  5450. waitsecond(1)
  5451. end
  5452.  
  5453. tcase << TestAction.new(:wait8second_31) do
  5454. waitsecond(8)
  5455. end
  5456.  
  5457. tcase << TestAction.new(:scriptAction_18_1) do
  5458. sendBTCmd('answerCall')
  5459.  
  5460. waitsecond(8)
  5461. end
  5462.  
  5463. tcase << TestAction.new(:scriptAction_18_1_1) do
  5464. sendBTCmd('endCall')
  5465.  
  5466. waitsecond(2)
  5467. end
  5468.  
  5469. tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
  5470. $myTestResult = checkLastBTCmdResult
  5471. if $myTestResult == false
  5472. $myFailReason = "Call not come to other dev"
  5473. end
  5474. logStopTest("VideoCall_01")
  5475.  
  5476. end
  5477.  
  5478. tcase << TestAction.new(:Button_ButtonEndCall_4) do
  5479. $ruiObj = RUIObject.new.with('objectid', 449066258).with('selfid', 2024460923).with('textdescid', -1859117805).with('uniqueparentid', 0)
  5480. .with('uitreeindex', 8)
  5481. .with('classname', 'Button')
  5482. .with('resource-id', 'com.android.incallui:id/button_end_call')
  5483. .with('text', 'End')
  5484.  
  5485. $ruiObj.click
  5486.  
  5487. waitsecond(1)
  5488. end
  5489.  
  5490. tcase << TestAction.new(:pressBack_3) do
  5491. pressBack
  5492. end
  5493.  
  5494. tcase << TestAction.new(:pressBack_4) do
  5495. pressBack
  5496. end
  5497.  
  5498. tcase.run(loopTime)
  5499.  
  5500. end
  5501.  
  5502. def self.VideoTelephony_05_01_14_01(loopTime)
  5503.  
  5504. tcase = TestCase.new("VideoTelephony_05_01_14_01")
  5505.  
  5506. tcase << TestAction.new(:scriptAction_StartTest_1) do
  5507. logStartTest("VideoCall_01")
  5508. end
  5509.  
  5510. tcase << TestAction.new(:pressHome_1_1) do
  5511. pressHome
  5512.  
  5513. waitsecond(2)
  5514. end
  5515.  
  5516. tcase << TestAction.new(:TextView_Phone_2) do
  5517. $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
  5518. .with('uitreeindex', 9)
  5519. .with('classname', 'TextView')
  5520. .with('content-desc', 'Phone')
  5521. .with('text', 'Phone')
  5522.  
  5523. $ruiObj.click
  5524.  
  5525. waitsecond(1)
  5526. end
  5527.  
  5528. tcase << TestAction.new(:TextView_Tabtext_2) do
  5529. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
  5530. .with('uitreeindex', 4)
  5531. .with('classname', 'TextView')
  5532. .with('resource-id', 'com.android.contacts:id/tabText')
  5533. .with('text', 'Contacts')
  5534.  
  5535. $ruiObj.click
  5536.  
  5537. waitsecond(1)
  5538. end
  5539.  
  5540. tcase << TestAction.new(:EditText_SearchSrcText_2) do
  5541. $ruiObj = RUIObject.new.with('objectid', 588070375).with('selfid', -959326622).with('textdescid', -497243406).with('uniqueparentid', 0)
  5542. .with('uitreeindex', 6)
  5543. .with('classname', 'EditText')
  5544. .with('resource-id', 'android:id/search_src_text')
  5545. .with('content-desc', 'Search contacts')
  5546.  
  5547. $ruiObj.inputtext('A01 a01')
  5548.  
  5549. waitsecond(1)
  5550. end
  5551.  
  5552. tcase << TestAction.new(:TextView_A01_4) do
  5553. $ruiObj = RUIObject.new.with('objectid', -728261803).with('selfid', -2094016618).with('textdescid', -1517178717).with('uniqueparentid', 0).with('classresourceid', -938935918)
  5554. .with('uitreeindex', 12)
  5555. .with('classname', 'TextView')
  5556. .with('content-desc', 'A01 a01')
  5557. .with('text', 'A01 a01')
  5558.  
  5559. $ruiObj.click
  5560.  
  5561. waitsecond(1)
  5562. end
  5563.  
  5564. tcase << TestAction.new(:VideoCallButton) do
  5565. $attVideoCallButton = RUIObject.new.with('objectid', -209436562).with('selfid', 14418249).with('textdescid', 2097401202).with('uniqueparentid', 0).with('classresourceid', -1382351217)
  5566. .with('uitreeindex', 9)
  5567. .with('classname', 'ImageView')
  5568. .with('resource-id', 'com.android.contacts:id/eab_action_button')
  5569.  
  5570. $uplusVideoCallButton = RUIObject.new.with('objectid', -284633982).with('selfid', -1819582550).with('textdescid', -721488607).with('uniqueparentid', 0).with('classresourceid', 745414969)
  5571. .with('uitreeindex', 12)
  5572. .with('classname', 'ImageView')
  5573. .with('resource-id', 'com.android.contacts:id/first_action_button')
  5574. .with('content-desc', 'Video call')
  5575.  
  5576. if $attVideoCallButton.isExist
  5577. $attVideoCallButton.click
  5578. elsif $uplusVideoCallButton.isExist
  5579. $uplusVideoCallButton.click
  5580. end
  5581.  
  5582. waitsecond(2)
  5583. end
  5584.  
  5585. tcase << TestAction.new(:ImageView_FirstActionButton_4) do
  5586. $ruiObj = RUIObject.new.with('objectid', -284633982).with('selfid', -1819582550).with('textdescid', -721488607).with('uniqueparentid', 0).with('classresourceid', 745414969)
  5587. .with('uitreeindex', 12)
  5588. .with('classname', 'ImageView')
  5589. .with('resource-id', 'com.android.contacts:id/first_action_button')
  5590. .with('content-desc', 'Video call')
  5591.  
  5592. $ruiObj.click
  5593.  
  5594. waitsecond(2)
  5595. end
  5596.  
  5597. tcase << TestAction.new(:wait8second_31) do
  5598. waitsecond(8)
  5599. end
  5600.  
  5601. tcase << TestAction.new(:scriptAction_18_1) do
  5602. sendBTCmd('answerCall')
  5603.  
  5604. waitsecond(8)
  5605. end
  5606.  
  5607. tcase << TestAction.new(:TextView_Callstatelabel_1_1) do
  5608. $ruiObj = RUIObject.new.with('objectid', -611515845).with('selfid', -821184504).with('textdescid', -1124622931).with('uniqueparentid', 0)
  5609. .with('uitreeindex', 5)
  5610. .with('classname', 'TextView')
  5611. .with('resource-id', 'com.android.incallui:id/callStateLabel')
  5612. .with('text', 'Incoming call')
  5613.  
  5614. $ruiObj.isNotExist
  5615. end
  5616.  
  5617. tcase << TestAction.new(:scriptAction_18_1_1) do
  5618. endCall
  5619.  
  5620. waitsecond(2)
  5621. end
  5622.  
  5623. tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
  5624. $myTestResult = checkLastBTCmdResult
  5625. if $myTestResult == false
  5626. $myFailReason = "Call not come to other dev"
  5627. end
  5628. logStopTest("VideoCall_01")
  5629.  
  5630. end
  5631.  
  5632. tcase << TestAction.new(:Button_ButtonEndCall_4) do
  5633. $ruiObj = RUIObject.new.with('objectid', 449066258).with('selfid', 2024460923).with('textdescid', -1859117805).with('uniqueparentid', 0)
  5634. .with('uitreeindex', 8)
  5635. .with('classname', 'Button')
  5636. .with('resource-id', 'com.android.incallui:id/button_end_call')
  5637. .with('text', 'End')
  5638.  
  5639. $ruiObj.click
  5640.  
  5641. waitsecond(1)
  5642. end
  5643.  
  5644. tcase << TestAction.new(:pressBack_3) do
  5645. pressBack
  5646. end
  5647.  
  5648. tcase << TestAction.new(:pressBack_4) do
  5649. pressBack
  5650. end
  5651.  
  5652. tcase << TestAction.new(:pressHome_1) do
  5653. pressHome
  5654.  
  5655. waitsecond(2)
  5656. end
  5657.  
  5658. tcase.run(loopTime)
  5659.  
  5660. end
  5661.  
  5662. def self.VideoTelephony_05_01_14_02(loopTime)
  5663.  
  5664. tcase = TestCase.new("VideoTelephony_05_01_14_02")
  5665.  
  5666. tcase << TestAction.new(:scriptAction_StartTest_1) do
  5667. logStartTest("VideoCall_02")
  5668. end
  5669.  
  5670. tcase << TestAction.new(:pressHome_2) do
  5671. pressHome
  5672.  
  5673. waitsecond(2)
  5674. end
  5675.  
  5676. tcase << TestAction.new(:TextView_Phone_2) do
  5677. $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
  5678. .with('uitreeindex', 9)
  5679. .with('classname', 'TextView')
  5680. .with('content-desc', 'Phone')
  5681. .with('text', 'Phone')
  5682.  
  5683. $ruiObj.click
  5684.  
  5685. waitsecond(1)
  5686. end
  5687.  
  5688. tcase << TestAction.new(:TextView_Tabtext_4) do
  5689. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
  5690. .with('uitreeindex', 4)
  5691. .with('classname', 'TextView')
  5692. .with('resource-id', 'com.android.contacts:id/tabText')
  5693. .with('text', 'Contacts')
  5694.  
  5695. $ruiObj.click
  5696.  
  5697. waitsecond(2)
  5698. end
  5699.  
  5700. tcase << TestAction.new(:EditText_SearchSrcText_6) do
  5701. $ruiObj = RUIObject.new.with('objectid', 588070375).with('selfid', -959326622).with('textdescid', -497243406).with('uniqueparentid', 0)
  5702. .with('uitreeindex', 6)
  5703. .with('classname', 'EditText')
  5704. .with('resource-id', 'android:id/search_src_text')
  5705. .with('content-desc', 'Search contacts')
  5706.  
  5707. $ruiObj.inputtext('A01 a01')
  5708.  
  5709. waitsecond(2)
  5710. end
  5711.  
  5712. tcase << TestAction.new(:TextView_A01_8) do
  5713. $ruiObj = RUIObject.new.with('objectid', -728261803).with('selfid', -2094016618).with('textdescid', -1517178717).with('uniqueparentid', 0).with('classresourceid', -938935918)
  5714. .with('uitreeindex', 12)
  5715. .with('classname', 'TextView')
  5716. .with('content-desc', 'A01 a01')
  5717. .with('text', 'A01 a01')
  5718.  
  5719. $ruiObj.click
  5720.  
  5721. waitsecond(2)
  5722. end
  5723.  
  5724. tcase << TestAction.new(:ImageView_FirstActionButton_10) do
  5725. $ruiObj = RUIObject.new.with('objectid', -284633982).with('selfid', -1819582550).with('textdescid', -721488607).with('uniqueparentid', 0).with('classresourceid', 745414969)
  5726. .with('uitreeindex', 10)
  5727. .with('classname', 'ImageView')
  5728. .with('resource-id', 'com.android.contacts:id/first_action_button')
  5729. .with('content-desc', 'Video call')
  5730.  
  5731. $ruiObj.click
  5732.  
  5733. waitsecond(2)
  5734. end
  5735.  
  5736. tcase << TestAction.new(:wait8second_2) do
  5737. waitsecond(8)
  5738. end
  5739.  
  5740. tcase << TestAction.new(:scriptAction_18_1) do
  5741. sendBTCmd('answerCall')
  5742.  
  5743. waitsecond(8)
  5744. end
  5745.  
  5746. tcase << TestAction.new(:TextView_Callstatelabel_1_1_1) do
  5747. $ruiObj = RUIObject.new.with('objectid', -611515845).with('selfid', -821184504).with('textdescid', -1124622931).with('uniqueparentid', 0)
  5748. .with('uitreeindex', 5)
  5749. .with('classname', 'TextView')
  5750. .with('resource-id', 'com.android.incallui:id/callStateLabel')
  5751. .with('text', 'Incoming call')
  5752.  
  5753. $ruiObj.isNotExist
  5754. end
  5755.  
  5756. tcase << TestAction.new(:scriptAction_18_1_1) do
  5757. sendBTCmd('endCall')
  5758.  
  5759. waitsecond(2)
  5760. end
  5761.  
  5762. tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
  5763. $myTestResult = checkLastBTCmdResult
  5764. if $myTestResult == false
  5765. $myFailReason = "Call not come to other dev"
  5766. end
  5767. logStopTest("VideoCall_02")
  5768. end
  5769.  
  5770. tcase << TestAction.new(:Button_ButtonEndCall_4) do
  5771. $ruiObj = RUIObject.new.with('objectid', 449066258).with('selfid', 2024460923).with('textdescid', -1859117805).with('uniqueparentid', 0)
  5772. .with('uitreeindex', 8)
  5773. .with('classname', 'Button')
  5774. .with('resource-id', 'com.android.incallui:id/button_end_call')
  5775. .with('text', 'End')
  5776.  
  5777. $ruiObj.click
  5778.  
  5779. waitsecond(1)
  5780. end
  5781.  
  5782. tcase << TestAction.new(:pressBack_3) do
  5783. pressBack
  5784. end
  5785.  
  5786. tcase << TestAction.new(:pressBack_4) do
  5787. pressBack
  5788. end
  5789.  
  5790. tcase << TestAction.new(:pressHome_12) do
  5791. pressHome
  5792.  
  5793. waitsecond(2)
  5794. end
  5795.  
  5796. tcase.run(loopTime)
  5797.  
  5798. end
  5799.  
  5800. def self.VideoTelephony_05_01_14_03(loopTime)
  5801.  
  5802. tcase = TestCase.new("VideoTelephony_05_01_14_03")
  5803.  
  5804. tcase << TestAction.new(:scriptAction_StartTest_1) do
  5805. logStartTest("VideoCall_03")
  5806. end
  5807.  
  5808. tcase << TestAction.new(:scriptAction_18_1_1) do
  5809. sendBTCmd("makeVideoCall('#{db('CallNumber')[0]}')")
  5810.  
  5811. waitsecond(32)
  5812. end
  5813.  
  5814. tcase << TestAction.new(:scriptAction_26) do
  5815. $UIDev.swipe(288,2083.5,828,1192.5,10)
  5816.  
  5817.  
  5818. waitsecond(8)
  5819. end
  5820.  
  5821. tcase << TestAction.new(:TextView_Callstatelabel_1_1_1_1) do
  5822. $ruiObj = RUIObject.new.with('objectid', -611515845).with('selfid', -821184504).with('textdescid', -1124622931).with('uniqueparentid', 0)
  5823. .with('uitreeindex', 5)
  5824. .with('classname', 'TextView')
  5825. .with('resource-id', 'com.android.incallui:id/callStateLabel')
  5826. .with('text', 'Incoming call')
  5827.  
  5828. $ruiObj.isNotExist
  5829. end
  5830.  
  5831. tcase << TestAction.new(:scriptAction_2) do
  5832. endCall
  5833.  
  5834. waitsecond(2)
  5835. end
  5836.  
  5837. tcase << TestAction.new(:scriptAction_LogStopTest_1_1_1) do
  5838. $myTestResult = checkLastBTCmdResult
  5839. if $myTestResult == false
  5840. $myFailReason = "Call not come to other dev"
  5841. end
  5842. logStopTest("VideoCall_03")
  5843. end
  5844.  
  5845. tcase.run(loopTime)
  5846.  
  5847. end
  5848.  
  5849. def self.VideoTelephony_05_01_14_04(loopTime)
  5850.  
  5851. tcase = TestCase.new("VideoTelephony_05_01_14_04")
  5852.  
  5853. tcase << TestAction.new(:scriptAction_StartTest_1) do
  5854. logStartTest("VideoCall_04")
  5855. end
  5856.  
  5857. tcase << TestAction.new(:scriptAction_18_1_1) do
  5858. sendBTCmd("makeVideoCall('#{db('CallNumber')[0]}')")
  5859.  
  5860. waitsecond(32)
  5861. end
  5862.  
  5863. tcase << TestAction.new(:scriptAction_26) do
  5864. answerCall
  5865.  
  5866. waitsecond(8)
  5867. end
  5868.  
  5869. tcase << TestAction.new(:TextView_Callstatelabel_1_1_1_1_1) do
  5870. $ruiObj = RUIObject.new.with('objectid', -611515845).with('selfid', -821184504).with('textdescid', -1124622931).with('uniqueparentid', 0)
  5871. .with('uitreeindex', 5)
  5872. .with('classname', 'TextView')
  5873. .with('resource-id', 'com.android.incallui:id/callStateLabel')
  5874. .with('text', 'Incoming call')
  5875.  
  5876. $ruiObj.isNotExist
  5877. end
  5878.  
  5879. tcase << TestAction.new(:scriptAction_2) do
  5880. endCall
  5881.  
  5882. waitsecond(2)
  5883. end
  5884.  
  5885. tcase << TestAction.new(:scriptAction_LogStopTest_1_1_1) do
  5886. $myTestResult = checkLastBTCmdResult
  5887. if $myTestResult == false
  5888. $myFailReason = "Call not come to other dev"
  5889. end
  5890. logStopTest("VideoCall_04")
  5891. end
  5892.  
  5893. tcase.run(loopTime)
  5894.  
  5895. end
  5896.  
  5897. def self.VideoTelephony_05_01_14_05(loopTime)
  5898.  
  5899. tcase = TestCase.new("VideoTelephony_05_01_14_05")
  5900.  
  5901. tcase << TestAction.new(:scriptAction_StartTest_1) do
  5902. logStartTest("VideoCall_05")
  5903. end
  5904.  
  5905. tcase << TestAction.new(:TextView_Phone_2) do
  5906. $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
  5907. .with('uitreeindex', 9)
  5908. .with('classname', 'TextView')
  5909. .with('content-desc', 'Phone')
  5910. .with('text', 'Phone')
  5911.  
  5912. $ruiObj.click
  5913.  
  5914. waitsecond(1)
  5915. end
  5916.  
  5917. tcase << TestAction.new(:TextView_Tabtext_23) do
  5918. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 566119687).with('textdescid', 1861262411).with('uniqueparentid', 0)
  5919. .with('uitreeindex', 2)
  5920. .with('classname', 'TextView')
  5921. .with('resource-id', 'com.android.contacts:id/tabText')
  5922. .with('text', 'Dial')
  5923.  
  5924. $ruiObj.click
  5925.  
  5926. waitsecond(2)
  5927. end
  5928.  
  5929. tcase << TestAction.new(:scriptAction_2) do
  5930. $ruiObj = RUIObject.new.with('objectid', 477485968).with('selfid', -1326421482).with('textdescid', 1917163152).with('uniqueparentid', 0)
  5931. .with('uitreeindex', 7)
  5932. .with('classname', 'EditText')
  5933. .with('resource-id', 'com.android.contacts:id/digits')
  5934.  
  5935. $ruiObj.inputtext("#{db('CallNumber')[1]}")
  5936.  
  5937. waitsecond(2)
  5938. end
  5939.  
  5940. tcase << TestAction.new(:ImageButton_Btnvt_6) do
  5941. $ruiObj = RUIObject.new.with('objectid', -999718621).with('selfid', -1888469943).with('textdescid', -1795784128).with('uniqueparentid', 0)
  5942. .with('uitreeindex', 61)
  5943. .with('classname', 'ImageButton')
  5944. .with('resource-id', 'com.android.contacts:id/btnVT')
  5945. .with('content-desc', 'Video Call')
  5946.  
  5947. $ruiObj.click
  5948.  
  5949. waitsecond(2)
  5950. end
  5951.  
  5952. tcase << TestAction.new(:wait8second_2) do
  5953. waitsecond(8)
  5954. end
  5955.  
  5956. tcase << TestAction.new(:scriptAction_18_1) do
  5957. sendBTCmd('answerCall')
  5958.  
  5959. waitsecond(8)
  5960. end
  5961.  
  5962. tcase << TestAction.new(:TextView_Callstatelabel_1_1_1_1_1_1) do
  5963. $ruiObj = RUIObject.new.with('objectid', -611515845).with('selfid', -821184504).with('textdescid', -1124622931).with('uniqueparentid', 0)
  5964. .with('uitreeindex', 5)
  5965. .with('classname', 'TextView')
  5966. .with('resource-id', 'com.android.incallui:id/callStateLabel')
  5967. .with('text', 'Incoming call')
  5968.  
  5969. $ruiObj.isNotExist
  5970. end
  5971.  
  5972. tcase << TestAction.new(:scriptAction_18_1_1) do
  5973. sendBTCmd('endCall')
  5974.  
  5975. waitsecond(2)
  5976. end
  5977.  
  5978. tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
  5979. $myTestResult = checkLastBTCmdResult
  5980. if $myTestResult == false
  5981. $myFailReason = "Call not come to other dev"
  5982. end
  5983. logStopTest("VideoCall_05")
  5984. end
  5985.  
  5986. tcase << TestAction.new(:Button_ButtonEndCall_4) do
  5987. $ruiObj = RUIObject.new.with('objectid', 449066258).with('selfid', 2024460923).with('textdescid', -1859117805).with('uniqueparentid', 0)
  5988. .with('uitreeindex', 8)
  5989. .with('classname', 'Button')
  5990. .with('resource-id', 'com.android.incallui:id/button_end_call')
  5991. .with('text', 'End')
  5992.  
  5993. $ruiObj.click
  5994.  
  5995. waitsecond(1)
  5996. end
  5997.  
  5998. tcase << TestAction.new(:pressBack_3) do
  5999. pressBack
  6000. end
  6001.  
  6002. tcase << TestAction.new(:pressBack_4) do
  6003. pressBack
  6004. end
  6005.  
  6006. tcase.run(loopTime)
  6007.  
  6008. end
  6009.  
  6010. def self.WiFi_05_01_10_01(loopTime)
  6011.  
  6012. tcase = TestCase.new("WiFi_05_01_10_01")
  6013.  
  6014. tcase << TestAction.new(:scriptAction_2) do
  6015. logStartTest("05_01_10_01_WiFi")
  6016. end
  6017.  
  6018. tcase << TestAction.new(:gotoApp_5) do
  6019. gotoApp('Settings')
  6020.  
  6021. waitsecond(1)
  6022. end
  6023.  
  6024. tcase << TestAction.new(:FrameLayout_SettingsButtonContainer_4) do
  6025. $ruiObj = RUIObject.new.with('objectid', -994030416).with('selfid', 1322766864).with('textdescid', 417942116).with('uniqueparentid', 0)
  6026. .with('classname', 'FrameLayout')
  6027. .with('resource-id', 'com.android.systemui:id/settings_button_container')
  6028.  
  6029. $ruiObj.click
  6030.  
  6031. waitsecond(1)
  6032. end
  6033.  
  6034. tcase << TestAction.new(:TextView_Title_2) do
  6035. $ruiObj = RUIObject.new.with('objectid', 674368800).with('selfid', -2078686330).with('textdescid', -957350501).with('uniqueparentid', 0)
  6036. .with('uitreeindex', 2)
  6037. .with('classname', 'TextView')
  6038. .with('resource-id', 'android:id/title')
  6039. .with('text', 'Networks')
  6040.  
  6041. $ruiObj.click
  6042. end
  6043.  
  6044. tcase << TestAction.new(:swipeUp_1) do
  6045. swipe_vertical_back 500
  6046. end
  6047.  
  6048. tcase << TestAction.new(:TextView_Title_4) do
  6049. $ruiObj = RUIObject.new.with('objectid', 2008023572).with('selfid', -589731018).with('textdescid', 498664031).with('uniqueparentid', 0).with('classresourceid', 490183159)
  6050. .with('uitreeindex', 8)
  6051. .with('classname', 'TextView')
  6052. .with('resource-id', 'android:id/title')
  6053. .with('text', 'WiFi')
  6054.  
  6055. $ruiObj.click
  6056.  
  6057. waitsecond(1)
  6058. end
  6059.  
  6060. tcase << TestAction.new(:Button_Button2_2) do
  6061. $ruiObj = RUIObject.new.with('objectid', -360890209).with('selfid', -1317527958).with('textdescid', -223504546).with('uniqueparentid', 0)
  6062. .with('uitreeindex', 2)
  6063. .with('classname', 'Button')
  6064. .with('resource-id', 'android:id/button2')
  6065. .with('text', 'No')
  6066.  
  6067. $ruiObj.click
  6068.  
  6069. waitsecond(4)
  6070. end
  6071.  
  6072. tcase << TestAction.new(:Switch_ON_2_1) do
  6073. $ruiObj = RUIObject.new.with('objectid', 1178284996).with('selfid', 1645353587).with('textdescid', -1975291963).with('uniqueparentid', 0)
  6074. .with('uitreeindex', 2)
  6075. .with('classname', 'Switch')
  6076. .with('text', 'ON')
  6077.  
  6078. $ruiObj.click
  6079.  
  6080. waitsecond(2)
  6081. end
  6082.  
  6083. tcase << TestAction.new(:wait8second_6) do
  6084. waitsecond(8)
  6085. end
  6086.  
  6087. tcase << TestAction.new(:Switch_OFF_3_1) do
  6088. $ruiObj = RUIObject.new.with('objectid', 1178284996).with('selfid', -533646533).with('textdescid', -1104515187).with('uniqueparentid', 0)
  6089. .with('uitreeindex', 2)
  6090. .with('classname', 'Switch')
  6091. .with('text', 'OFF')
  6092.  
  6093. $ruiObj.click
  6094.  
  6095. waitsecond(2)
  6096. end
  6097.  
  6098. tcase << TestAction.new(:scriptAction_10_TrueFalse) do
  6099. $myTestResult = checkLastExistResult
  6100.  
  6101. if $myTestResult == false
  6102. $myFailReason = "WiFi cannot turn ON"
  6103. end
  6104. logStopTest("05_01_10_01_WiFi")
  6105.  
  6106. waitsecond(1)
  6107. end
  6108.  
  6109. tcase << TestAction.new(:pressBack_20) do
  6110. pressBack
  6111. end
  6112.  
  6113. tcase << TestAction.new(:pressBack_21) do
  6114. pressBack
  6115. end
  6116.  
  6117. tcase << TestAction.new(:pressHome_22) do
  6118. pressHome
  6119. end
  6120.  
  6121. tcase.run(loopTime)
  6122.  
  6123. end
  6124.  
  6125. def self.WiFi_05_01_10_02(loopTime)
  6126.  
  6127. tcase = TestCase.new("WiFi_05_01_10_02")
  6128.  
  6129. tcase << TestAction.new(:scriptAction_2) do
  6130. logStartTest("05_01_10_02_WiFi")
  6131. end
  6132.  
  6133. tcase << TestAction.new(:gotoApp_2) do
  6134. gotoApp('Settings')
  6135.  
  6136. waitsecond(1)
  6137. end
  6138.  
  6139. tcase << TestAction.new(:TextView_Title_2) do
  6140. $ruiObj = RUIObject.new.with('objectid', 674368800).with('selfid', -2078686330).with('textdescid', -957350501).with('uniqueparentid', 0)
  6141. .with('uitreeindex', 2)
  6142. .with('classname', 'TextView')
  6143. .with('resource-id', 'android:id/title')
  6144. .with('text', 'Networks')
  6145.  
  6146. $ruiObj.click
  6147. end
  6148.  
  6149. tcase << TestAction.new(:swipeUp_2) do
  6150. swipe_vertical_back 500
  6151. end
  6152.  
  6153. tcase << TestAction.new(:TextView_Title_21) do
  6154. $ruiObj = RUIObject.new.with('objectid', -1417852313).with('selfid', -589731018).with('textdescid', 1796571250).with('uniqueparentid', 0).with('classresourceid', 490183159)
  6155. .with('uitreeindex', 16)
  6156. .with('classname', 'TextView')
  6157. .with('resource-id', 'android:id/title')
  6158. .with('text', 'WiFi')
  6159.  
  6160. $ruiObj.click
  6161.  
  6162. waitsecond(2)
  6163. end
  6164.  
  6165. tcase << TestAction.new(:TextView_Empty_25) do
  6166. $ruiObj = RUIObject.new.with('objectid', 1333259948).with('selfid', -886975434).with('textdescid', 1201392520).with('uniqueparentid', 0)
  6167. .with('uitreeindex', 4)
  6168. .with('classname', 'TextView')
  6169. .with('resource-id', 'android:id/empty')
  6170. .with('text', 'Turn WiFi on in the upper right corner to see available networks')
  6171.  
  6172. $ruiObj.isExist
  6173. ifFailJumpTo(:wait1second_21)
  6174. end
  6175.  
  6176. tcase << TestAction.new(:Switch_ON_2_1_1) do
  6177. $ruiObj = RUIObject.new.with('objectid', 1178284996).with('selfid', 1645353587).with('textdescid', -1975291963).with('uniqueparentid', 0)
  6178. .with('uitreeindex', 2)
  6179. .with('classname', 'Switch')
  6180. .with('text', 'ON')
  6181.  
  6182. $ruiObj.click
  6183. end
  6184.  
  6185. tcase << TestAction.new(:wait1second_21) do
  6186. waitsecond(1)
  6187. end
  6188.  
  6189. tcase << TestAction.new(:check_if_wifi_is_added) do
  6190. $ruiObj = RUIObject.new.with('objectid', -1789239232).with('selfid', -789618896).with('textdescid', 272817007).with('uniqueparentid', 0).with('classresourceid', 490183159)
  6191. .with('uitreeindex', 11)
  6192. .with('classname', 'TextView')
  6193. .with('resource-id', 'android:id/title')
  6194. .with('text', 'qctcomp')
  6195.  
  6196. $ruiObj.isNotExist
  6197. ifFailJumpTo(:check_connection)
  6198.  
  6199. waitsecond(1)
  6200. end
  6201.  
  6202. tcase << TestAction.new(:Add_wifi) do
  6203. $ruiObj = RUIObject.new.with('objectid', 1634319278).with('selfid', 1290820192).with('textdescid', 371464933).with('uniqueparentid', 0)
  6204. .with('uitreeindex', 3)
  6205. .with('classname', 'ImageButton')
  6206. .with('content-desc', 'More options')
  6207.  
  6208. $ruiObj.click
  6209.  
  6210. waitsecond(1)
  6211. end
  6212.  
  6213. tcase << TestAction.new(:TextView_Title_6) do
  6214. $ruiObj = RUIObject.new.with('objectid', -1984796814).with('selfid', -392058123).with('textdescid', -1929502754).with('uniqueparentid', 0).with('classresourceid', 490183159)
  6215. .with('uitreeindex', 0)
  6216. .with('classname', 'TextView')
  6217. .with('resource-id', 'android:id/title')
  6218. .with('text', 'Add WiFi')
  6219.  
  6220. $ruiObj.click
  6221.  
  6222. waitsecond(1)
  6223. end
  6224.  
  6225. tcase << TestAction.new(:EditText_Ssid_8) do
  6226. $ruiObj = RUIObject.new.with('objectid', 1745689399).with('selfid', 1359933717).with('textdescid', -1718203447).with('uniqueparentid', 0).with('classresourceid', -1413606463)
  6227. .with('uitreeindex', 2)
  6228. .with('classname', 'EditText')
  6229. .with('resource-id', 'com.lge.wifisettings:id/ssid')
  6230.  
  6231. $ruiObj.inputtext('qctcomp')
  6232.  
  6233. waitsecond(1)
  6234. end
  6235.  
  6236. tcase << TestAction.new(:Button_Button1_10) do
  6237. $ruiObj = RUIObject.new.with('objectid', -360890210).with('selfid', -210572094).with('textdescid', 1221395928).with('uniqueparentid', 0)
  6238. .with('uitreeindex', 7)
  6239. .with('classname', 'Button')
  6240. .with('resource-id', 'android:id/button1')
  6241. .with('text', 'CONNECT')
  6242.  
  6243. $ruiObj.click
  6244.  
  6245. waitsecond(1)
  6246. end
  6247.  
  6248. tcase << TestAction.new(:check_connection) do
  6249. $ruiObj = RUIObject.new.with('objectid', 1399891586).with('selfid', -404041766).with('textdescid', 623785653).with('uniqueparentid', 0).with('classresourceid', -1930775675)
  6250. .with('uitreeindex', 10)
  6251. .with('classname', 'TextView')
  6252. .with('resource-id', 'android:id/summary')
  6253. .with('text', 'Connected')
  6254.  
  6255. $ruiObj.click
  6256.  
  6257. waitsecond(1)
  6258. end
  6259.  
  6260. tcase << TestAction.new(:Button_Button3_15) do
  6261. $ruiObj = RUIObject.new.with('objectid', -360890208).with('selfid', 1759634711).with('textdescid', 452800563).with('uniqueparentid', 0)
  6262. .with('uitreeindex', 12)
  6263. .with('classname', 'Button')
  6264. .with('resource-id', 'android:id/button3')
  6265. .with('text', 'Forget')
  6266.  
  6267. $ruiObj.click
  6268.  
  6269. waitsecond(1)
  6270. end
  6271.  
  6272. tcase << TestAction.new(:TextView_Title_14) do
  6273. $ruiObj = RUIObject.new.with('objectid', -1789239232).with('selfid', -789618896).with('textdescid', 272817007).with('uniqueparentid', 0).with('classresourceid', 490183159)
  6274. .with('uitreeindex', 15)
  6275. .with('classname', 'TextView')
  6276. .with('resource-id', 'android:id/title')
  6277. .with('text', 'qctcomp')
  6278.  
  6279. $ruiObj.click
  6280.  
  6281. waitsecond(1)
  6282. end
  6283.  
  6284. tcase << TestAction.new(:EditText_Password_17) do
  6285. $ruiObj = RUIObject.new.with('objectid', -976316462).with('selfid', -2120332491).with('textdescid', -201039218).with('uniqueparentid', 0).with('classresourceid', -714852383)
  6286. .with('uitreeindex', 2)
  6287. .with('classname', 'EditText')
  6288. .with('resource-id', 'com.lge.wifisettings:id/password')
  6289.  
  6290. $ruiObj.inputtext('12abcdef34')
  6291.  
  6292. waitsecond(1)
  6293. end
  6294.  
  6295. tcase << TestAction.new(:pressBack_20) do
  6296. pressBack
  6297. end
  6298.  
  6299. tcase << TestAction.new(:Button_Button1_18) do
  6300. $ruiObj = RUIObject.new.with('objectid', -360890210).with('selfid', -210572094).with('textdescid', 1221395928).with('uniqueparentid', 0)
  6301. .with('uitreeindex', 6)
  6302. .with('classname', 'Button')
  6303. .with('resource-id', 'android:id/button1')
  6304. .with('text', 'CONNECT')
  6305.  
  6306. $ruiObj.click
  6307.  
  6308. waitsecond(4)
  6309. end
  6310.  
  6311. tcase << TestAction.new(:TextView_Summary_2) do
  6312. $ruiObj = RUIObject.new.with('objectid', 1704199271).with('selfid', -404041766).with('textdescid', -634935376).with('uniqueparentid', 0).with('classresourceid', -1930775675)
  6313. .with('uitreeindex', 7)
  6314. .with('classname', 'TextView')
  6315. .with('resource-id', 'android:id/summary')
  6316. .with('text', 'Connected')
  6317.  
  6318. $ruiObj.isExist
  6319.  
  6320. waitsecond(1)
  6321. end
  6322.  
  6323. tcase << TestAction.new(:scriptAction_23_TrueFalse) do
  6324. $myTestResult = checkLastExistResult
  6325.  
  6326. if $myTestResult == false
  6327. $myFailReason == "WiFi cannot connected"
  6328. end
  6329. logStopTest("05_01_10_02_WiFi")
  6330. end
  6331.  
  6332. tcase << TestAction.new(:Switch_OFF_19_1) do
  6333. $ruiObj = RUIObject.new.with('objectid', 1178284996).with('selfid', -533646533).with('textdescid', -1104515187).with('uniqueparentid', 0)
  6334. .with('uitreeindex', 2)
  6335. .with('classname', 'Switch')
  6336. .with('text', 'OFF')
  6337.  
  6338. $ruiObj.click
  6339.  
  6340. waitsecond(2)
  6341. end
  6342.  
  6343. tcase << TestAction.new(:pressBack_15) do
  6344. pressBack
  6345. end
  6346.  
  6347. tcase << TestAction.new(:pressBack_16) do
  6348. pressBack
  6349. end
  6350.  
  6351. tcase << TestAction.new(:pressHome_17) do
  6352. pressHome
  6353. end
  6354.  
  6355. tcase.run(loopTime)
  6356.  
  6357. end
  6358.  
  6359. def self.WiFi_Calling_05_01_16_01(loopTime)
  6360.  
  6361. tcase = TestCase.new("WiFi_Calling_05_01_16_01")
  6362.  
  6363. tcase << TestAction.new(:scriptAction_StartTest_1) do
  6364. logStartTest("05_01_16_01_WiFI_Calling")
  6365. end
  6366.  
  6367. tcase << TestAction.new(:pressHome_4) do
  6368. pressHome
  6369. end
  6370.  
  6371. tcase << TestAction.new(:TextView_Phone_2) do
  6372. $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
  6373. .with('uitreeindex', 9)
  6374. .with('classname', 'TextView')
  6375. .with('content-desc', 'Phone')
  6376. .with('text', 'Phone')
  6377.  
  6378. $ruiObj.click
  6379.  
  6380. waitsecond(1)
  6381. end
  6382.  
  6383. tcase << TestAction.new(:TextView_Tabtext_2) do
  6384. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
  6385. .with('uitreeindex', 4)
  6386. .with('classname', 'TextView')
  6387. .with('resource-id', 'com.android.contacts:id/tabText')
  6388. .with('text', 'Contacts')
  6389.  
  6390. $ruiObj.click
  6391.  
  6392. waitsecond(1)
  6393. end
  6394.  
  6395. tcase << TestAction.new(:EditText_SearchSrcText_4) do
  6396. $ruiObj = RUIObject.new.with('objectid', 588070375).with('selfid', -959326622).with('textdescid', -497243406).with('uniqueparentid', 0)
  6397. .with('uitreeindex', 6)
  6398. .with('classname', 'EditText')
  6399. .with('resource-id', 'android:id/search_src_text')
  6400. .with('content-desc', 'Search contacts')
  6401.  
  6402. $ruiObj.inputtext('A01')
  6403.  
  6404. waitsecond(1)
  6405. end
  6406.  
  6407. tcase << TestAction.new(:scriptAction_10_1) do
  6408. sendBTCmd('pressHome')
  6409. end
  6410.  
  6411. tcase << TestAction.new(:ImageView_Button1_8) do
  6412. $ruiObj = RUIObject.new.with('objectid', -1827607533).with('selfid', 643737864).with('textdescid', -306619761).with('uniqueparentid', 0).with('classresourceid', -1143292048)
  6413. .with('uitreeindex', 13)
  6414. .with('classname', 'ImageView')
  6415. .with('resource-id', 'android:id/button1')
  6416. .with('content-desc', 'Call A01 a01')
  6417.  
  6418. $ruiObj.click
  6419.  
  6420. waitsecond(4)
  6421. end
  6422.  
  6423. tcase << TestAction.new(:wait8second_31) do
  6424. waitsecond(8)
  6425. end
  6426.  
  6427. tcase << TestAction.new(:scriptAction_10) do
  6428. sendBTCmd('answerCall')
  6429.  
  6430. waitsecond(8)
  6431. end
  6432.  
  6433. tcase << TestAction.new(:scriptAction_10_1) do
  6434.  
  6435. if rand(100) < 0
  6436.  
  6437. sendBTCmd('endCall')
  6438.  
  6439. waitsecond(1)
  6440.  
  6441. end
  6442.  
  6443. end
  6444.  
  6445. tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
  6446. $myTestResult = checkLastBTCmdResult
  6447. if $myTestResult == false
  6448. $myFailReason = "Call not come to other dev"
  6449. end
  6450. logStopTest("05_01_16_01_WiFI_Calling")
  6451.  
  6452. end
  6453.  
  6454. tcase << TestAction.new(:Button_Endbutton_2) do
  6455. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  6456. .with('uitreeindex', 8)
  6457. .with('classname', 'Button')
  6458. .with('resource-id', 'com.android.incallui:id/endButton')
  6459. .with('text', 'End')
  6460.  
  6461. $ruiObj.click
  6462.  
  6463. waitsecond(1)
  6464. end
  6465.  
  6466. tcase << TestAction.new(:pressBack_3) do
  6467. pressBack
  6468. end
  6469.  
  6470. tcase << TestAction.new(:pressBack_4) do
  6471. pressBack
  6472. end
  6473.  
  6474. tcase.run(loopTime)
  6475.  
  6476. end
  6477.  
  6478. def self.WiFi_Calling_05_01_16_02(loopTime)
  6479.  
  6480. tcase = TestCase.new("WiFi_Calling_05_01_16_02")
  6481.  
  6482. tcase << TestAction.new(:scriptAction_StartTest_1) do
  6483. logStartTest("05_01_16_02_WiFI_Calling")
  6484. end
  6485.  
  6486. tcase << TestAction.new(:pressHome_4) do
  6487. pressHome
  6488. end
  6489.  
  6490. tcase << TestAction.new(:TextView_Phone_2) do
  6491. $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
  6492. .with('uitreeindex', 9)
  6493. .with('classname', 'TextView')
  6494. .with('content-desc', 'Phone')
  6495. .with('text', 'Phone')
  6496.  
  6497. $ruiObj.click
  6498.  
  6499. waitsecond(1)
  6500. end
  6501.  
  6502. tcase << TestAction.new(:TextView_Tabtext_21) do
  6503. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 566119687).with('textdescid', 1861262411).with('uniqueparentid', 0)
  6504. .with('uitreeindex', 2)
  6505. .with('classname', 'TextView')
  6506. .with('resource-id', 'com.android.contacts:id/tabText')
  6507. .with('text', 'Dial')
  6508.  
  6509. $ruiObj.click
  6510.  
  6511. waitsecond(2)
  6512. end
  6513.  
  6514. tcase << TestAction.new(:EditText_Digits_4) do
  6515. $ruiObj = RUIObject.new.with('objectid', 477485968).with('selfid', -1326421482).with('textdescid', 1917163152).with('uniqueparentid', 0)
  6516. .with('uitreeindex', 7)
  6517. .with('classname', 'EditText')
  6518. .with('resource-id', 'com.android.contacts:id/digits')
  6519.  
  6520. $ruiObj.inputtext('18003310500')
  6521.  
  6522. waitsecond(2)
  6523. end
  6524.  
  6525. tcase << TestAction.new(:ImageButton_Btnwificall_6) do
  6526. $ruiObj = RUIObject.new.with('objectid', -1011300904).with('selfid', 328499424).with('textdescid', -1103889439).with('uniqueparentid', 0)
  6527. .with('uitreeindex', 58)
  6528. .with('classname', 'ImageButton')
  6529. .with('resource-id', 'com.android.contacts:id/btnWifiCall')
  6530. .with('content-desc', 'Wifi call')
  6531.  
  6532. $ruiObj.click
  6533.  
  6534. waitsecond(2)
  6535. end
  6536.  
  6537. tcase << TestAction.new(:wait8second_31) do
  6538. waitsecond(8)
  6539. end
  6540.  
  6541. tcase << TestAction.new(:ImageButton_Endcallbutton_10) do
  6542. $ruiObj = RUIObject.new.with('objectid', 1089223879).with('selfid', -2049926087).with('textdescid', -593798087).with('uniqueparentid', 0)
  6543. .with('uitreeindex', 30)
  6544. .with('classname', 'ImageButton')
  6545. .with('resource-id', 'com.callapp.contacts:id/endCallButton')
  6546.  
  6547. $ruiObj.click
  6548.  
  6549. waitsecond(2)
  6550. end
  6551.  
  6552. tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
  6553. $myTestResult = checkLastBTCmdResult
  6554. if $myTestResult == false
  6555. $myFailReason = "Call not come to other dev"
  6556. end
  6557. logStopTest("05_01_16_01_WiFI_Calling")
  6558.  
  6559. end
  6560.  
  6561. tcase << TestAction.new(:pressBack_3) do
  6562. pressBack
  6563. end
  6564.  
  6565. tcase << TestAction.new(:pressBack_4) do
  6566. pressBack
  6567. end
  6568.  
  6569. tcase.run(loopTime)
  6570.  
  6571. end
  6572.  
  6573. def self.WiFi_Calling_05_01_16_03(loopTime)
  6574.  
  6575. tcase = TestCase.new("WiFi_Calling_05_01_16_03")
  6576.  
  6577. tcase << TestAction.new(:pressHome_2) do
  6578. pressHome
  6579. end
  6580.  
  6581. tcase << TestAction.new(:scriptAction_StartTestLog_1) do
  6582. logStartTest("05_01_16_03_WiFI_Calling")
  6583. end
  6584.  
  6585. tcase << TestAction.new(:scriptAction_BTMakeCall) do
  6586. sendBTCmd("makeCall('#{db('CallNumber')[0]}')")
  6587.  
  6588. waitsecond(8)
  6589. end
  6590.  
  6591. tcase << TestAction.new(:wait8second_12) do
  6592. waitsecond(8)
  6593. end
  6594.  
  6595. tcase << TestAction.new(:wait8second_14) do
  6596. waitsecond(8)
  6597. end
  6598.  
  6599. tcase << TestAction.new(:answerSwipe) do
  6600. $UIDev.swipe(288,1860,288,1400,10)
  6601.  
  6602.  
  6603. waitsecond(8)
  6604. end
  6605.  
  6606. tcase << TestAction.new(:Button_Endbutton_2) do
  6607. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  6608. .with('uitreeindex', 10)
  6609. .with('classname', 'Button')
  6610. .with('resource-id', 'com.android.incallui:id/endButton')
  6611. .with('text', 'End')
  6612.  
  6613. $ruiObj.isNotExist
  6614. ifFailJumpTo(:Button_Endbutton_2_1)
  6615.  
  6616. waitsecond(1)
  6617. end
  6618.  
  6619. tcase << TestAction.new(:answerSwipe_1) do
  6620. $UIDev.swipe(288,1860,288,1400,10)
  6621.  
  6622.  
  6623. waitsecond(2)
  6624. end
  6625.  
  6626. tcase << TestAction.new(:Button_Endbutton_2_1) do
  6627. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  6628. .with('uitreeindex', 10)
  6629. .with('classname', 'Button')
  6630. .with('resource-id', 'com.android.incallui:id/endButton')
  6631. .with('text', 'End')
  6632.  
  6633. $ruiObj.isExist
  6634.  
  6635. waitsecond(1)
  6636. end
  6637.  
  6638. tcase << TestAction.new(:scriptAction_LogStopTest_1) do
  6639. $myTestResult = checkLastExistResult
  6640. if $myTestResult == false
  6641. $myFailReason = "End button not found"
  6642. end
  6643. logStopTest("05_01_16_03_WiFI_Calling")
  6644.  
  6645. end
  6646.  
  6647. tcase << TestAction.new(:scriptAction_BTEndCall) do
  6648. sendBTCmd('endCall')
  6649. end
  6650.  
  6651. tcase << TestAction.new(:Button_Endbutton_2_1_1) do
  6652. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  6653. .with('uitreeindex', 10)
  6654. .with('classname', 'Button')
  6655. .with('resource-id', 'com.android.incallui:id/endButton')
  6656. .with('text', 'End')
  6657.  
  6658. $ruiObj.click
  6659.  
  6660. waitsecond(1)
  6661. end
  6662.  
  6663. tcase << TestAction.new(:pressBack_1) do
  6664. pressBack
  6665. end
  6666.  
  6667. tcase << TestAction.new(:pressBack_2) do
  6668. pressBack
  6669. end
  6670.  
  6671. tcase.run(loopTime)
  6672.  
  6673. end
  6674.  
  6675. def self.WiFi_Calling_Disabled(loopTime)
  6676.  
  6677. tcase = TestCase.new("WiFi_Calling_Disabled")
  6678.  
  6679. tcase << TestAction.new(:pressHome_1) do
  6680. pressHome
  6681.  
  6682. waitsecond(2)
  6683. end
  6684.  
  6685. tcase << TestAction.new(:scriptAction_1) do
  6686. UiDevice.getInstance.openNotification()
  6687.  
  6688. waitsecond(2)
  6689. end
  6690.  
  6691. tcase << TestAction.new(:Switch_WiFi_3) do
  6692. $ruiObj = RUIObject.new.with('objectid', -1467580294).with('selfid', -34376116).with('textdescid', -624940890).with('uniqueparentid', 0)
  6693. .with('classname', 'Switch')
  6694. .with('content-desc', 'Wi-Fi Calling on.')
  6695. .with('text', 'Off')
  6696.  
  6697. $ruiObj.click
  6698.  
  6699. waitsecond(1)
  6700. end
  6701.  
  6702. tcase << TestAction.new(:Switch_Airplane_8) do
  6703. $ruiObj = RUIObject.new.with('objectid', -1467580294).with('selfid', -1117553413).with('textdescid', -521334761).with('uniqueparentid', 0)
  6704. .with('classname', 'Switch')
  6705. .with('content-desc', 'Airplane mode on.')
  6706. .with('text', 'Off')
  6707.  
  6708. $ruiObj.click
  6709.  
  6710. waitsecond(1)
  6711. end
  6712.  
  6713. tcase << TestAction.new(:Switch_qctcomp_11) do
  6714. $ruiObj = RUIObject.new.with('objectid', -1467580294).with('selfid', 1792588571).with('textdescid', -2004855945).with('uniqueparentid', 0)
  6715. .with('classname', 'Switch')
  6716. .with('text', 'Off')
  6717.  
  6718. $ruiObj.click
  6719.  
  6720. waitsecond(1)
  6721. end
  6722.  
  6723. tcase << TestAction.new(:pressHome_15) do
  6724. pressHome
  6725.  
  6726. waitsecond(2)
  6727. end
  6728.  
  6729. tcase.run(loopTime)
  6730.  
  6731. end
  6732.  
  6733. def self.WiFi_Calling_Enabled(loopTime)
  6734.  
  6735. tcase = TestCase.new("WiFi_Calling_Enabled")
  6736.  
  6737. tcase << TestAction.new(:pressHome_1) do
  6738. pressHome
  6739.  
  6740. waitsecond(2)
  6741. end
  6742.  
  6743. tcase << TestAction.new(:scriptAction_1) do
  6744. UiDevice.getInstance.openNotification()
  6745.  
  6746. waitsecond(2)
  6747. end
  6748.  
  6749. tcase << TestAction.new(:Switch_WiFi_2) do
  6750. $ruiObj = RUIObject.new.with('objectid', -1467580294).with('selfid', 1740384654).with('textdescid', -1815263324).with('uniqueparentid', 0)
  6751. .with('classname', 'Switch')
  6752. .with('content-desc', 'Wi-Fi Calling off.')
  6753. .with('text', 'On')
  6754.  
  6755. $ruiObj.click
  6756.  
  6757. waitsecond(2)
  6758. end
  6759.  
  6760. tcase << TestAction.new(:Button_Button1_3) do
  6761. $ruiObj = RUIObject.new.with('objectid', 467706165).with('selfid', -1318451484).with('textdescid', 195214425).with('uniqueparentid', 0)
  6762. .with('uitreeindex', 4)
  6763. .with('classname', 'Button')
  6764. .with('resource-id', 'android:id/button1')
  6765. .with('text', 'OK')
  6766.  
  6767. $ruiObj.click
  6768.  
  6769. waitsecond(2)
  6770. end
  6771.  
  6772. tcase << TestAction.new(:scriptAction_5) do
  6773. UiDevice.getInstance.openNotification()
  6774.  
  6775. waitsecond(2)
  6776. end
  6777.  
  6778. tcase << TestAction.new(:Switch_Airplane_7) do
  6779. $ruiObj = RUIObject.new.with('objectid', -1467580294).with('selfid', 657207357).with('textdescid', -1711657195).with('uniqueparentid', 0)
  6780. .with('classname', 'Switch')
  6781. .with('content-desc', 'Airplane mode off.')
  6782. .with('text', 'On')
  6783.  
  6784. $ruiObj.click
  6785.  
  6786. waitsecond(2)
  6787. end
  6788.  
  6789. tcase << TestAction.new(:Button_Button1_8) do
  6790. $ruiObj = RUIObject.new.with('objectid', -1349637992).with('selfid', -1318451484).with('textdescid', 1957157436).with('uniqueparentid', 0)
  6791. .with('uitreeindex', 3)
  6792. .with('classname', 'Button')
  6793. .with('resource-id', 'android:id/button1')
  6794. .with('text', 'OK')
  6795.  
  6796. $ruiObj.click
  6797.  
  6798. waitsecond(2)
  6799. end
  6800.  
  6801. tcase << TestAction.new(:scriptAction_9) do
  6802. UiDevice.getInstance.openNotification()
  6803.  
  6804. waitsecond(2)
  6805. end
  6806.  
  6807. tcase << TestAction.new(:Switch_WiFi_12) do
  6808. $ruiObj = RUIObject.new.with('objectid', -1467580294).with('selfid', 1570561034).with('textdescid', 1428965288).with('uniqueparentid', 0)
  6809. .with('classname', 'Switch')
  6810. .with('content-desc', 'Wi-Fi off.')
  6811. .with('text', 'On')
  6812.  
  6813. $ruiObj.click
  6814.  
  6815. waitsecond(2)
  6816. end
  6817.  
  6818. tcase << TestAction.new(:pressHome_13) do
  6819. pressHome
  6820.  
  6821. waitsecond(2)
  6822. end
  6823.  
  6824. tcase.run(loopTime)
  6825.  
  6826. end
  6827.  
  6828. def self.android_ExpHandler(loopTime)
  6829.  
  6830. tcase = TestCase.new("android_ExpHandler")
  6831.  
  6832. tcase << TestAction.new(:scriptAction_check) do
  6833. $err = "system popup detected::#{takeScreenShot}::screenshot saved"
  6834. $myTestResult = false
  6835. puts $err
  6836. logcat($err)
  6837. writelog($err)
  6838. uiObj("Button").click if uiObj("Button").exists
  6839.  
  6840. waitsecond(2)
  6841. end
  6842.  
  6843. tcase.run(loopTime)
  6844.  
  6845. end
  6846.  
  6847. def self.change_3G(loopTime)
  6848.  
  6849. tcase = TestCase.new("change_3G")
  6850.  
  6851. tcase << TestAction.new(:gotoApp_16) do
  6852. gotoApp('HiddenMenuCall')
  6853. end
  6854.  
  6855. tcase << TestAction.new(:TextView_Title_2) do
  6856. $ruiObj = RUIObject.new.with('objectid', 1100751325).with('selfid', -167282287).with('textdescid', -350417171).with('uniqueparentid', 0).with('classresourceid', 490183159)
  6857. .with('uitreeindex', 1)
  6858. .with('classname', 'TextView')
  6859. .with('resource-id', 'android:id/title')
  6860. .with('text', 'LG Hidden Menu')
  6861.  
  6862. $ruiObj.click
  6863.  
  6864. waitsecond(1)
  6865. end
  6866.  
  6867. tcase << TestAction.new(:TextView_Title_87) do
  6868. $ruiObj = RUIObject.new.with('objectid', 684902757).with('selfid', 538152793).with('textdescid', -1915478867).with('uniqueparentid', 0).with('classresourceid', 490183159)
  6869. .with('uitreeindex', 4)
  6870. .with('classname', 'TextView')
  6871. .with('resource-id', 'android:id/title')
  6872. .with('text', 'Field Test')
  6873.  
  6874. $ruiObj.click
  6875.  
  6876. waitsecond(1)
  6877. end
  6878.  
  6879. tcase << TestAction.new(:TextView_Text1_10) do
  6880. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', -141259386).with('textdescid', -734720867).with('uniqueparentid', 0).with('classresourceid', 490068035)
  6881. .with('uitreeindex', 1)
  6882. .with('classname', 'TextView')
  6883. .with('resource-id', 'android:id/text1')
  6884. .with('text', 'Modem Settings')
  6885.  
  6886. $ruiObj.click
  6887.  
  6888. waitsecond(1)
  6889. end
  6890.  
  6891. tcase << TestAction.new(:swipeDown_12) do
  6892. swipe_vertical 500
  6893.  
  6894. waitsecond(1)
  6895. end
  6896.  
  6897. tcase << TestAction.new(:TextView_Text1_14) do
  6898. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', 12767364).with('textdescid', 1760273017).with('uniqueparentid', 0).with('classresourceid', 490068035)
  6899. .with('uitreeindex', 6)
  6900. .with('classname', 'TextView')
  6901. .with('resource-id', 'android:id/text1')
  6902. .with('text', 'RAT Selection')
  6903.  
  6904. $ruiObj.click
  6905.  
  6906. waitsecond(1)
  6907. end
  6908.  
  6909. tcase << TestAction.new(:TextView_Text1_2) do
  6910. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', -244179464).with('textdescid', 496935915).with('uniqueparentid', 0).with('classresourceid', 490068035)
  6911. .with('uitreeindex', 5)
  6912. .with('classname', 'TextView')
  6913. .with('resource-id', 'android:id/text1')
  6914. .with('text', 'GSM WCDMA')
  6915.  
  6916. $ruiObj.click
  6917.  
  6918. waitsecond(1)
  6919. end
  6920.  
  6921. tcase << TestAction.new(:Button_Button1_18) do
  6922. $ruiObj = RUIObject.new.with('objectid', 2089308220).with('selfid', -1318451484).with('textdescid', 1664978912).with('uniqueparentid', 0)
  6923. .with('uitreeindex', 1)
  6924. .with('classname', 'Button')
  6925. .with('resource-id', 'android:id/button1')
  6926. .with('text', 'OK')
  6927.  
  6928. $ruiObj.click
  6929.  
  6930. waitsecond(1)
  6931. end
  6932.  
  6933. tcase << TestAction.new(:pressBack_7) do
  6934. pressBack
  6935. end
  6936.  
  6937. tcase << TestAction.new(:pressBack_8) do
  6938. pressBack
  6939. end
  6940.  
  6941. tcase << TestAction.new(:pressBack_20) do
  6942. pressBack
  6943. end
  6944.  
  6945. tcase << TestAction.new(:pressBack_20_1) do
  6946. pressBack
  6947. end
  6948.  
  6949. tcase << TestAction.new(:pressHome_9) do
  6950. pressHome
  6951. end
  6952.  
  6953. tcase.run(loopTime)
  6954.  
  6955. end
  6956.  
  6957. def self.change_LTE(loopTime)
  6958.  
  6959. tcase = TestCase.new("change_LTE")
  6960.  
  6961. tcase << TestAction.new(:gotoApp_16_1) do
  6962. gotoApp('HiddenMenuCall')
  6963. end
  6964.  
  6965. tcase << TestAction.new(:TextView_Title_3) do
  6966. $ruiObj = RUIObject.new.with('objectid', 1100751325).with('selfid', -167282287).with('textdescid', -350417171).with('uniqueparentid', 0).with('classresourceid', 490183159)
  6967. .with('uitreeindex', 1)
  6968. .with('classname', 'TextView')
  6969. .with('resource-id', 'android:id/title')
  6970. .with('text', 'LG Hidden Menu')
  6971.  
  6972. $ruiObj.click
  6973.  
  6974. waitsecond(1)
  6975. end
  6976.  
  6977. tcase << TestAction.new(:TextView_Title_87) do
  6978. $ruiObj = RUIObject.new.with('objectid', 684902757).with('selfid', 538152793).with('textdescid', -1915478867).with('uniqueparentid', 0).with('classresourceid', 490183159)
  6979. .with('uitreeindex', 4)
  6980. .with('classname', 'TextView')
  6981. .with('resource-id', 'android:id/title')
  6982. .with('text', 'Field Test')
  6983.  
  6984. $ruiObj.click
  6985.  
  6986. waitsecond(1)
  6987. end
  6988.  
  6989. tcase << TestAction.new(:TextView_Text1_10) do
  6990. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', -141259386).with('textdescid', -734720867).with('uniqueparentid', 0).with('classresourceid', 490068035)
  6991. .with('uitreeindex', 1)
  6992. .with('classname', 'TextView')
  6993. .with('resource-id', 'android:id/text1')
  6994. .with('text', 'Modem Settings')
  6995.  
  6996. $ruiObj.click
  6997.  
  6998. waitsecond(1)
  6999. end
  7000.  
  7001. tcase << TestAction.new(:swipeDown_12) do
  7002. swipe_vertical 500
  7003.  
  7004. waitsecond(1)
  7005. end
  7006.  
  7007. tcase << TestAction.new(:TextView_Text1_14) do
  7008. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', 12767364).with('textdescid', 1760273017).with('uniqueparentid', 0).with('classresourceid', 490068035)
  7009. .with('uitreeindex', 6)
  7010. .with('classname', 'TextView')
  7011. .with('resource-id', 'android:id/text1')
  7012. .with('text', 'RAT Selection')
  7013.  
  7014. $ruiObj.click
  7015.  
  7016. waitsecond(1)
  7017. end
  7018.  
  7019. tcase << TestAction.new(:TextView_Text1_2) do
  7020. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', 747569194).with('textdescid', -1653100487).with('uniqueparentid', 0).with('classresourceid', 490068035)
  7021. .with('uitreeindex', 1)
  7022. .with('classname', 'TextView')
  7023. .with('resource-id', 'android:id/text1')
  7024. .with('text', 'GSM WCDMA LTE auto')
  7025.  
  7026. $ruiObj.click
  7027.  
  7028. waitsecond(1)
  7029. end
  7030.  
  7031. tcase << TestAction.new(:Button_Button1_18) do
  7032. $ruiObj = RUIObject.new.with('objectid', 2089308220).with('selfid', -1318451484).with('textdescid', 1664978912).with('uniqueparentid', 0)
  7033. .with('uitreeindex', 1)
  7034. .with('classname', 'Button')
  7035. .with('resource-id', 'android:id/button1')
  7036. .with('text', 'OK')
  7037.  
  7038. $ruiObj.click
  7039.  
  7040. waitsecond(1)
  7041. end
  7042.  
  7043. tcase << TestAction.new(:pressBack_7) do
  7044. pressBack
  7045. end
  7046.  
  7047. tcase << TestAction.new(:pressBack_8) do
  7048. pressBack
  7049. end
  7050.  
  7051. tcase << TestAction.new(:pressBack_20) do
  7052. pressBack
  7053. end
  7054.  
  7055. tcase << TestAction.new(:pressBack_20_1) do
  7056. pressBack
  7057. end
  7058.  
  7059. tcase << TestAction.new(:pressHome_9) do
  7060. pressHome
  7061. end
  7062.  
  7063. tcase.run(loopTime)
  7064.  
  7065. end
  7066.  
  7067. def self.connectWifi(loopTime)
  7068.  
  7069. tcase = TestCase.new("connectWifi")
  7070.  
  7071. tcase << TestAction.new(:scriptAction_2) do
  7072. logStartTest("Connect_to_wifi")
  7073. end
  7074.  
  7075. tcase << TestAction.new(:scriptAction_4) do
  7076. gotoSettings
  7077.  
  7078. waitsecond(2)
  7079. end
  7080.  
  7081. tcase << TestAction.new(:TextView_Title_27) do
  7082. $ruiObj = RUIObject.new.with('objectid', 674368800).with('selfid', -2078686330).with('textdescid', -957350501).with('uniqueparentid', 0)
  7083. .with('uitreeindex', 3)
  7084. .with('classname', 'TextView')
  7085. .with('resource-id', 'android:id/title')
  7086. .with('text', 'Networks')
  7087.  
  7088. $ruiObj.click
  7089.  
  7090. waitsecond(1)
  7091. end
  7092.  
  7093. tcase << TestAction.new(:swipeUp_8) do
  7094. swipe_vertical_back 500
  7095. end
  7096.  
  7097. tcase << TestAction.new(:TextView_Title_4) do
  7098. $ruiObj = RUIObject.new.with('objectid', 2008023572).with('selfid', -589731018).with('textdescid', 498664031).with('uniqueparentid', 0).with('classresourceid', 490183159)
  7099. .with('uitreeindex', 9)
  7100. .with('classname', 'TextView')
  7101. .with('resource-id', 'android:id/title')
  7102. .with('text', 'WiFi')
  7103.  
  7104. $ruiObj.click
  7105.  
  7106. waitsecond(1)
  7107. end
  7108.  
  7109. tcase << TestAction.new(:Button_Button2_2) do
  7110. $ruiObj = RUIObject.new.with('objectid', -360890209).with('selfid', 1219598511).with('textdescid', -1570382871).with('uniqueparentid', 0)
  7111. .with('uitreeindex', 2)
  7112. .with('classname', 'Button')
  7113. .with('resource-id', 'android:id/button2')
  7114. .with('text', 'CLOSE')
  7115.  
  7116. $ruiObj.click
  7117.  
  7118. waitsecond(2)
  7119. end
  7120.  
  7121. tcase << TestAction.new(:scriptAction_6) do
  7122. switchOff = RUIObject.new.with('objectid', 1178284996).with('selfid', -533646533).with('textdescid', -1104515187).with('uniqueparentid', 0)
  7123. .with('uitreeindex', 2)
  7124. .with('classname', 'Switch')
  7125. .with('text', 'OFF')
  7126.  
  7127. if switchOff.isExist
  7128. switchOff.click
  7129. end
  7130.  
  7131. waitsecond(2)
  7132. end
  7133.  
  7134. tcase << TestAction.new(:ImageButton_More_8) do
  7135. $ruiObj = RUIObject.new.with('objectid', 1634319278).with('selfid', 1290820192).with('textdescid', 371464933).with('uniqueparentid', 0)
  7136. .with('uitreeindex', 3)
  7137. .with('classname', 'ImageButton')
  7138. .with('content-desc', 'More options')
  7139.  
  7140. $ruiObj.click
  7141.  
  7142. waitsecond(2)
  7143. end
  7144.  
  7145. tcase << TestAction.new(:TextView_Title_105) do
  7146. $ruiObj = RUIObject.new.with('objectid', -1984796814).with('selfid', -392058123).with('textdescid', -1929502754).with('uniqueparentid', 0).with('classresourceid', 490183159)
  7147. .with('uitreeindex', 0)
  7148. .with('classname', 'TextView')
  7149. .with('resource-id', 'android:id/title')
  7150. .with('text', 'Add WiFi')
  7151.  
  7152. $ruiObj.click
  7153.  
  7154. waitsecond(2)
  7155. end
  7156.  
  7157. tcase << TestAction.new(:EditText_Ssid_12) do
  7158. $ruiObj = RUIObject.new.with('objectid', 1745689399).with('selfid', 1359933717).with('textdescid', -1718203447).with('uniqueparentid', 0).with('classresourceid', -1413606463)
  7159. .with('uitreeindex', 2)
  7160. .with('classname', 'EditText')
  7161. .with('resource-id', 'com.lge.wifisettings:id/ssid')
  7162.  
  7163. $ruiObj.inputtext('qctcomp')
  7164.  
  7165. waitsecond(2)
  7166. end
  7167.  
  7168. tcase << TestAction.new(:TextView_Text1_14) do
  7169. $ruiObj = RUIObject.new.with('objectid', 189805031).with('selfid', -586759035).with('textdescid', 1468089423).with('uniqueparentid', 0).with('classresourceid', 490068035)
  7170. .with('uitreeindex', 4)
  7171. .with('classname', 'TextView')
  7172. .with('resource-id', 'android:id/text1')
  7173. .with('text', 'None')
  7174.  
  7175. $ruiObj.click
  7176.  
  7177. waitsecond(2)
  7178. end
  7179.  
  7180. tcase << TestAction.new(:CheckedTextView_Text1_16) do
  7181. $ruiObj = RUIObject.new.with('objectid', -540328984).with('selfid', 1449740166).with('textdescid', -877093410).with('uniqueparentid', 0).with('classresourceid', 2074814108)
  7182. .with('uitreeindex', 2)
  7183. .with('classname', 'CheckedTextView')
  7184. .with('resource-id', 'android:id/text1')
  7185. .with('text', 'WPAWPA2 PSK')
  7186.  
  7187. $ruiObj.click
  7188.  
  7189. waitsecond(2)
  7190. end
  7191.  
  7192. tcase << TestAction.new(:EditText_Password_12) do
  7193. $ruiObj = RUIObject.new.with('objectid', -976316462).with('selfid', -2120332491).with('textdescid', -201039218).with('uniqueparentid', 0).with('classresourceid', -714852383)
  7194. .with('uitreeindex', 2)
  7195. .with('classname', 'EditText')
  7196. .with('resource-id', 'com.lge.wifisettings:id/password')
  7197.  
  7198. $ruiObj.inputtext('12abcdef34')
  7199.  
  7200. waitsecond(1)
  7201. end
  7202.  
  7203. tcase << TestAction.new(:Button_Button1_2) do
  7204. $ruiObj = RUIObject.new.with('objectid', -1696842928).with('selfid', -210572094).with('textdescid', -1246235802).with('uniqueparentid', 0).with('classresourceid', 1834539358)
  7205. .with('uitreeindex', 10)
  7206. .with('classname', 'Button')
  7207. .with('resource-id', 'android:id/button1')
  7208. .with('text', 'CONNECT')
  7209.  
  7210. $ruiObj.click
  7211.  
  7212. waitsecond(4)
  7213. end
  7214.  
  7215. tcase << TestAction.new(:Button_Button2_18) do
  7216. $ruiObj = RUIObject.new.with('objectid', 435325163).with('selfid', 871101384).with('textdescid', 1989464844).with('uniqueparentid', 0)
  7217. .with('uitreeindex', 4)
  7218. .with('classname', 'Button')
  7219. .with('resource-id', 'android:id/button2')
  7220. .with('text', 'SKIP')
  7221.  
  7222. $ruiObj.click
  7223.  
  7224. waitsecond(2)
  7225. end
  7226.  
  7227. tcase << TestAction.new(:TextView_Summary_16) do
  7228. $ruiObj = RUIObject.new.with('objectid', 1399891586).with('selfid', -404041766).with('textdescid', 623785653).with('uniqueparentid', 0).with('classresourceid', -1930775675)
  7229. .with('uitreeindex', 10)
  7230. .with('classname', 'TextView')
  7231. .with('resource-id', 'android:id/summary')
  7232. .with('text', 'Connected')
  7233.  
  7234. $ruiObj.isExist
  7235. end
  7236.  
  7237. tcase << TestAction.new(:scriptAction_23_TrueFalse) do
  7238. $myTestResult = checkLastExistResult
  7239.  
  7240. if $myTestResult == false
  7241. $myFailReason == "WiFi cannot connected"
  7242. end
  7243. logStopTest("Connect_to_wifi")
  7244. end
  7245.  
  7246. tcase << TestAction.new(:pressBack_15) do
  7247. pressBack
  7248. end
  7249.  
  7250. tcase << TestAction.new(:pressBack_16) do
  7251. pressBack
  7252. end
  7253.  
  7254. tcase << TestAction.new(:pressHome_17) do
  7255. pressHome
  7256. end
  7257.  
  7258. tcase.run(loopTime)
  7259.  
  7260. end
  7261.  
  7262. def self.disconnectWifi(loopTime)
  7263.  
  7264. tcase = TestCase.new("disconnectWifi")
  7265.  
  7266. tcase << TestAction.new(:scriptAction_2) do
  7267. gotoSettings
  7268.  
  7269. waitsecond(2)
  7270. end
  7271.  
  7272. tcase << TestAction.new(:TextView_Title_3) do
  7273. $ruiObj = RUIObject.new.with('objectid', 10212784).with('selfid', -2078686330).with('textdescid', 1550078507).with('uniqueparentid', 0)
  7274. .with('uitreeindex', 5)
  7275. .with('classname', 'TextView')
  7276. .with('resource-id', 'android:id/title')
  7277. .with('text', 'Networks')
  7278.  
  7279. $ruiObj.click
  7280.  
  7281. waitsecond(2)
  7282. end
  7283.  
  7284. tcase << TestAction.new(:swipeUp_8_1) do
  7285. swipe_vertical_back 500
  7286. end
  7287.  
  7288. tcase << TestAction.new(:TextView_Title_7) do
  7289. $ruiObj = RUIObject.new.with('objectid', 67205646).with('selfid', -589731018).with('textdescid', 397088473).with('uniqueparentid', 0).with('classresourceid', 490183159)
  7290. .with('uitreeindex', 16)
  7291. .with('classname', 'TextView')
  7292. .with('resource-id', 'android:id/title')
  7293. .with('text', 'WiFi')
  7294.  
  7295. $ruiObj.click
  7296.  
  7297. waitsecond(2)
  7298. end
  7299.  
  7300. tcase << TestAction.new(:scriptAction_9) do
  7301. $ruiObj = RUIObject.new.with('objectid', 1178284996).with('selfid', 1645353587).with('textdescid', -1975291963).with('uniqueparentid', 0)
  7302. .with('uitreeindex', 2)
  7303. .with('classname', 'Switch')
  7304. .with('text', 'ON')
  7305.  
  7306. if $ruiObj.isExist
  7307. $ruiObj.click
  7308. end
  7309.  
  7310. waitsecond(2)
  7311. end
  7312.  
  7313. tcase << TestAction.new(:pressBack_2) do
  7314. pressBack
  7315.  
  7316. waitsecond(2)
  7317. end
  7318.  
  7319. tcase << TestAction.new(:pressBack_3) do
  7320. pressBack
  7321.  
  7322. waitsecond(2)
  7323. end
  7324.  
  7325. tcase << TestAction.new(:pressBack_4) do
  7326. pressBack
  7327.  
  7328. waitsecond(2)
  7329. end
  7330.  
  7331. tcase.run(loopTime)
  7332.  
  7333. end
  7334.  
  7335. def self.enhanced_LTE_service(loopTime)
  7336.  
  7337. tcase = TestCase.new("enhanced_LTE_service")
  7338.  
  7339. tcase << TestAction.new(:pressHome_1) do
  7340. pressHome
  7341.  
  7342. waitsecond(2)
  7343. end
  7344.  
  7345. tcase << TestAction.new(:gotoApp_5_1) do
  7346. gotoApp('Settings')
  7347.  
  7348. waitsecond(1)
  7349. end
  7350.  
  7351. tcase << TestAction.new(:TextView_Title_2) do
  7352. $ruiObj = RUIObject.new.with('objectid', 10212784).with('selfid', -2078686330).with('textdescid', 1550078507).with('uniqueparentid', 0)
  7353. .with('uitreeindex', 5)
  7354. .with('classname', 'TextView')
  7355. .with('resource-id', 'android:id/title')
  7356. .with('text', 'Networks')
  7357.  
  7358. $ruiObj.click
  7359.  
  7360. waitsecond(2)
  7361. end
  7362.  
  7363. tcase << TestAction.new(:swipeDown_3) do
  7364. swipe_vertical 500
  7365.  
  7366. waitsecond(2)
  7367. end
  7368.  
  7369. tcase << TestAction.new(:TextView_Title_5) do
  7370. $ruiObj = RUIObject.new.with('objectid', -2099539841).with('selfid', -590021802).with('textdescid', -1389148054).with('uniqueparentid', 0).with('classresourceid', 490183159)
  7371. .with('uitreeindex', 34)
  7372. .with('classname', 'TextView')
  7373. .with('resource-id', 'android:id/title')
  7374. .with('text', 'More')
  7375.  
  7376. $ruiObj.click
  7377.  
  7378. waitsecond(2)
  7379. end
  7380.  
  7381. tcase << TestAction.new(:Switch_SwitchWidget_7) do
  7382. $ruiObj = RUIObject.new.with('objectid', -1128160036).with('selfid', -1798770950).with('textdescid', -613222716).with('uniqueparentid', 0).with('classresourceid', -205276468)
  7383. .with('uitreeindex', 4)
  7384. .with('classname', 'Switch')
  7385. .with('resource-id', 'android:id/switch_widget')
  7386.  
  7387. $ruiObj.click
  7388.  
  7389. waitsecond(2)
  7390. end
  7391.  
  7392. tcase.run(loopTime)
  7393.  
  7394. end
  7395.  
  7396. def self.startTest(loopTime)
  7397.  
  7398. tcase = TestCase.new("startTest")
  7399.  
  7400. tcase << TestAction.new(:pressBack_1) do
  7401. pressBack
  7402. end
  7403.  
  7404. tcase << TestAction.new(:pressBack_2) do
  7405. pressBack
  7406. end
  7407.  
  7408. tcase << TestAction.new(:pressHome_3) do
  7409. pressHome
  7410. end
  7411.  
  7412. tcase.run(loopTime)
  7413.  
  7414. end
  7415.  
  7416. def self.Browser_05_01_04_02(loopTime)
  7417.  
  7418. tcase = TestCase.new("Browser_05_01_04_02")
  7419.  
  7420. tcase << TestAction.new(:pressBack_10_1) do
  7421. pressBack
  7422. end
  7423.  
  7424. tcase << TestAction.new(:pressHome_4_1) do
  7425. pressHome
  7426. end
  7427.  
  7428. tcase << TestAction.new(:logStart) do
  7429. logStartTest("Browser_05_01_04_02")
  7430. end
  7431.  
  7432. tcase << TestAction.new(:gotoApp_21) do
  7433. gotoApp('Chrome')
  7434. end
  7435.  
  7436. tcase << TestAction.new(:EditText_UrlBar_2) do
  7437. $ruiObj = RUIObject.new.with('objectid', 882195433).with('selfid', 613381324).with('textdescid', 1578254679).with('uniqueparentid', 0)
  7438. .with('uitreeindex', 40)
  7439. .with('classname', 'EditText')
  7440. .with('resource-id', 'com.android.chrome:id/url_bar')
  7441.  
  7442. $ruiObj.click
  7443.  
  7444. waitsecond(1)
  7445. end
  7446.  
  7447. tcase << TestAction.new(:EditText_UrlBar_2_1) do
  7448. $ruiObj = RUIObject.new.with('objectid', 882195433).with('selfid', 613381324).with('textdescid', 1578254679).with('uniqueparentid', 0)
  7449. .with('uitreeindex', 40)
  7450. .with('classname', 'EditText')
  7451. .with('resource-id', 'com.android.chrome:id/url_bar')
  7452.  
  7453. $ruiObj.inputtext('www.naver.com')
  7454.  
  7455. waitsecond(1)
  7456. end
  7457.  
  7458. tcase << TestAction.new(:pressEnter_6) do
  7459. pressEnter
  7460.  
  7461. waitsecond(4)
  7462. end
  7463.  
  7464. tcase << TestAction.new(:wait4second_8) do
  7465. waitsecond(4)
  7466. end
  7467.  
  7468. tcase << TestAction.new(:LinearLayout_4) do
  7469. $ruiObj = RUIObject.new
  7470. .with('classname', 'LinearLayout')
  7471.  
  7472. $ruiObj.click
  7473.  
  7474. waitsecond(2)
  7475. end
  7476.  
  7477. tcase << TestAction.new(:clickXY_7065_25515_13_1) do
  7478. click(706.5,2551.5)
  7479.  
  7480. waitsecond(2)
  7481. end
  7482.  
  7483. tcase << TestAction.new(:swipeDown_10) do
  7484. swipe_vertical 500
  7485.  
  7486. waitsecond(2)
  7487. end
  7488.  
  7489. tcase << TestAction.new(:clickXY_7065_25515_13_1_1) do
  7490. click(706.5,2551.5)
  7491.  
  7492. waitsecond(2)
  7493. end
  7494.  
  7495. tcase << TestAction.new(:swipeDown_9) do
  7496. swipe_vertical 500
  7497.  
  7498. waitsecond(2)
  7499. end
  7500.  
  7501. tcase << TestAction.new(:clickXY_7065_25515_13_1_1_1) do
  7502. click(706.5,2551.5)
  7503.  
  7504. waitsecond(2)
  7505. end
  7506.  
  7507. tcase << TestAction.new(:logStop) do
  7508. $reload = RUIObject.new.with('objectid', -1298956826).with('selfid', 1403544531).with('textdescid', 1877548115).with('uniqueparentid', 0)
  7509. .with('uitreeindex', 4)
  7510. .with('classname', 'Button')
  7511. .with('resource-id', 'reload-button')
  7512. .with('content-desc', 'RELOAD').exists?
  7513.  
  7514. $progressBar = RUIObject.new.with('objectid', 1158061653).with('selfid', 1366906829).with('textdescid', 1540172907).with('uniqueparentid', 0)
  7515. .with('uitreeindex', 18)
  7516. .with('classname', 'ImageView')
  7517. .with('resource-id', 'com.android.chrome:id/progress').exists?
  7518.  
  7519. if ($progressBar || $reload) == true
  7520. $myTestResult = false
  7521. else
  7522. $myTestResult = true
  7523. end
  7524. if $myTestResult == false
  7525. $myFailReason = "Page not loaded."
  7526. end
  7527. logStopTest("Browser_05_01_04_01")
  7528. end
  7529.  
  7530. tcase << TestAction.new(:FrameLayout_5) do
  7531. $ruiObj = RUIObject.new
  7532. .with('classname', 'FrameLayout')
  7533.  
  7534. $ruiObj.click
  7535.  
  7536. waitsecond(2)
  7537. end
  7538.  
  7539. tcase << TestAction.new(:FrameLayout_6) do
  7540. $ruiObj = RUIObject.new
  7541. .with('classname', 'FrameLayout')
  7542.  
  7543. $ruiObj.click
  7544.  
  7545. waitsecond(2)
  7546. end
  7547.  
  7548. tcase << TestAction.new(:LinearLayout_7) do
  7549. $ruiObj = RUIObject.new
  7550. .with('classname', 'LinearLayout')
  7551.  
  7552. $ruiObj.click
  7553.  
  7554. waitsecond(2)
  7555. end
  7556.  
  7557. tcase << TestAction.new(:pressBack_10_1_1) do
  7558. pressBack
  7559. end
  7560.  
  7561. tcase << TestAction.new(:pressHome_4_1_1) do
  7562. pressHome
  7563. end
  7564.  
  7565. tcase.run(loopTime)
  7566.  
  7567. end
  7568.  
  7569. def self.Browser_05_01_04_01(loopTime)
  7570.  
  7571. tcase = TestCase.new("Browser_05_01_04_01")
  7572.  
  7573. tcase << TestAction.new(:pressBack_1_1) do
  7574. pressBack
  7575. end
  7576.  
  7577. tcase << TestAction.new(:pressHome_5) do
  7578. pressHome
  7579.  
  7580. waitsecond(2)
  7581. end
  7582.  
  7583. tcase << TestAction.new(:logStart) do
  7584. logStartTest("Browser_05_01_04_01")
  7585. end
  7586.  
  7587. tcase << TestAction.new(:gotoApp_2) do
  7588. gotoApp('Chrome')
  7589. end
  7590.  
  7591. tcase << TestAction.new(:Button_TermsAccept_6) do
  7592. $ruiObj = RUIObject.new.with('objectid', 1131623741).with('selfid', 2073999009).with('textdescid', -212510162).with('uniqueparentid', 0)
  7593. .with('uitreeindex', 4)
  7594. .with('classname', 'Button')
  7595. .with('resource-id', 'com.android.chrome:id/terms_accept')
  7596. .with('text', 'ACCEPT CONTINUE')
  7597.  
  7598. $ruiObj.click
  7599.  
  7600. waitsecond(1)
  7601. end
  7602.  
  7603. tcase << TestAction.new(:Button_PositiveButton_8_1) do
  7604. $ruiObj = RUIObject.new.with('objectid', -1302979962).with('selfid', -1854494819).with('textdescid', 1350385207).with('uniqueparentid', 0)
  7605. .with('uitreeindex', 10)
  7606. .with('classname', 'Button')
  7607. .with('resource-id', 'com.android.chrome:id/positive_button')
  7608. .with('text', 'OK GOT IT')
  7609.  
  7610. $ruiObj.isExist
  7611. ifFailJumpTo(:EditText_UrlBar_24)
  7612.  
  7613. waitsecond(1)
  7614. end
  7615.  
  7616. tcase << TestAction.new(:swipeDown_2) do
  7617. swipe_vertical 500
  7618.  
  7619. waitsecond(2)
  7620. end
  7621.  
  7622. tcase << TestAction.new(:Button_PositiveButton_8) do
  7623. $ruiObj = RUIObject.new.with('objectid', -1302979962).with('selfid', -1854494819).with('textdescid', 1350385207).with('uniqueparentid', 0)
  7624. .with('uitreeindex', 10)
  7625. .with('classname', 'Button')
  7626. .with('resource-id', 'com.android.chrome:id/positive_button')
  7627. .with('text', 'OK GOT IT')
  7628.  
  7629. $ruiObj.click
  7630.  
  7631. waitsecond(1)
  7632. end
  7633.  
  7634. tcase << TestAction.new(:EditText_UrlBar_24) do
  7635. $ruiObj = RUIObject.new.with('objectid', 882195433).with('selfid', 613381324).with('textdescid', 1578254679).with('uniqueparentid', 0)
  7636. .with('uitreeindex', 138)
  7637. .with('classname', 'EditText')
  7638. .with('resource-id', 'com.android.chrome:id/url_bar')
  7639.  
  7640. $ruiObj.click
  7641.  
  7642. waitsecond(1)
  7643. end
  7644.  
  7645. tcase << TestAction.new(:EditText_UrlBar_2) do
  7646. $ruiObj = RUIObject.new.with('objectid', 882195433).with('selfid', 613381324).with('textdescid', 1578254679).with('uniqueparentid', 0)
  7647. .with('uitreeindex', 21)
  7648. .with('classname', 'EditText')
  7649. .with('resource-id', 'com.android.chrome:id/url_bar')
  7650.  
  7651. $ruiObj.inputtext('m.att.com')
  7652.  
  7653. waitsecond(1)
  7654. end
  7655.  
  7656. tcase << TestAction.new(:pressEnter_5) do
  7657. pressEnter
  7658.  
  7659. waitsecond(2)
  7660. end
  7661.  
  7662. tcase << TestAction.new(:wait4second_2) do
  7663. waitsecond(4)
  7664. end
  7665.  
  7666. tcase << TestAction.new(:logStop) do
  7667. $reload = RUIObject.new.with('objectid', -1298956826).with('selfid', 1403544531).with('textdescid', 1877548115).with('uniqueparentid', 0)
  7668. .with('uitreeindex', 4)
  7669. .with('classname', 'Button')
  7670. .with('resource-id', 'reload-button')
  7671. .with('content-desc', 'RELOAD').exists?
  7672.  
  7673. $progressBar = RUIObject.new.with('objectid', 1158061653).with('selfid', 1366906829).with('textdescid', 1540172907).with('uniqueparentid', 0)
  7674. .with('uitreeindex', 18)
  7675. .with('classname', 'ImageView')
  7676. .with('resource-id', 'com.android.chrome:id/progress').exists?
  7677.  
  7678. if ($progressBar || $reload) == true
  7679. $myTestResult = false
  7680. else
  7681. $myTestResult = true
  7682. end
  7683. if $myTestResult == false
  7684. $myFailReason = "Page not loaded."
  7685. end
  7686. logStopTest("Browser_05_01_04_01")
  7687. end
  7688.  
  7689. tcase << TestAction.new(:pressBack_2) do
  7690. pressBack
  7691.  
  7692. waitsecond(2)
  7693. end
  7694.  
  7695. tcase << TestAction.new(:pressHome_3) do
  7696. pressHome
  7697.  
  7698. waitsecond(2)
  7699. end
  7700.  
  7701. tcase.run(loopTime)
  7702.  
  7703. end
  7704.  
  7705. def self.Browser_05_01_04_03(loopTime)
  7706.  
  7707. tcase = TestCase.new("Browser_05_01_04_03")
  7708.  
  7709. tcase << TestAction.new(:scriptAction_2_1_1_1) do
  7710. logStartTest("Browser_05_01_04_03")
  7711. end
  7712.  
  7713. tcase << TestAction.new(:gotoApp_2) do
  7714. gotoApp('Chrome')
  7715. end
  7716.  
  7717. tcase << TestAction.new(:EditText_UrlBar_27) do
  7718. $ruiObj = RUIObject.new.with('objectid', 1651866124).with('selfid', 613381324).with('textdescid', -331757676).with('uniqueparentid', 0)
  7719. .with('uitreeindex', 2)
  7720. .with('classname', 'EditText')
  7721. .with('resource-id', 'com.android.chrome:id/url_bar')
  7722.  
  7723. $ruiObj.click
  7724. noFailCheck
  7725.  
  7726. waitsecond(1)
  7727. end
  7728.  
  7729. tcase << TestAction.new(:EditText_UrlBar_27_1) do
  7730. $ruiObj = RUIObject.new.with('objectid', 1651866124).with('selfid', 613381324).with('textdescid', -331757676).with('uniqueparentid', 0)
  7731. .with('uitreeindex', 2)
  7732. .with('classname', 'EditText')
  7733. .with('resource-id', 'com.android.chrome:id/url_bar')
  7734.  
  7735. $ruiObj.inputtext('www.ebay.com')
  7736. noFailCheck
  7737.  
  7738. waitsecond(1)
  7739. end
  7740.  
  7741. tcase << TestAction.new(:pressEnter_10) do
  7742. pressEnter
  7743.  
  7744. waitsecond(8)
  7745. end
  7746.  
  7747. tcase << TestAction.new(:EditText_UrlBar_27_1) do
  7748. $ruiObj = RUIObject.new.with('objectid', 1651866124).with('selfid', 613381324).with('textdescid', -331757676).with('uniqueparentid', 0)
  7749. .with('uitreeindex', 2)
  7750. .with('classname', 'EditText')
  7751. .with('resource-id', 'com.android.chrome:id/url_bar')
  7752.  
  7753. $ruiObj.click
  7754. noFailCheck
  7755.  
  7756. waitsecond(1)
  7757. end
  7758.  
  7759. tcase << TestAction.new(:EditText_UrlBar_4) do
  7760. $ruiObj = RUIObject.new.with('objectid', 1651866124).with('selfid', 613381324).with('textdescid', -331757676).with('uniqueparentid', 0)
  7761. .with('uitreeindex', 2)
  7762. .with('classname', 'EditText')
  7763. .with('resource-id', 'com.android.chrome:id/url_bar')
  7764.  
  7765. $ruiObj.inputtext('www.yahoo.com')
  7766. noFailCheck
  7767.  
  7768. waitsecond(1)
  7769. end
  7770.  
  7771. tcase << TestAction.new(:pressEnter_12) do
  7772. pressEnter
  7773.  
  7774. waitsecond(8)
  7775. end
  7776.  
  7777. tcase << TestAction.new(:EditText_UrlBar_27_1_1) do
  7778. $ruiObj = RUIObject.new.with('objectid', 1651866124).with('selfid', 613381324).with('textdescid', -331757676).with('uniqueparentid', 0)
  7779. .with('uitreeindex', 2)
  7780. .with('classname', 'EditText')
  7781. .with('resource-id', 'com.android.chrome:id/url_bar')
  7782.  
  7783. $ruiObj.click
  7784. noFailCheck
  7785.  
  7786. waitsecond(1)
  7787. end
  7788.  
  7789. tcase << TestAction.new(:EditText_UrlBar_5) do
  7790. $ruiObj = RUIObject.new.with('objectid', 1651866124).with('selfid', 613381324).with('textdescid', -331757676).with('uniqueparentid', 0)
  7791. .with('uitreeindex', 2)
  7792. .with('classname', 'EditText')
  7793. .with('resource-id', 'com.android.chrome:id/url_bar')
  7794.  
  7795. $ruiObj.inputtext('www.amazon.com')
  7796. noFailCheck
  7797.  
  7798. waitsecond(1)
  7799. end
  7800.  
  7801. tcase << TestAction.new(:pressEnter_14) do
  7802. pressEnter
  7803.  
  7804. waitsecond(8)
  7805. end
  7806.  
  7807. tcase << TestAction.new(:EditText_UrlBar_27_1_1_1) do
  7808. $ruiObj = RUIObject.new.with('objectid', 1651866124).with('selfid', 613381324).with('textdescid', -331757676).with('uniqueparentid', 0)
  7809. .with('uitreeindex', 2)
  7810. .with('classname', 'EditText')
  7811. .with('resource-id', 'com.android.chrome:id/url_bar')
  7812.  
  7813. $ruiObj.click
  7814. noFailCheck
  7815.  
  7816. waitsecond(1)
  7817. end
  7818.  
  7819. tcase << TestAction.new(:EditText_UrlBar_3) do
  7820. $ruiObj = RUIObject.new.with('objectid', 882195433).with('selfid', 613381324).with('textdescid', 1578254679).with('uniqueparentid', 0)
  7821. .with('uitreeindex', 177)
  7822. .with('classname', 'EditText')
  7823. .with('resource-id', 'com.android.chrome:id/url_bar')
  7824.  
  7825. $ruiObj.inputtext('www.youtube.com')
  7826.  
  7827. waitsecond(1)
  7828. end
  7829.  
  7830. tcase << TestAction.new(:pressEnter_16) do
  7831. pressEnter
  7832.  
  7833. waitsecond(8)
  7834. end
  7835.  
  7836. tcase << TestAction.new(:EditText_UrlBar_27_1_1_1_1) do
  7837. $ruiObj = RUIObject.new.with('objectid', 1651866124).with('selfid', 613381324).with('textdescid', -331757676).with('uniqueparentid', 0)
  7838. .with('uitreeindex', 2)
  7839. .with('classname', 'EditText')
  7840. .with('resource-id', 'com.android.chrome:id/url_bar')
  7841.  
  7842. $ruiObj.click
  7843. noFailCheck
  7844.  
  7845. waitsecond(1)
  7846. end
  7847.  
  7848. tcase << TestAction.new(:EditText_UrlBar_7) do
  7849. $ruiObj = RUIObject.new.with('objectid', 1651866124).with('selfid', 613381324).with('textdescid', -331757676).with('uniqueparentid', 0)
  7850. .with('uitreeindex', 2)
  7851. .with('classname', 'EditText')
  7852. .with('resource-id', 'com.android.chrome:id/url_bar')
  7853.  
  7854. $ruiObj.inputtext('www.nytimes.com')
  7855. noFailCheck
  7856.  
  7857. waitsecond(1)
  7858. end
  7859.  
  7860. tcase << TestAction.new(:pressEnter_18) do
  7861. pressEnter
  7862.  
  7863. waitsecond(8)
  7864. end
  7865.  
  7866. tcase << TestAction.new(:wait2second_2) do
  7867. waitsecond(2)
  7868. end
  7869.  
  7870. tcase << TestAction.new(:scriptAction_1_1_1_1) do
  7871. $reload = RUIObject.new.with('objectid', -1298956826).with('selfid', 1403544531).with('textdescid', 1877548115).with('uniqueparentid', 0)
  7872. .with('uitreeindex', 4)
  7873. .with('classname', 'Button')
  7874. .with('resource-id', 'reload-button')
  7875. .with('content-desc', 'RELOAD').exists?
  7876.  
  7877. $progressBar = RUIObject.new.with('objectid', 1158061653).with('selfid', 1366906829).with('textdescid', 1540172907).with('uniqueparentid', 0)
  7878. .with('uitreeindex', 18)
  7879. .with('classname', 'ImageView')
  7880. .with('resource-id', 'com.android.chrome:id/progress').exists?
  7881.  
  7882. if ($progressBar || $reload) == true
  7883. $myTestResult = false
  7884. else
  7885. $myTestResult = true
  7886. end
  7887. if $myTestResult == false
  7888. $myFailReason = "Page not loaded."
  7889. end
  7890. logStopTest("Browser_05_01_04_01")
  7891. end
  7892.  
  7893. tcase << TestAction.new(:pressHome_8) do
  7894. pressHome
  7895. end
  7896.  
  7897. tcase.run(loopTime)
  7898.  
  7899. end
  7900.  
  7901. def self.Email_05_01_03_01(loopTime)
  7902.  
  7903. tcase = TestCase.new("Email_05_01_03_01")
  7904.  
  7905. tcase << TestAction.new(:pressHome_2) do
  7906. pressHome
  7907. end
  7908.  
  7909. tcase << TestAction.new(:scriptAction_12_1) do
  7910. logStartTest("Email_05_01_03_01")
  7911. end
  7912.  
  7913. tcase << TestAction.new(:gotoApp_3) do
  7914. gotoApp('Gmail')
  7915. end
  7916.  
  7917. tcase << TestAction.new(:ImageButton_ComposeButton_2) do
  7918. $ruiObj = RUIObject.new
  7919. .with('classname', 'ImageButton')
  7920. .with('resource-id', 'com.google.android.gm:id/compose_button')
  7921. .with('content-desc', 'Compose')
  7922.  
  7923. $ruiObj.click
  7924.  
  7925. waitsecond(2)
  7926. end
  7927.  
  7928. tcase << TestAction.new(:pressEnter_3) do
  7929. pressEnter
  7930. end
  7931.  
  7932. tcase << TestAction.new(:EditText_Txtemailsubject_6) do
  7933. $ruiObj = RUIObject.new.with('objectid', 1286174050).with('selfid', -1018848110).with('textdescid', 1216689918).with('uniqueparentid', 1959895911).with('classresourceid', 386631998)
  7934. .with('uitreeindex', 11)
  7935. .with('classname', 'EditText')
  7936. .with('resource-id', 'com.lge.email:id/txtEmailSubject')
  7937.  
  7938. $ruiObj.inputtext('Judy MTBF Email Test')
  7939.  
  7940. waitsecond(1)
  7941. end
  7942.  
  7943. tcase << TestAction.new(:clickXY_116_908_2) do
  7944. click(116,908)
  7945. end
  7946.  
  7947. tcase << TestAction.new(:View_EditBox_13_1) do
  7948. $ruiObj = RUIObject.new.with('objectid', 134611444).with('selfid', 1661648749).with('textdescid', 1161931405).with('uniqueparentid', -2001114113).with('classresourceid', -760537482)
  7949. .with('uitreeindex', 12)
  7950. .with('pretext', 'CcBcc')
  7951. .with('classname', 'android.view.View')
  7952. .with('resource-id', 'EditBox')
  7953. .with('content-desc', '
  7954.  
  7955. Sent from my LG Mobile')
  7956.  
  7957. $ruiObj.click
  7958. end
  7959.  
  7960. tcase << TestAction.new(:scriptAction_14) do
  7961. $ruiObj.inputtext('Testing UiEngine Email Test!!!')
  7962. end
  7963.  
  7964. tcase << TestAction.new(:Button_BtnsendAtnt_2) do
  7965. $ruiObj = RUIObject.new.with('objectid', 1747678584).with('selfid', 1651854553).with('textdescid', 36858568).with('uniqueparentid', 0)
  7966. .with('uitreeindex', 16)
  7967. .with('classname', 'Button')
  7968. .with('resource-id', 'com.lge.email:id/btnSend_atnt')
  7969. .with('content-desc', 'Send')
  7970. .with('text', 'SEND')
  7971.  
  7972. $ruiObj.click
  7973.  
  7974. waitsecond(2)
  7975. end
  7976.  
  7977. tcase << TestAction.new(:ImageView_Img1_18) do
  7978. $ruiObj = RUIObject.new.with('objectid', 577677288).with('selfid', 1832242753).with('textdescid', 1040024250).with('uniqueparentid', 0)
  7979. .with('uitreeindex', 13)
  7980. .with('classname', 'ImageView')
  7981. .with('resource-id', 'com.lge.email:id/img1')
  7982. .with('content-desc', 'Compose')
  7983.  
  7984. $ruiObj.isExist
  7985.  
  7986. waitsecond(2)
  7987. end
  7988.  
  7989. tcase << TestAction.new(:ImageView_Slidedrawerimg_20) do
  7990. $ruiObj = RUIObject.new.with('objectid', -431894634).with('selfid', -1542033050).with('textdescid', -503831734).with('uniqueparentid', 0)
  7991. .with('uitreeindex', 0)
  7992. .with('classname', 'ImageView')
  7993. .with('resource-id', 'com.lge.email:id/slidedrawerimg')
  7994.  
  7995. $ruiObj.click
  7996. end
  7997.  
  7998. tcase << TestAction.new(:TextView_DrawerChildName_22) do
  7999. $ruiObj = RUIObject.new.with('objectid', 2119189077).with('selfid', 232899905).with('textdescid', -1453017635).with('uniqueparentid', 0)
  8000. .with('uitreeindex', 19)
  8001. .with('classname', 'TextView')
  8002. .with('resource-id', 'com.lge.email:id/drawer_child_name')
  8003. .with('text', 'Sent')
  8004.  
  8005. $ruiObj.click
  8006.  
  8007. waitsecond(1)
  8008. end
  8009.  
  8010. tcase << TestAction.new(:clickXY_516_516_24) do
  8011. click(516,516)
  8012.  
  8013. waitsecond(1)
  8014. end
  8015.  
  8016. tcase << TestAction.new(:Button_Btnatntbottomdelete_4) do
  8017. $ruiObj = RUIObject.new.with('objectid', -2098725759).with('selfid', 480632483).with('textdescid', 1124287286).with('uniqueparentid', 0)
  8018. .with('uitreeindex', 18)
  8019. .with('classname', 'Button')
  8020. .with('resource-id', 'com.lge.email:id/btnAtntBottomDelete')
  8021. .with('text', 'DELETE')
  8022.  
  8023. $ruiObj.click
  8024.  
  8025. waitsecond(2)
  8026. end
  8027.  
  8028. tcase << TestAction.new(:Delete_Confirm_Button1_6) do
  8029. $ruiObj = RUIObject.new.with('objectid', 892548796).with('selfid', 982364851).with('textdescid', 658117233).with('uniqueparentid', 0)
  8030. .with('uitreeindex', 3)
  8031. .with('classname', 'Button')
  8032. .with('resource-id', 'android:id/button1')
  8033. .with('text', 'DELETE')
  8034.  
  8035. $ruiObj.click
  8036.  
  8037. waitsecond(2)
  8038. end
  8039.  
  8040. tcase << TestAction.new(:scriptAction_8) do
  8041. $myTestResult = checkLastExistResult
  8042.  
  8043. if $myTestResult == false
  8044. $myFailReason = "Email not sent"
  8045. end
  8046. logStopTest("Email_05_01_03_01")
  8047. end
  8048.  
  8049. tcase << TestAction.new(:pressBack_3) do
  8050. pressBack
  8051. end
  8052.  
  8053. tcase << TestAction.new(:pressBack_4) do
  8054. pressBack
  8055. end
  8056.  
  8057. tcase.run(loopTime)
  8058.  
  8059. end
  8060.  
  8061. def self.exception_handler
  8062. puts "Module Exception Hanlder..."
  8063. if ($lastPackageName == "android")
  8064. android_ExpHandler(1)
  8065. end
  8066. end
  8067.  
  8068. def self.run(loop)
  8069. mainLoop loop
  8070. end
  8071.  
  8072. end
  8073.  
  8074. $exceptionPackageNameList = []
  8075. $exceptionPackageNameList_exclude = []
  8076. $exceptionPackageNameList << "android"
  8077.  
  8078. def exception_handler
  8079. JUDY_UIENGINE_MTBF.exception_handler
  8080. end
  8081.  
  8082. $curProjectLogFile = $useLastLogFile
  8083.  
  8084. $curProjectLogFile = "JUDY_UIENGINE_MTBF_#{getTimeStamp}.log" if $useLastLogFile.nil?
  8085.  
  8086. $useLastLogFile = nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement