Advertisement
Guest User

Untitled

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