Advertisement
Guest User

Untitled

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