Advertisement
Guest User

Untitled

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