Advertisement
Guest User

Untitled

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