Advertisement
Guest User

Untitled

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