Advertisement
Guest User

Untitled

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