Guest User

Untitled

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