Advertisement
Guest User

Untitled

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