Advertisement
Guest User

Untitled

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