Advertisement
Guest User

Untitled

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