Advertisement
Guest User

Untitled

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