Advertisement
Guest User

Untitled

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