Guest User

Untitled

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