Advertisement
Guest User

Untitled

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