Advertisement
Guest User

Untitled

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