Advertisement
Guest User

Untitled

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