Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
158
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_06(loopTime)
  4953.  
  4954. tcase = TestCase.new("MultiTasking_05_01_08_06")
  4955.  
  4956. tcase << TestAction.new(:scriptAction_StartTestLog) do
  4957. logStartTest("05_01_08_06_MultiTasking")
  4958. end
  4959.  
  4960. tcase << TestAction.new(:scriptAction_2) do
  4961. gotoAppByAppDrawer("Chrome")
  4962.  
  4963. waitsecond(1)
  4964. end
  4965.  
  4966. tcase << TestAction.new(:ImageButton_DocumentMenuButton_2) do
  4967. $ruiObj = RUIObject.new.with('objectid', -1808270022).with('selfid', -336731118).with('textdescid', -1833889831).with('uniqueparentid', 0)
  4968. .with('uitreeindex', 439)
  4969. .with('classname', 'ImageButton')
  4970. .with('resource-id', 'com.android.chrome:id/document_menu_button')
  4971. .with('content-desc', 'More options')
  4972.  
  4973. $ruiObj.isExist
  4974.  
  4975. waitsecond(1)
  4976. end
  4977.  
  4978. tcase << TestAction.new(:scriptAction_LogStopTest) do
  4979. $myTestResult = checkLastExistResult
  4980.  
  4981. if $myTestResult == false
  4982. $myFailReason = "End button not found"
  4983. end
  4984. logStopTest("05_01_08_06_MultiTasking")
  4985. end
  4986.  
  4987. tcase << TestAction.new(:pressHome_1) do
  4988. pressHome
  4989. end
  4990.  
  4991. tcase.run(loopTime)
  4992.  
  4993. end
  4994.  
  4995. def self.NFC_05_01_11_01(loopTime)
  4996.  
  4997. tcase = TestCase.new("NFC_05_01_11_01")
  4998.  
  4999. tcase << TestAction.new(:scriptAction_StartTestLog) do
  5000. logStartTest("05_01_11_01_NFC")
  5001. end
  5002.  
  5003. tcase << TestAction.new(:gotoSettings) do
  5004. gotoSettings
  5005.  
  5006. waitsecond(2)
  5007. end
  5008.  
  5009. tcase << TestAction.new(:TextView_Title_2) do
  5010. $ruiObj = RUIObject.new.with('objectid', 674368800).with('selfid', -2078686330).with('textdescid', -957350501).with('uniqueparentid', 0)
  5011. .with('uitreeindex', 2)
  5012. .with('classname', 'TextView')
  5013. .with('resource-id', 'android:id/title')
  5014. .with('text', 'Networks')
  5015.  
  5016. $ruiObj.click
  5017.  
  5018. waitsecond(1)
  5019. end
  5020.  
  5021. tcase << TestAction.new(:swipeDown_2) do
  5022. swipe_vertical 500
  5023.  
  5024. waitsecond(2)
  5025. end
  5026.  
  5027. tcase << TestAction.new(:TextView_Title_4) do
  5028. $ruiObj = RUIObject.new.with('objectid', -487328458).with('selfid', 347833004).with('textdescid', -1018549621).with('uniqueparentid', 0).with('classresourceid', 490183159)
  5029. .with('uitreeindex', 28)
  5030. .with('classname', 'TextView')
  5031. .with('resource-id', 'android:id/title')
  5032. .with('text', 'Share connect')
  5033.  
  5034. $ruiObj.click
  5035.  
  5036. waitsecond(1)
  5037. end
  5038.  
  5039. tcase << TestAction.new(:TextView_Title_23) do
  5040. $ruiObj = RUIObject.new.with('objectid', -2103271856).with('selfid', -434675318).with('textdescid', -88389691).with('uniqueparentid', 0).with('classresourceid', 490183159)
  5041. .with('uitreeindex', 3)
  5042. .with('classname', 'TextView')
  5043. .with('resource-id', 'android:id/title')
  5044. .with('text', 'NFC')
  5045.  
  5046. $ruiObj.click
  5047.  
  5048. waitsecond(2)
  5049. end
  5050.  
  5051. tcase << TestAction.new(:CheckBox_Checkbox_6) do
  5052. $ruiObj = RUIObject.new.with('objectid', -263705807).with('selfid', -1860124933).with('textdescid', -1017369409).with('uniqueparentid', 0).with('classresourceid', 1150850933)
  5053. .with('uitreeindex', 3)
  5054. .with('classname', 'CheckBox')
  5055. .with('resource-id', 'android:id/checkbox')
  5056. .with('text', 'Dont show this again')
  5057.  
  5058. $ruiObj.click
  5059.  
  5060. waitsecond(2)
  5061. end
  5062.  
  5063. tcase << TestAction.new(:Button_Button1_8) do
  5064. $ruiObj = RUIObject.new.with('objectid', 1457638446).with('selfid', -1318451484).with('textdescid', 1001636562).with('uniqueparentid', 0)
  5065. .with('uitreeindex', 4)
  5066. .with('classname', 'Button')
  5067. .with('resource-id', 'android:id/button1')
  5068. .with('text', 'OK')
  5069.  
  5070. $ruiObj.click
  5071.  
  5072. waitsecond(2)
  5073. end
  5074.  
  5075. tcase << TestAction.new(:pressRecentApps_10) do
  5076. pressRecentApps
  5077.  
  5078. waitsecond(2)
  5079. end
  5080.  
  5081. tcase << TestAction.new(:TextView_Title_12) do
  5082. $ruiObj = RUIObject.new.with('objectid', 938621642).with('selfid', -793388445).with('textdescid', 656660918).with('uniqueparentid', 0).with('classresourceid', 1862600999)
  5083. .with('uitreeindex', 21)
  5084. .with('classname', 'TextView')
  5085. .with('resource-id', 'com.android.systemui:id/title')
  5086. .with('content-desc', 'Settings')
  5087. .with('text', 'Settings')
  5088.  
  5089. $ruiObj.click
  5090.  
  5091. waitsecond(2)
  5092. end
  5093.  
  5094. tcase << TestAction.new(:Switch_ON_14) do
  5095. $ruiObj = RUIObject.new.with('objectid', -2010047312).with('selfid', 1645353587).with('textdescid', -1677524303).with('uniqueparentid', 0)
  5096. .with('uitreeindex', 2)
  5097. .with('classname', 'Switch')
  5098. .with('text', 'ON')
  5099.  
  5100. $ruiObj.click
  5101.  
  5102. waitsecond(2)
  5103. end
  5104.  
  5105. tcase << TestAction.new(:Switch_OFF_4) do
  5106. $ruiObj = RUIObject.new.with('objectid', -2010047312).with('selfid', -533646533).with('textdescid', -463652319).with('uniqueparentid', 0)
  5107. .with('uitreeindex', 2)
  5108. .with('classname', 'Switch')
  5109. .with('text', 'OFF')
  5110.  
  5111. $ruiObj.isExist
  5112. end
  5113.  
  5114. tcase << TestAction.new(:Switch_OFF_4_1) do
  5115. $ruiObj = RUIObject.new.with('objectid', -2010047312).with('selfid', -533646533).with('textdescid', -463652319).with('uniqueparentid', 0)
  5116. .with('uitreeindex', 2)
  5117. .with('classname', 'Switch')
  5118. .with('text', 'OFF')
  5119.  
  5120. $ruiObj.click
  5121.  
  5122. waitsecond(2)
  5123. end
  5124.  
  5125. tcase << TestAction.new(:pressBack_7) do
  5126. pressBack
  5127. end
  5128.  
  5129. tcase << TestAction.new(:pressBack_8) do
  5130. pressBack
  5131. end
  5132.  
  5133. tcase << TestAction.new(:scriptAction_LogStopTest) do
  5134. $myTestResult = checkLastExistResult
  5135.  
  5136. if $myTestResult == false
  5137. $myFailReason = "End button not found"
  5138. end
  5139. logStopTest("05_01_11_01_NFC")
  5140. end
  5141.  
  5142. tcase << TestAction.new(:pressBack_10) do
  5143. pressBack
  5144. end
  5145.  
  5146. tcase << TestAction.new(:pressHome_7) do
  5147. pressHome
  5148.  
  5149. waitsecond(1)
  5150. end
  5151.  
  5152. tcase.run(loopTime)
  5153.  
  5154. end
  5155.  
  5156. def self.PIM_05_01_06_01(loopTime)
  5157.  
  5158. tcase = TestCase.new("PIM_05_01_06_01")
  5159.  
  5160. tcase << TestAction.new(:scriptAction_StartTestLog) do
  5161. logStartTest("05_01_06_01_PIM")
  5162. end
  5163.  
  5164. tcase << TestAction.new(:gotoApp_4) do
  5165. gotoApp('Calendar')
  5166. end
  5167.  
  5168. tcase << TestAction.new(:ImageView_2) do
  5169. $ruiObj = RUIObject.new.with('objectid', -30724256).with('selfid', 1125864064).with('textdescid', -952451904).with('uniqueparentid', 0)
  5170. .with('uitreeindex', 24)
  5171. .with('pretext', 'SAT')
  5172. .with('classname', 'ImageView')
  5173.  
  5174. $ruiObj.click
  5175.  
  5176. waitsecond(2)
  5177. end
  5178.  
  5179. tcase << TestAction.new(:EditText_Title_7) do
  5180. $ruiObj = RUIObject.new.with('objectid', -308497519).with('selfid', 2023914653).with('textdescid', -973488465).with('uniqueparentid', 0).with('classresourceid', 1943514993)
  5181. .with('uitreeindex', 4)
  5182. .with('classname', 'EditText')
  5183. .with('resource-id', 'com.android.calendar:id/title')
  5184.  
  5185. $ruiObj.inputtext('Event')
  5186.  
  5187. waitsecond(2)
  5188. end
  5189.  
  5190. tcase << TestAction.new(:Button_BtnDone_9) do
  5191. $ruiObj = RUIObject.new.with('objectid', 2099795980).with('selfid', 2133354936).with('textdescid', -644044497).with('uniqueparentid', 0)
  5192. .with('uitreeindex', 32)
  5193. .with('classname', 'Button')
  5194. .with('resource-id', 'com.android.calendar:id/btn_done')
  5195. .with('text', 'SAVE')
  5196.  
  5197. $ruiObj.click
  5198.  
  5199. waitsecond(2)
  5200. end
  5201.  
  5202. tcase << TestAction.new(:wait1second_11) do
  5203. waitsecond(1)
  5204. end
  5205.  
  5206. tcase << TestAction.new(:scriptAction_LogStopTest) do
  5207. $myTestResult = checkLastExistResult
  5208.  
  5209. if $myTestResult == false
  5210. $myFailReason = "End button not found"
  5211. end
  5212. logStopTest("05_01_06_01_PIM")
  5213. end
  5214.  
  5215. tcase << TestAction.new(:pressBack_14) do
  5216. pressBack
  5217.  
  5218. waitsecond(2)
  5219. end
  5220.  
  5221. tcase << TestAction.new(:pressBack_16) do
  5222. pressBack
  5223.  
  5224. waitsecond(2)
  5225. end
  5226.  
  5227. tcase.run(loopTime)
  5228.  
  5229. end
  5230.  
  5231. def self.PIM_05_01_06_02(loopTime)
  5232.  
  5233. tcase = TestCase.new("PIM_05_01_06_02")
  5234.  
  5235. tcase << TestAction.new(:scriptAction_StartTestLog) do
  5236. logStartTest("05_01_06_02_PIM")
  5237. end
  5238.  
  5239. tcase << TestAction.new(:gotoApp_21) do
  5240. gotoApp('Clock')
  5241.  
  5242. waitsecond(2)
  5243. end
  5244.  
  5245. tcase << TestAction.new(:TextView_Title_4) do
  5246. $ruiObj = RUIObject.new.with('objectid', 1224190759).with('selfid', -1121994128).with('textdescid', 1363275560).with('uniqueparentid', 0)
  5247. .with('uitreeindex', 2)
  5248. .with('classname', 'TextView')
  5249. .with('resource-id', 'android:id/title')
  5250. .with('text', 'Alarm')
  5251.  
  5252. $ruiObj.click
  5253.  
  5254. waitsecond(2)
  5255. end
  5256.  
  5257. tcase << TestAction.new(:ImageView_Fab_5) do
  5258. $ruiObj = RUIObject.new.with('objectid', -476403250).with('selfid', -466463568).with('textdescid', -1883598830).with('uniqueparentid', 0)
  5259. .with('uitreeindex', 8)
  5260. .with('classname', 'ImageView')
  5261. .with('resource-id', 'com.lge.clock:id/fab')
  5262.  
  5263. $ruiObj.click
  5264.  
  5265. waitsecond(2)
  5266. end
  5267.  
  5268. tcase << TestAction.new(:swipeDown_7) do
  5269. swipe_vertical 500
  5270.  
  5271. waitsecond(2)
  5272. end
  5273.  
  5274. tcase << TestAction.new(:EditText_MemoInput_9) do
  5275. $ruiObj = RUIObject.new.with('objectid', -560595495).with('selfid', 370574885).with('textdescid', -198591129).with('uniqueparentid', 0).with('classresourceid', -1797104135)
  5276. .with('uitreeindex', 23)
  5277. .with('classname', 'EditText')
  5278. .with('resource-id', 'com.lge.clock:id/memo_input')
  5279.  
  5280. $ruiObj.inputtext('Alarm1')
  5281.  
  5282. waitsecond(2)
  5283. end
  5284.  
  5285. tcase << TestAction.new(:Button_Savebutton_12) do
  5286. $ruiObj = RUIObject.new.with('objectid', -902674558).with('selfid', -575419535).with('textdescid', -816404443).with('uniqueparentid', 0)
  5287. .with('uitreeindex', 30)
  5288. .with('classname', 'Button')
  5289. .with('resource-id', 'com.lge.clock:id/saveButton')
  5290. .with('text', 'SAVE')
  5291.  
  5292. $ruiObj.click
  5293.  
  5294. waitsecond(2)
  5295. end
  5296.  
  5297. tcase << TestAction.new(:wait1second_14) do
  5298. waitsecond(1)
  5299. end
  5300.  
  5301. tcase << TestAction.new(:Switch_AlarmListItemButton_16) do
  5302. $ruiObj = RUIObject.new.with('objectid', -104098710).with('selfid', -385149075).with('textdescid', 1204227435).with('uniqueparentid', 0)
  5303. .with('uitreeindex', 10)
  5304. .with('classname', 'Switch')
  5305. .with('resource-id', 'com.lge.clock:id/alarm_list_item_button')
  5306. .with('text', 'ON')
  5307.  
  5308. $ruiObj.isExist
  5309.  
  5310. waitsecond(2)
  5311. end
  5312.  
  5313. tcase << TestAction.new(:scriptAction_LogStopTest) do
  5314. $myTestResult = checkLastExistResult
  5315.  
  5316. if $myTestResult == false
  5317. $myFailReason = "End button not found"
  5318. end
  5319. logStopTest("05_01_06_02_PIM")
  5320. end
  5321.  
  5322. tcase << TestAction.new(:pressBack_7) do
  5323. pressBack
  5324. end
  5325.  
  5326. tcase << TestAction.new(:pressBack_20) do
  5327. pressBack
  5328.  
  5329. waitsecond(2)
  5330. end
  5331.  
  5332. tcase.run(loopTime)
  5333.  
  5334. end
  5335.  
  5336. def self.PIM_05_01_06_03(loopTime)
  5337.  
  5338. tcase = TestCase.new("PIM_05_01_06_03")
  5339.  
  5340. tcase << TestAction.new(:scriptAction_StartTestLog) do
  5341. logStartTest("05_01_06_03_PIM")
  5342.  
  5343. waitsecond(1)
  5344. end
  5345.  
  5346. tcase << TestAction.new(:gotoApp_2) do
  5347. gotoApp('')
  5348.  
  5349. waitsecond(1)
  5350. end
  5351.  
  5352. tcase << TestAction.new(:ImageButton_Open_2) do
  5353. $ruiObj = RUIObject.new.with('objectid', 1598382174).with('selfid', 1589392844).with('textdescid', -1452260343).with('uniqueparentid', 0)
  5354. .with('uitreeindex', 0)
  5355. .with('classname', 'ImageButton')
  5356. .with('content-desc', 'Open navigation drawer')
  5357.  
  5358. $ruiObj.click
  5359.  
  5360. waitsecond(2)
  5361. end
  5362.  
  5363. tcase << TestAction.new(:TextView_ButtonView_7) do
  5364. $ruiObj = RUIObject.new.with('objectid', 603982191).with('selfid', -270658080).with('textdescid', 1995102261).with('uniqueparentid', 0).with('classresourceid', 1399022470)
  5365. .with('uitreeindex', 25)
  5366. .with('classname', 'TextView')
  5367. .with('resource-id', 'com.android.calendar:id/button_view')
  5368. .with('text', 'Day')
  5369.  
  5370. $ruiObj.click
  5371.  
  5372. waitsecond(2)
  5373. end
  5374.  
  5375. tcase << TestAction.new(:ImageButton_More_9) do
  5376. $ruiObj = RUIObject.new.with('objectid', -612680593).with('selfid', 1290820192).with('textdescid', 366665732).with('uniqueparentid', 0)
  5377. .with('uitreeindex', 6)
  5378. .with('classname', 'ImageButton')
  5379. .with('content-desc', 'More options')
  5380.  
  5381. $ruiObj.click
  5382.  
  5383. waitsecond(2)
  5384. end
  5385.  
  5386. tcase << TestAction.new(:TextView_Title_11) do
  5387. $ruiObj = RUIObject.new.with('objectid', 188068915).with('selfid', -342341268).with('textdescid', 1772893384).with('uniqueparentid', 0).with('classresourceid', 490183159)
  5388. .with('uitreeindex', 0)
  5389. .with('classname', 'TextView')
  5390. .with('resource-id', 'android:id/title')
  5391. .with('text', 'Delete')
  5392.  
  5393. $ruiObj.click
  5394.  
  5395. waitsecond(2)
  5396. end
  5397.  
  5398. tcase << TestAction.new(:CheckBox_ActionSelectallCheckbox_16) do
  5399. $ruiObj = RUIObject.new.with('objectid', -855663087).with('selfid', 1343055516).with('textdescid', 1579914132).with('uniqueparentid', 0)
  5400. .with('uitreeindex', 0)
  5401. .with('classname', 'CheckBox')
  5402. .with('resource-id', 'com.android.calendar:id/action_selectall_checkbox')
  5403. .with('text', 'Select all')
  5404.  
  5405. $ruiObj.click
  5406.  
  5407. waitsecond(2)
  5408. end
  5409.  
  5410. tcase << TestAction.new(:Button_DeleteAgenda_18) do
  5411. $ruiObj = RUIObject.new.with('objectid', 572018530).with('selfid', 1307339797).with('textdescid', -303618793).with('uniqueparentid', 0)
  5412. .with('uitreeindex', 16)
  5413. .with('classname', 'Button')
  5414. .with('resource-id', 'com.android.calendar:id/delete_agenda')
  5415. .with('text', 'DELETE')
  5416.  
  5417. $ruiObj.click
  5418.  
  5419. waitsecond(2)
  5420. end
  5421.  
  5422. tcase << TestAction.new(:Button_Button1_20) do
  5423. $ruiObj = RUIObject.new.with('objectid', -122532739).with('selfid', 982364851).with('textdescid', 1617680178).with('uniqueparentid', 0)
  5424. .with('uitreeindex', 2)
  5425. .with('classname', 'Button')
  5426. .with('resource-id', 'android:id/button1')
  5427. .with('text', 'DELETE')
  5428.  
  5429. $ruiObj.click
  5430.  
  5431. waitsecond(2)
  5432. end
  5433.  
  5434. tcase << TestAction.new(:wait1second_22) do
  5435. waitsecond(1)
  5436. end
  5437.  
  5438. tcase << TestAction.new(:ImageButton_Open_24) do
  5439. $ruiObj = RUIObject.new.with('objectid', 1598382174).with('selfid', 1589392844).with('textdescid', -1452260343).with('uniqueparentid', 0)
  5440. .with('uitreeindex', 0)
  5441. .with('classname', 'ImageButton')
  5442. .with('content-desc', 'Open navigation drawer')
  5443.  
  5444. $ruiObj.click
  5445.  
  5446. waitsecond(2)
  5447. end
  5448.  
  5449. tcase << TestAction.new(:TextView_ButtonView_26) do
  5450. $ruiObj = RUIObject.new.with('objectid', 603982191).with('selfid', 1899312068).with('textdescid', 2008206737).with('uniqueparentid', 0).with('classresourceid', 1399022470)
  5451. .with('uitreeindex', 18)
  5452. .with('classname', 'TextView')
  5453. .with('resource-id', 'com.android.calendar:id/button_view')
  5454. .with('text', 'Month')
  5455.  
  5456. $ruiObj.click
  5457.  
  5458. waitsecond(2)
  5459. end
  5460.  
  5461. tcase << TestAction.new(:scriptAction_LogStopTest) do
  5462. $myTestResult = checkLastExistResult
  5463.  
  5464. if $myTestResult == false
  5465. $myFailReason = "End button not found"
  5466. end
  5467. logStopTest("05_01_06_03_PIM")
  5468. end
  5469.  
  5470. tcase << TestAction.new(:pressBack_9) do
  5471. pressBack
  5472.  
  5473. waitsecond(1)
  5474. end
  5475.  
  5476. tcase << TestAction.new(:pressBack_28) do
  5477. pressBack
  5478.  
  5479. waitsecond(2)
  5480. end
  5481.  
  5482. tcase.run(loopTime)
  5483.  
  5484. end
  5485.  
  5486. def self.PIM_05_01_06_04(loopTime)
  5487.  
  5488. tcase = TestCase.new("PIM_05_01_06_04")
  5489.  
  5490. tcase << TestAction.new(:gotoApp_2) do
  5491. gotoApp('')
  5492. end
  5493.  
  5494. tcase << TestAction.new(:scriptAction_StartTestLog) do
  5495. logStartTest("05_01_06_04_PIM")
  5496. end
  5497.  
  5498. tcase << TestAction.new(:TextView_Title_21) do
  5499. $ruiObj = RUIObject.new.with('objectid', -322510520).with('selfid', -1121994128).with('textdescid', 2047918567).with('uniqueparentid', 0)
  5500. .with('uitreeindex', 2)
  5501. .with('classname', 'TextView')
  5502. .with('resource-id', 'android:id/title')
  5503. .with('text', 'Alarm')
  5504.  
  5505. $ruiObj.click
  5506.  
  5507. waitsecond(1)
  5508. end
  5509.  
  5510. tcase << TestAction.new(:TextView_DeleteAlarmMenu_5) do
  5511. $ruiObj = RUIObject.new.with('objectid', -627640121).with('selfid', 2100473433).with('textdescid', 1981482564).with('uniqueparentid', 0)
  5512. .with('uitreeindex', 1)
  5513. .with('classname', 'TextView')
  5514. .with('resource-id', 'com.lge.clock:id/delete_alarm_menu')
  5515. .with('content-desc', 'Delete')
  5516.  
  5517. $ruiObj.click
  5518.  
  5519. waitsecond(1)
  5520. end
  5521.  
  5522. tcase << TestAction.new(:CheckBox_Checkall_2) do
  5523. $ruiObj = RUIObject.new.with('objectid', 856038081).with('selfid', 2027227245).with('textdescid', 767376767).with('uniqueparentid', 0)
  5524. .with('uitreeindex', 0)
  5525. .with('classname', 'CheckBox')
  5526. .with('resource-id', 'com.lge.clock:id/checkall')
  5527.  
  5528. $ruiObj.click
  5529.  
  5530. waitsecond(2)
  5531. end
  5532.  
  5533. tcase << TestAction.new(:Button_BtnDelete_4) do
  5534. $ruiObj = RUIObject.new.with('objectid', -568781847).with('selfid', 1633729950).with('textdescid', 1056600734).with('uniqueparentid', 0)
  5535. .with('uitreeindex', 15)
  5536. .with('classname', 'Button')
  5537. .with('resource-id', 'com.lge.clock:id/btn_Delete')
  5538. .with('text', 'DELETE')
  5539.  
  5540. $ruiObj.click
  5541.  
  5542. waitsecond(2)
  5543. end
  5544.  
  5545. tcase << TestAction.new(:Button_Button1_11) do
  5546. $ruiObj = RUIObject.new.with('objectid', -405151478).with('selfid', 2077687487).with('textdescid', 489169807).with('uniqueparentid', 0)
  5547. .with('uitreeindex', 3)
  5548. .with('classname', 'Button')
  5549. .with('resource-id', 'android:id/button1')
  5550. .with('text', 'Yes')
  5551.  
  5552. $ruiObj.click
  5553.  
  5554. waitsecond(1)
  5555. end
  5556.  
  5557. tcase << TestAction.new(:TextView_NoContentsText_5) do
  5558. $ruiObj = RUIObject.new.with('objectid', -906561874).with('selfid', 2062356648).with('textdescid', -1982958191).with('uniqueparentid', 0)
  5559. .with('uitreeindex', 6)
  5560. .with('classname', 'TextView')
  5561. .with('resource-id', 'com.lge.clock:id/no_contents_text')
  5562. .with('text', 'No alarms')
  5563.  
  5564. $ruiObj.isExist
  5565.  
  5566. waitsecond(1)
  5567. end
  5568.  
  5569. tcase << TestAction.new(:pressBack_15) do
  5570. pressBack
  5571. end
  5572.  
  5573. tcase << TestAction.new(:pressBack_16) do
  5574. pressBack
  5575. end
  5576.  
  5577. tcase << TestAction.new(:scriptAction_LogStopTest) do
  5578. $myTestResult = checkLastExistResult
  5579.  
  5580. if $myTestResult == false
  5581. $myFailReason = "End button not found"
  5582. end
  5583. logStopTest("05_01_06_04_PIM")
  5584. end
  5585.  
  5586. tcase.run(loopTime)
  5587.  
  5588. end
  5589.  
  5590. def self.StoreFrontDownload_05_01_05_06(loopTime)
  5591.  
  5592. tcase = TestCase.new("StoreFrontDownload_05_01_05_06")
  5593.  
  5594. tcase << TestAction.new(:scriptAction_1) do
  5595. logStartTest("05_01_05_06_StoreFrontDownload")
  5596. end
  5597.  
  5598. tcase << TestAction.new(:gotoApp_2) do
  5599. gotoApp('Play Store')
  5600.  
  5601. waitsecond(1)
  5602. end
  5603.  
  5604. tcase << TestAction.new(:ImageView_SearchBoxIdleText_12) do
  5605. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
  5606. .with('uitreeindex', 28)
  5607. .with('classname', 'ImageView')
  5608. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  5609. .with('content-desc', 'Search')
  5610.  
  5611. $ruiObj.click
  5612.  
  5613. waitsecond(1)
  5614. end
  5615.  
  5616. tcase << TestAction.new(:EditText_SearchBoxTextInput_13) do
  5617. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
  5618. .with('uitreeindex', 28)
  5619. .with('classname', 'EditText')
  5620. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  5621.  
  5622. $ruiObj.inputtext('ColorNote')
  5623.  
  5624. waitsecond(1)
  5625. end
  5626.  
  5627. tcase << TestAction.new(:TextView_SuggestText_16) do
  5628. $ruiObj = RUIObject.new.with('objectid', 193809363).with('selfid', 208620854).with('textdescid', 1052874934).with('uniqueparentid', 0)
  5629. .with('uitreeindex', 32)
  5630. .with('classname', 'TextView')
  5631. .with('resource-id', 'com.android.vending:id/suggest_text')
  5632. .with('text', 'ColorNote Notepad Notes')
  5633.  
  5634. $ruiObj.click
  5635.  
  5636. waitsecond(1)
  5637. end
  5638.  
  5639. tcase << TestAction.new(:TextView_LiTitle_2) do
  5640. $ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', -1969590474).with('textdescid', 83190698).with('uniqueparentid', 0)
  5641. .with('uitreeindex', 5)
  5642. .with('classname', 'TextView')
  5643. .with('resource-id', 'com.android.vending:id/li_title')
  5644. .with('content-desc', 'App: ColorNote Notepad Notes')
  5645. .with('text', 'ColorNote Notepad Notes')
  5646.  
  5647. $ruiObj.click
  5648.  
  5649. waitsecond(1)
  5650. end
  5651.  
  5652. tcase << TestAction.new(:Button_LaunchButton_18) do
  5653. $ruiObj = RUIObject.new.with('objectid', 515078971).with('selfid', 328139855).with('textdescid', 387228145).with('uniqueparentid', 0)
  5654. .with('uitreeindex', 8)
  5655. .with('classname', 'Button')
  5656. .with('resource-id', 'com.android.vending:id/launch_button')
  5657. .with('text', 'OPEN')
  5658.  
  5659. $ruiObj.click
  5660.  
  5661. waitsecond(1)
  5662. end
  5663.  
  5664. tcase << TestAction.new(:Button_PermissionAllowButton_2) do
  5665. $ruiObj = RUIObject.new.with('objectid', -886457929).with('selfid', 1443382411).with('textdescid', 270556320).with('uniqueparentid', 0)
  5666. .with('uitreeindex', 3)
  5667. .with('classname', 'Button')
  5668. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  5669. .with('text', 'ALLOW')
  5670.  
  5671. $ruiObj.click
  5672.  
  5673. waitsecond(2)
  5674. end
  5675.  
  5676. tcase << TestAction.new(:TextView_EmptyText_AddNoteCK) do
  5677. $ruiObj = RUIObject.new.with('objectid', -1225710509).with('selfid', -126164144).with('textdescid', -1803056542).with('uniqueparentid', 0)
  5678. .with('uitreeindex', 6)
  5679. .with('classname', 'TextView')
  5680. .with('resource-id', 'com.socialnmobile.dictapps.notepad.color.note:id/empty_text')
  5681. .with('text', 'Add Note')
  5682.  
  5683. $ruiObj.isExist
  5684.  
  5685. waitsecond(1)
  5686. end
  5687.  
  5688. tcase << TestAction.new(:pressBack_20) do
  5689. pressBack
  5690. end
  5691.  
  5692. tcase << TestAction.new(:scriptAction_22) do
  5693. $myTestResult = checkLastExistResult
  5694.  
  5695. if $myTestResult == false
  5696. $myFailReason == "Open DL app from Store Front Fail"
  5697. end
  5698. logStopTest("05_01_05_06_StoreFrontDownload")
  5699. end
  5700.  
  5701. tcase << TestAction.new(:pressBack_23) do
  5702. pressBack
  5703. end
  5704.  
  5705. tcase << TestAction.new(:pressBack_2) do
  5706. pressBack
  5707. end
  5708.  
  5709. tcase << TestAction.new(:pressHome_24) do
  5710. pressHome
  5711. end
  5712.  
  5713. tcase.run(loopTime)
  5714.  
  5715. end
  5716.  
  5717. def self.Telephony_05_01_01_01(loopTime)
  5718.  
  5719. tcase = TestCase.new("Telephony_05_01_01_01")
  5720.  
  5721. tcase << TestAction.new(:scriptAction_StartTest_1) do
  5722. logStartTest("05_01_01_01_Telephony")
  5723. end
  5724.  
  5725. tcase << TestAction.new(:pressHome_4) do
  5726. pressHome
  5727. end
  5728.  
  5729. tcase << TestAction.new(:TextView_Phone_2) do
  5730. $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
  5731. .with('uitreeindex', 9)
  5732. .with('classname', 'TextView')
  5733. .with('content-desc', 'Phone')
  5734. .with('text', 'Phone')
  5735.  
  5736. $ruiObj.click
  5737.  
  5738. waitsecond(1)
  5739. end
  5740.  
  5741. tcase << TestAction.new(:TextView_Tabtext_2) do
  5742. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
  5743. .with('uitreeindex', 4)
  5744. .with('classname', 'TextView')
  5745. .with('resource-id', 'com.android.contacts:id/tabText')
  5746. .with('text', 'Contacts')
  5747.  
  5748. $ruiObj.click
  5749.  
  5750. waitsecond(1)
  5751. end
  5752.  
  5753. tcase << TestAction.new(:EditText_SearchSrcText_4) do
  5754. $ruiObj = RUIObject.new.with('objectid', 588070375).with('selfid', -959326622).with('textdescid', -497243406).with('uniqueparentid', 0)
  5755. .with('uitreeindex', 6)
  5756. .with('classname', 'EditText')
  5757. .with('resource-id', 'android:id/search_src_text')
  5758. .with('content-desc', 'Search contacts')
  5759.  
  5760. $ruiObj.inputtext('A01')
  5761.  
  5762. waitsecond(1)
  5763. end
  5764.  
  5765. tcase << TestAction.new(:scriptAction_10_1) do
  5766. sendBTCmd('pressHome')
  5767.  
  5768. waitsecond(1)
  5769. end
  5770.  
  5771. tcase << TestAction.new(:ImageView_Button1_8) do
  5772. $ruiObj = RUIObject.new.with('objectid', -1827607533).with('selfid', 643737864).with('textdescid', -306619761).with('uniqueparentid', 0).with('classresourceid', -1143292048)
  5773. .with('uitreeindex', 13)
  5774. .with('classname', 'ImageView')
  5775. .with('resource-id', 'android:id/button1')
  5776. .with('content-desc', 'Call A01 a01')
  5777.  
  5778. $ruiObj.click
  5779.  
  5780. waitsecond(4)
  5781. end
  5782.  
  5783. tcase << TestAction.new(:wait8second_31) do
  5784. waitsecond(8)
  5785. end
  5786.  
  5787. tcase << TestAction.new(:scriptAction_10) do
  5788. sendBTCmd('answerCall')
  5789.  
  5790. waitsecond(8)
  5791. end
  5792.  
  5793. tcase << TestAction.new(:scriptAction_10_1) do
  5794. sendBTCmd('endCall')
  5795.  
  5796. waitsecond(1)
  5797. end
  5798.  
  5799. tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
  5800. $myTestResult = checkLastBTCmdResult
  5801. if $myTestResult == false
  5802. $myFailReason = "Call not come to other dev"
  5803. end
  5804. logStopTest("05_01_01_01_Telephony")
  5805.  
  5806.  
  5807. waitsecond(8)
  5808. end
  5809.  
  5810. tcase << TestAction.new(:Button_Endbutton_2) do
  5811. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  5812. .with('uitreeindex', 8)
  5813. .with('classname', 'Button')
  5814. .with('resource-id', 'com.android.incallui:id/endButton')
  5815. .with('text', 'End')
  5816.  
  5817. $ruiObj.click
  5818.  
  5819. waitsecond(1)
  5820. end
  5821.  
  5822. tcase << TestAction.new(:pressBack_3) do
  5823. pressBack
  5824. end
  5825.  
  5826. tcase << TestAction.new(:pressBack_4) do
  5827. pressBack
  5828. end
  5829.  
  5830. tcase.run(loopTime)
  5831.  
  5832. end
  5833.  
  5834. def self.Telephony_05_01_01_03(loopTime)
  5835.  
  5836. tcase = TestCase.new("Telephony_05_01_01_03")
  5837.  
  5838. tcase << TestAction.new(:scriptAction_StartTest_1) do
  5839. logStartTest("05_01_01_03_Telephony")
  5840. end
  5841.  
  5842. tcase << TestAction.new(:gotoApp_1_1) do
  5843. gotoApp('Phone')
  5844. end
  5845.  
  5846. tcase << TestAction.new(:TextView_Tabtext_2) do
  5847. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 715664122).with('textdescid', 24268628).with('uniqueparentid', 0)
  5848. .with('uitreeindex', 3)
  5849. .with('classname', 'TextView')
  5850. .with('resource-id', 'com.android.contacts:id/tabText')
  5851. .with('text', 'Call logs')
  5852.  
  5853. $ruiObj.click
  5854.  
  5855. waitsecond(1)
  5856. end
  5857.  
  5858. tcase << TestAction.new(:ImageView_SecondaryActionIcon_2) do
  5859. $ruiObj = RUIObject.new.with('objectid', 1053896352).with('selfid', -1241359936).with('textdescid', 579079266).with('uniqueparentid', 0).with('classresourceid', -550590844)
  5860. .with('uitreeindex', 9)
  5861. .with('pretext', 'Groups?0')
  5862. .with('classname', 'ImageView')
  5863. .with('resource-id', 'com.android.contacts:id/secondary_action_icon')
  5864. .with('content-desc', 'Call A01 a01')
  5865.  
  5866. $ruiObj.click
  5867.  
  5868. waitsecond(1)
  5869. end
  5870.  
  5871. tcase << TestAction.new(:wait8second_31) do
  5872. waitsecond(8)
  5873. end
  5874.  
  5875. tcase << TestAction.new(:scriptAction_10_1) do
  5876. sendBTCmd('answerCall')
  5877.  
  5878. waitsecond(8)
  5879. end
  5880.  
  5881. tcase << TestAction.new(:scriptAction_10_1_1) do
  5882. sendBTCmd('endCall')
  5883.  
  5884. waitsecond(1)
  5885. end
  5886.  
  5887. tcase << TestAction.new(:scriptAction_LogStopTest) do
  5888. $myTestResult = checkLastBTCmdResult
  5889. if $myTestResult == false
  5890. $myFailReason = "Call not come to other dev"
  5891. end
  5892. logStopTest("05_01_01_03_Telephony")
  5893.  
  5894. end
  5895.  
  5896. tcase << TestAction.new(:Button_Endbutton_6) do
  5897. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  5898. .with('uitreeindex', 8)
  5899. .with('classname', 'Button')
  5900. .with('resource-id', 'com.android.incallui:id/endButton')
  5901. .with('text', 'End')
  5902.  
  5903. $ruiObj.click
  5904.  
  5905. waitsecond(1)
  5906. end
  5907.  
  5908. tcase << TestAction.new(:pressBack_1) do
  5909. pressBack
  5910. end
  5911.  
  5912. tcase << TestAction.new(:pressBack_2) do
  5913. pressBack
  5914. end
  5915.  
  5916. tcase.run(loopTime)
  5917.  
  5918. end
  5919.  
  5920. def self.Telephony_05_01_01_05(loopTime)
  5921.  
  5922. tcase = TestCase.new("Telephony_05_01_01_05")
  5923.  
  5924. tcase << TestAction.new(:pressHome_2) do
  5925. pressHome
  5926. end
  5927.  
  5928. tcase << TestAction.new(:scriptAction_StartTestLog_1) do
  5929. logStartTest("05_01_01_05_Telephony")
  5930. end
  5931.  
  5932. tcase << TestAction.new(:scriptAction_BTMakeCall) do
  5933. sendBTCmd("makeCall('#{db('CallNumber')[0]}')")
  5934.  
  5935. waitsecond(8)
  5936. end
  5937.  
  5938. tcase << TestAction.new(:wait8second_12) do
  5939. waitsecond(8)
  5940. end
  5941.  
  5942. tcase << TestAction.new(:wait8second_14) do
  5943. waitsecond(8)
  5944. end
  5945.  
  5946. tcase << TestAction.new(:wait8second_16) do
  5947. waitsecond(8)
  5948. end
  5949.  
  5950. tcase << TestAction.new(:answerSwipe) do
  5951. answerCall
  5952.  
  5953. waitsecond(2)
  5954. end
  5955.  
  5956. tcase << TestAction.new(:Button_Endbutton_2) do
  5957. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  5958. .with('uitreeindex', 10)
  5959. .with('classname', 'Button')
  5960. .with('resource-id', 'com.android.incallui:id/endButton')
  5961. .with('text', 'End')
  5962.  
  5963. $ruiObj.isNotExist
  5964. ifFailJumpTo(:Button_Endbutton_2_1)
  5965.  
  5966. waitsecond(1)
  5967. end
  5968.  
  5969. tcase << TestAction.new(:answerSwipe_1) do
  5970. answerCall
  5971.  
  5972. waitsecond(2)
  5973. end
  5974.  
  5975. tcase << TestAction.new(:Button_Endbutton_2_1) do
  5976. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  5977. .with('uitreeindex', 10)
  5978. .with('classname', 'Button')
  5979. .with('resource-id', 'com.android.incallui:id/endButton')
  5980. .with('text', 'End')
  5981.  
  5982. $ruiObj.isExist
  5983.  
  5984. waitsecond(1)
  5985. end
  5986.  
  5987. tcase << TestAction.new(:scriptAction_LogStopTest_1) do
  5988. $myTestResult = checkLastExistResult
  5989. if $myTestResult == false
  5990. $myFailReason = "End button not found"
  5991. end
  5992. logStopTest("05_01_01_05_Telephony")
  5993.  
  5994. end
  5995.  
  5996. tcase << TestAction.new(:scriptAction_BTEndCall) do
  5997. sendBTCmd('endCall')
  5998. end
  5999.  
  6000. tcase << TestAction.new(:Button_Endbutton_2_1_1) do
  6001. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  6002. .with('uitreeindex', 10)
  6003. .with('classname', 'Button')
  6004. .with('resource-id', 'com.android.incallui:id/endButton')
  6005. .with('text', 'End')
  6006.  
  6007. $ruiObj.click
  6008.  
  6009. waitsecond(1)
  6010. end
  6011.  
  6012. tcase << TestAction.new(:pressBack_1) do
  6013. pressBack
  6014. end
  6015.  
  6016. tcase << TestAction.new(:pressBack_2) do
  6017. pressBack
  6018. end
  6019.  
  6020. tcase.run(loopTime)
  6021.  
  6022. end
  6023.  
  6024. def self.Telephony_05_01_01_06(loopTime)
  6025.  
  6026. tcase = TestCase.new("Telephony_05_01_01_06")
  6027.  
  6028. tcase << TestAction.new(:scriptAction_StartTestLog) do
  6029. logStartTest("05_01_01_06_Telephony")
  6030. end
  6031.  
  6032. tcase << TestAction.new(:gotoApp_3) do
  6033. gotoApp('Phone')
  6034.  
  6035. waitsecond(2)
  6036. end
  6037.  
  6038. tcase << TestAction.new(:TextView_Tabtext_2) do
  6039. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
  6040. .with('uitreeindex', 4)
  6041. .with('classname', 'TextView')
  6042. .with('resource-id', 'com.android.contacts:id/tabText')
  6043. .with('text', 'Contacts')
  6044.  
  6045. $ruiObj.click
  6046.  
  6047. waitsecond(1)
  6048. end
  6049.  
  6050. tcase << TestAction.new(:EditText_SearchSrcText_2) do
  6051. $ruiObj = RUIObject.new.with('objectid', 588070375).with('selfid', -959326622).with('textdescid', -497243406).with('uniqueparentid', 0)
  6052. .with('uitreeindex', 6)
  6053. .with('classname', 'EditText')
  6054. .with('resource-id', 'android:id/search_src_text')
  6055. .with('content-desc', 'Search contacts')
  6056.  
  6057. $ruiObj.inputtext('tn tn')
  6058.  
  6059. waitsecond(1)
  6060. end
  6061.  
  6062. tcase << TestAction.new(:TextView_tn_6) do
  6063. $ruiObj = RUIObject.new.with('objectid', 1836583107).with('selfid', -71120562).with('textdescid', 984860861).with('uniqueparentid', 0).with('classresourceid', -938935918)
  6064. .with('uitreeindex', 13)
  6065. .with('classname', 'TextView')
  6066. .with('content-desc', 'tn tn')
  6067. .with('text', 'tn tn')
  6068.  
  6069. $ruiObj.select('ItemFirst').click
  6070.  
  6071. waitsecond(1)
  6072. end
  6073.  
  6074. tcase << TestAction.new(:TextView_MenuDelete_2) do
  6075. $ruiObj = RUIObject.new.with('objectid', -1318735913).with('selfid', 1219450656).with('textdescid', 2068859689).with('uniqueparentid', 0)
  6076. .with('uitreeindex', 23)
  6077. .with('pretext', 'NOTIFICATION SOUND')
  6078. .with('classname', 'TextView')
  6079. .with('resource-id', 'com.android.contacts:id/menu_delete')
  6080.  
  6081. $ruiObj.click
  6082.  
  6083. waitsecond(1)
  6084. end
  6085.  
  6086. tcase << TestAction.new(:Button_Button1_43) do
  6087. $ruiObj = RUIObject.new.with('objectid', -195446968).with('selfid', 982364851).with('textdescid', -1387444483).with('uniqueparentid', 0)
  6088. .with('uitreeindex', 2)
  6089. .with('classname', 'Button')
  6090. .with('resource-id', 'android:id/button1')
  6091. .with('text', 'DELETE')
  6092.  
  6093. $ruiObj.isExist
  6094.  
  6095. waitsecond(1)
  6096. end
  6097.  
  6098. tcase << TestAction.new(:Button_Button1_22_1) do
  6099. $ruiObj = RUIObject.new.with('objectid', -195446968).with('selfid', -1318451484).with('textdescid', 917278956).with('uniqueparentid', 0)
  6100. .with('uitreeindex', 2)
  6101. .with('classname', 'Button')
  6102. .with('resource-id', 'android:id/button1')
  6103. .with('text', 'OK')
  6104.  
  6105. $ruiObj.click
  6106.  
  6107. waitsecond(1)
  6108. end
  6109.  
  6110. tcase << TestAction.new(:scriptAction_LogStopTest) do
  6111. $myTestResult = checkLastExistResult
  6112. if $myTestResult == false
  6113. $myFailReason = "End button not found"
  6114. end
  6115. logStopTest("05_01_01_06_Telephony")
  6116. end
  6117.  
  6118. tcase << TestAction.new(:pressBack_2) do
  6119. pressBack
  6120. end
  6121.  
  6122. tcase << TestAction.new(:pressBack_3) do
  6123. pressBack
  6124. end
  6125.  
  6126. tcase.run(loopTime)
  6127.  
  6128. end
  6129.  
  6130. def self.Telephony_05_01_01_07(loopTime)
  6131.  
  6132. tcase = TestCase.new("Telephony_05_01_01_07")
  6133.  
  6134. tcase << TestAction.new(:scriptAction_StartTestLog) do
  6135. logStartTest("05_01_01_07_Telephony")
  6136. end
  6137.  
  6138. tcase << TestAction.new(:gotoApp_3) do
  6139. gotoApp('Phone')
  6140.  
  6141. waitsecond(2)
  6142. end
  6143.  
  6144. tcase << TestAction.new(:TextView_Tabtext_2) do
  6145. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
  6146. .with('uitreeindex', 4)
  6147. .with('classname', 'TextView')
  6148. .with('resource-id', 'com.android.contacts:id/tabText')
  6149. .with('text', 'Contacts')
  6150.  
  6151. $ruiObj.click
  6152.  
  6153. waitsecond(1)
  6154. end
  6155.  
  6156. tcase << TestAction.new(:ImageButton_AddContactButton_2) do
  6157. $ruiObj = RUIObject.new.with('objectid', 168201771).with('selfid', 2046190261).with('textdescid', 1812475979).with('uniqueparentid', 0)
  6158. .with('uitreeindex', 7)
  6159. .with('classname', 'ImageButton')
  6160. .with('resource-id', 'com.android.contacts:id/add_contact_button')
  6161. .with('content-desc', 'New contact')
  6162.  
  6163. $ruiObj.click
  6164.  
  6165. waitsecond(1)
  6166. end
  6167.  
  6168. tcase << TestAction.new(:EditText_14) do
  6169. $ruiObj = RUIObject.new.with('objectid', -2023645967).with('selfid', 1666676343).with('textdescid', 1691484495).with('uniqueparentid', 0).with('classresourceid', 1666676343)
  6170. .with('uitreeindex', 6)
  6171. .with('pretext', 'Phone?0')
  6172. .with('classname', 'EditText')
  6173.  
  6174. $ruiObj.inputtext('tn tn')
  6175.  
  6176. waitsecond(1)
  6177. end
  6178.  
  6179. tcase << TestAction.new(:EditText_16) do
  6180. $ruiObj = RUIObject.new.with('objectid', 1622197326).with('selfid', 1666676343).with('textdescid', -1251490414).with('uniqueparentid', 0).with('classresourceid', 1666676343)
  6181. .with('uitreeindex', 9)
  6182. .with('pretext', 'Phone?1')
  6183. .with('classname', 'EditText')
  6184.  
  6185. $ruiObj.inputtext('00000000')
  6186.  
  6187. waitsecond(1)
  6188. end
  6189.  
  6190. tcase << TestAction.new(:Button_BtnSave_4) do
  6191. $ruiObj = RUIObject.new.with('objectid', 344009592).with('selfid', -1684371128).with('textdescid', -1561576549).with('uniqueparentid', 0)
  6192. .with('uitreeindex', 19)
  6193. .with('classname', 'Button')
  6194. .with('resource-id', 'com.android.contacts:id/btn_save')
  6195. .with('text', 'SAVE')
  6196.  
  6197. $ruiObj.isExist
  6198.  
  6199. waitsecond(1)
  6200. end
  6201.  
  6202. tcase << TestAction.new(:Button_BtnSave_20) do
  6203. $ruiObj = RUIObject.new.with('objectid', 344009592).with('selfid', -1684339352).with('textdescid', -1560591493).with('uniqueparentid', 0)
  6204. .with('uitreeindex', 16)
  6205. .with('classname', 'Button')
  6206. .with('resource-id', 'com.android.contacts:id/btn_save')
  6207. .with('text', 'Save')
  6208.  
  6209. $ruiObj.click
  6210.  
  6211. waitsecond(2)
  6212. end
  6213.  
  6214. tcase << TestAction.new(:Button_Button1_2) do
  6215. $ruiObj = RUIObject.new.with('objectid', -195446968).with('selfid', 2077686463).with('textdescid', -1628829679).with('uniqueparentid', 0)
  6216. .with('uitreeindex', 3)
  6217. .with('classname', 'Button')
  6218. .with('resource-id', 'android:id/button1')
  6219. .with('text', 'YES')
  6220.  
  6221. $ruiObj.click
  6222.  
  6223. waitsecond(2)
  6224. end
  6225.  
  6226. tcase << TestAction.new(:scriptAction_LogStopTest) do
  6227. $myTestResult = checkLastExistResult
  6228. if $myTestResult == false
  6229. $myFailReason = "Contact is not saved"
  6230. end
  6231. logStopTest("05_01_01_07_Telephony")
  6232. end
  6233.  
  6234. tcase << TestAction.new(:pressBack_5) do
  6235. pressBack
  6236. end
  6237.  
  6238. tcase << TestAction.new(:pressBack_6) do
  6239. pressBack
  6240. end
  6241.  
  6242. tcase.run(loopTime)
  6243.  
  6244. end
  6245.  
  6246. def self.VideoTelephony_05_01_14_01(loopTime)
  6247.  
  6248. tcase = TestCase.new("VideoTelephony_05_01_14_01")
  6249.  
  6250. tcase << TestAction.new(:scriptAction_StartTest_1) do
  6251. logStartTest("VideoCall_01")
  6252. end
  6253.  
  6254. tcase << TestAction.new(:pressHome_1_1) do
  6255. pressHome
  6256.  
  6257. waitsecond(2)
  6258. end
  6259.  
  6260. tcase << TestAction.new(:TextView_Phone_2) do
  6261. $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
  6262. .with('uitreeindex', 9)
  6263. .with('classname', 'TextView')
  6264. .with('content-desc', 'Phone')
  6265. .with('text', 'Phone')
  6266.  
  6267. $ruiObj.click
  6268.  
  6269. waitsecond(1)
  6270. end
  6271.  
  6272. tcase << TestAction.new(:TextView_Tabtext_2) do
  6273. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
  6274. .with('uitreeindex', 4)
  6275. .with('classname', 'TextView')
  6276. .with('resource-id', 'com.android.contacts:id/tabText')
  6277. .with('text', 'Contacts')
  6278.  
  6279. $ruiObj.click
  6280.  
  6281. waitsecond(1)
  6282. end
  6283.  
  6284. tcase << TestAction.new(:EditText_SearchSrcText_2) do
  6285. $ruiObj = RUIObject.new.with('objectid', 588070375).with('selfid', -959326622).with('textdescid', -497243406).with('uniqueparentid', 0)
  6286. .with('uitreeindex', 6)
  6287. .with('classname', 'EditText')
  6288. .with('resource-id', 'android:id/search_src_text')
  6289. .with('content-desc', 'Search contacts')
  6290.  
  6291. $ruiObj.inputtext('A01 a01')
  6292.  
  6293. waitsecond(1)
  6294. end
  6295.  
  6296. tcase << TestAction.new(:TextView_A01_4) do
  6297. $ruiObj = RUIObject.new.with('objectid', -728261803).with('selfid', -2094016618).with('textdescid', -1517178717).with('uniqueparentid', 0).with('classresourceid', -938935918)
  6298. .with('uitreeindex', 12)
  6299. .with('classname', 'TextView')
  6300. .with('content-desc', 'A01 a01')
  6301. .with('text', 'A01 a01')
  6302.  
  6303. $ruiObj.click
  6304.  
  6305. waitsecond(1)
  6306. end
  6307.  
  6308. tcase << TestAction.new(:VideoCallButton) do
  6309. $attVideoCallButton = RUIObject.new.with('objectid', -209436562).with('selfid', 14418249).with('textdescid', 2097401202).with('uniqueparentid', 0).with('classresourceid', -1382351217)
  6310. .with('uitreeindex', 9)
  6311. .with('classname', 'ImageView')
  6312. .with('resource-id', 'com.android.contacts:id/eab_action_button')
  6313.  
  6314. $uplusVideoCallButton = RUIObject.new.with('objectid', -284633982).with('selfid', -1819582550).with('textdescid', -721488607).with('uniqueparentid', 0).with('classresourceid', 745414969)
  6315. .with('uitreeindex', 12)
  6316. .with('classname', 'ImageView')
  6317. .with('resource-id', 'com.android.contacts:id/first_action_button')
  6318. .with('content-desc', 'Video call')
  6319.  
  6320. if $attVideoCallButton.isExist
  6321. $attVideoCallButton.click
  6322. elsif $uplusVideoCallButton.isExist
  6323. $uplusVideoCallButton.click
  6324. end
  6325.  
  6326. waitsecond(2)
  6327. end
  6328.  
  6329. tcase << TestAction.new(:ImageView_FirstActionButton_4) do
  6330. $ruiObj = RUIObject.new.with('objectid', -284633982).with('selfid', -1819582550).with('textdescid', -721488607).with('uniqueparentid', 0).with('classresourceid', 745414969)
  6331. .with('uitreeindex', 12)
  6332. .with('classname', 'ImageView')
  6333. .with('resource-id', 'com.android.contacts:id/first_action_button')
  6334. .with('content-desc', 'Video call')
  6335.  
  6336. $ruiObj.click
  6337.  
  6338. waitsecond(2)
  6339. end
  6340.  
  6341. tcase << TestAction.new(:wait8second_31) do
  6342. waitsecond(8)
  6343. end
  6344.  
  6345. tcase << TestAction.new(:scriptAction_18_1) do
  6346. sendBTCmd('answerCall')
  6347.  
  6348. waitsecond(8)
  6349. end
  6350.  
  6351. tcase << TestAction.new(:TextView_Callstatelabel_1_1) do
  6352. $ruiObj = RUIObject.new.with('objectid', -611515845).with('selfid', -821184504).with('textdescid', -1124622931).with('uniqueparentid', 0)
  6353. .with('uitreeindex', 5)
  6354. .with('classname', 'TextView')
  6355. .with('resource-id', 'com.android.incallui:id/callStateLabel')
  6356. .with('text', 'Incoming call')
  6357.  
  6358. $ruiObj.isNotExist
  6359. end
  6360.  
  6361. tcase << TestAction.new(:scriptAction_18_1_1) do
  6362. endCall
  6363.  
  6364. waitsecond(2)
  6365. end
  6366.  
  6367. tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
  6368. $myTestResult = checkLastBTCmdResult
  6369. if $myTestResult == false
  6370. $myFailReason = "Call not come to other dev"
  6371. end
  6372. logStopTest("VideoCall_01")
  6373.  
  6374. end
  6375.  
  6376. tcase << TestAction.new(:Button_ButtonEndCall_4) do
  6377. $ruiObj = RUIObject.new.with('objectid', 449066258).with('selfid', 2024460923).with('textdescid', -1859117805).with('uniqueparentid', 0)
  6378. .with('uitreeindex', 8)
  6379. .with('classname', 'Button')
  6380. .with('resource-id', 'com.android.incallui:id/button_end_call')
  6381. .with('text', 'End')
  6382.  
  6383. $ruiObj.click
  6384.  
  6385. waitsecond(1)
  6386. end
  6387.  
  6388. tcase << TestAction.new(:pressBack_3) do
  6389. pressBack
  6390. end
  6391.  
  6392. tcase << TestAction.new(:pressBack_4) do
  6393. pressBack
  6394. end
  6395.  
  6396. tcase << TestAction.new(:pressHome_1) do
  6397. pressHome
  6398.  
  6399. waitsecond(2)
  6400. end
  6401.  
  6402. tcase.run(loopTime)
  6403.  
  6404. end
  6405.  
  6406. def self.VideoTelephony_05_01_14_02(loopTime)
  6407.  
  6408. tcase = TestCase.new("VideoTelephony_05_01_14_02")
  6409.  
  6410. tcase << TestAction.new(:scriptAction_StartTest_1) do
  6411. logStartTest("VideoCall_02")
  6412. end
  6413.  
  6414. tcase << TestAction.new(:TextView_Phone_2) do
  6415. $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
  6416. .with('uitreeindex', 9)
  6417. .with('classname', 'TextView')
  6418. .with('content-desc', 'Phone')
  6419. .with('text', 'Phone')
  6420.  
  6421. $ruiObj.click
  6422.  
  6423. waitsecond(1)
  6424. end
  6425.  
  6426. tcase << TestAction.new(:TextView_Tabtext_23) do
  6427. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 566119687).with('textdescid', 1861262411).with('uniqueparentid', 0)
  6428. .with('uitreeindex', 2)
  6429. .with('classname', 'TextView')
  6430. .with('resource-id', 'com.android.contacts:id/tabText')
  6431. .with('text', 'Dial')
  6432.  
  6433. $ruiObj.click
  6434.  
  6435. waitsecond(2)
  6436. end
  6437.  
  6438. tcase << TestAction.new(:scriptAction_2) do
  6439. $ruiObj = RUIObject.new.with('objectid', 477485968).with('selfid', -1326421482).with('textdescid', 1917163152).with('uniqueparentid', 0)
  6440. .with('uitreeindex', 7)
  6441. .with('classname', 'EditText')
  6442. .with('resource-id', 'com.android.contacts:id/digits')
  6443.  
  6444. $ruiObj.inputtext("#{db('CallNumber')[1]}")
  6445.  
  6446. waitsecond(2)
  6447. end
  6448.  
  6449. tcase << TestAction.new(:pressBack_2) do
  6450. pressBack
  6451.  
  6452. waitsecond(2)
  6453. end
  6454.  
  6455. tcase << TestAction.new(:ImageButton_Btnvt_6) do
  6456. $ruiObj = RUIObject.new.with('objectid', -999718621).with('selfid', -1888469943).with('textdescid', -1795784128).with('uniqueparentid', 0)
  6457. .with('uitreeindex', 61)
  6458. .with('classname', 'ImageButton')
  6459. .with('resource-id', 'com.android.contacts:id/btnVT')
  6460. .with('content-desc', 'Video Call')
  6461.  
  6462. $ruiObj.click
  6463.  
  6464. waitsecond(2)
  6465. end
  6466.  
  6467. tcase << TestAction.new(:wait8second_2) do
  6468. waitsecond(8)
  6469. end
  6470.  
  6471. tcase << TestAction.new(:scriptAction_18_1) do
  6472. sendBTCmd('answerCall')
  6473.  
  6474. waitsecond(8)
  6475. end
  6476.  
  6477. tcase << TestAction.new(:TextView_Callstatelabel_1_1_1) do
  6478. $ruiObj = RUIObject.new.with('objectid', -611515845).with('selfid', -821184504).with('textdescid', -1124622931).with('uniqueparentid', 0)
  6479. .with('uitreeindex', 5)
  6480. .with('classname', 'TextView')
  6481. .with('resource-id', 'com.android.incallui:id/callStateLabel')
  6482. .with('text', 'Incoming call')
  6483.  
  6484. $ruiObj.isNotExist
  6485. end
  6486.  
  6487. tcase << TestAction.new(:scriptAction_18_1_1) do
  6488. sendBTCmd('endCall')
  6489.  
  6490. waitsecond(2)
  6491. end
  6492.  
  6493. tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
  6494. $myTestResult = checkLastBTCmdResult
  6495. if $myTestResult == false
  6496. $myFailReason = "Call not come to other dev"
  6497. end
  6498. logStopTest("VideoCall_02")
  6499. end
  6500.  
  6501. tcase << TestAction.new(:Button_ButtonEndCall_4) do
  6502. $ruiObj = RUIObject.new.with('objectid', 449066258).with('selfid', 2024460923).with('textdescid', -1859117805).with('uniqueparentid', 0)
  6503. .with('uitreeindex', 8)
  6504. .with('classname', 'Button')
  6505. .with('resource-id', 'com.android.incallui:id/button_end_call')
  6506. .with('text', 'End')
  6507.  
  6508. $ruiObj.click
  6509.  
  6510. waitsecond(1)
  6511. end
  6512.  
  6513. tcase << TestAction.new(:pressBack_3) do
  6514. pressBack
  6515. end
  6516.  
  6517. tcase << TestAction.new(:pressBack_4) do
  6518. pressBack
  6519. end
  6520.  
  6521. tcase.run(loopTime)
  6522.  
  6523. end
  6524.  
  6525. def self.VideoTelephony_05_01_14_03(loopTime)
  6526.  
  6527. tcase = TestCase.new("VideoTelephony_05_01_14_03")
  6528.  
  6529. tcase << TestAction.new(:scriptAction_StartTest_1) do
  6530. logStartTest("VideoCall_03")
  6531. end
  6532.  
  6533. tcase << TestAction.new(:scriptAction_18_1_1) do
  6534. sendBTCmd("makeVideoCall('#{db('CallNumber')[0]}')")
  6535.  
  6536. waitsecond(32)
  6537. end
  6538.  
  6539. tcase << TestAction.new(:scriptAction_26) do
  6540. answerCall
  6541.  
  6542. waitsecond(8)
  6543. end
  6544.  
  6545. tcase << TestAction.new(:TextView_Callstatelabel_1_1_1_1) do
  6546. $ruiObj = RUIObject.new.with('objectid', -611515845).with('selfid', -821184504).with('textdescid', -1124622931).with('uniqueparentid', 0)
  6547. .with('uitreeindex', 5)
  6548. .with('classname', 'TextView')
  6549. .with('resource-id', 'com.android.incallui:id/callStateLabel')
  6550. .with('text', 'Incoming call')
  6551.  
  6552. $ruiObj.isNotExist
  6553. end
  6554.  
  6555. tcase << TestAction.new(:scriptAction_2) do
  6556. endCall
  6557.  
  6558. waitsecond(2)
  6559. end
  6560.  
  6561. tcase << TestAction.new(:scriptAction_LogStopTest_1_1_1) do
  6562. $myTestResult = checkLastBTCmdResult
  6563. if $myTestResult == false
  6564. $myFailReason = "Call not come to other dev"
  6565. end
  6566. logStopTest("VideoCall_03")
  6567. end
  6568.  
  6569. tcase.run(loopTime)
  6570.  
  6571. end
  6572.  
  6573. def self.VideoTelephony_05_01_14_04(loopTime)
  6574.  
  6575. tcase = TestCase.new("VideoTelephony_05_01_14_04")
  6576.  
  6577. tcase << TestAction.new(:scriptAction_StartTest_1) do
  6578. logStartTest("VideoCall_04")
  6579. end
  6580.  
  6581. tcase << TestAction.new(:scriptAction_18_1_1) do
  6582. sendBTCmd("makeVideoCall('#{db('CallNumber')[0]}')")
  6583.  
  6584. waitsecond(32)
  6585. end
  6586.  
  6587. tcase << TestAction.new(:scriptAction_26) do
  6588. answerCall
  6589.  
  6590. waitsecond(8)
  6591. end
  6592.  
  6593. tcase << TestAction.new(:TextView_Callstatelabel_1_1_1_1_1) do
  6594. $ruiObj = RUIObject.new.with('objectid', -611515845).with('selfid', -821184504).with('textdescid', -1124622931).with('uniqueparentid', 0)
  6595. .with('uitreeindex', 5)
  6596. .with('classname', 'TextView')
  6597. .with('resource-id', 'com.android.incallui:id/callStateLabel')
  6598. .with('text', 'Incoming call')
  6599.  
  6600. $ruiObj.isNotExist
  6601. end
  6602.  
  6603. tcase << TestAction.new(:scriptAction_2) do
  6604. endCall
  6605.  
  6606. waitsecond(2)
  6607. end
  6608.  
  6609. tcase << TestAction.new(:scriptAction_LogStopTest_1_1_1) do
  6610. $myTestResult = checkLastBTCmdResult
  6611. if $myTestResult == false
  6612. $myFailReason = "Call not come to other dev"
  6613. end
  6614. logStopTest("VideoCall_04")
  6615. end
  6616.  
  6617. tcase.run(loopTime)
  6618.  
  6619. end
  6620.  
  6621. def self.VideoTelephony_05_01_14_05(loopTime)
  6622.  
  6623. tcase = TestCase.new("VideoTelephony_05_01_14_05")
  6624.  
  6625. tcase << TestAction.new(:scriptAction_StartTest_1) do
  6626. logStartTest("VideoCall_05")
  6627. end
  6628.  
  6629. tcase << TestAction.new(:TextView_Phone_2) do
  6630. $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
  6631. .with('uitreeindex', 9)
  6632. .with('classname', 'TextView')
  6633. .with('content-desc', 'Phone')
  6634. .with('text', 'Phone')
  6635.  
  6636. $ruiObj.click
  6637.  
  6638. waitsecond(1)
  6639. end
  6640.  
  6641. tcase << TestAction.new(:TextView_Tabtext_23) do
  6642. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 566119687).with('textdescid', 1861262411).with('uniqueparentid', 0)
  6643. .with('uitreeindex', 2)
  6644. .with('classname', 'TextView')
  6645. .with('resource-id', 'com.android.contacts:id/tabText')
  6646. .with('text', 'Dial')
  6647.  
  6648. $ruiObj.click
  6649.  
  6650. waitsecond(2)
  6651. end
  6652.  
  6653. tcase << TestAction.new(:scriptAction_2) do
  6654. $ruiObj = RUIObject.new.with('objectid', 477485968).with('selfid', -1326421482).with('textdescid', 1917163152).with('uniqueparentid', 0)
  6655. .with('uitreeindex', 7)
  6656. .with('classname', 'EditText')
  6657. .with('resource-id', 'com.android.contacts:id/digits')
  6658.  
  6659. $ruiObj.inputtext("#{db('CallNumber')[1]}")
  6660.  
  6661. waitsecond(2)
  6662. end
  6663.  
  6664. tcase << TestAction.new(:ImageButton_Btnvt_6) do
  6665. $ruiObj = RUIObject.new.with('objectid', -999718621).with('selfid', -1888469943).with('textdescid', -1795784128).with('uniqueparentid', 0)
  6666. .with('uitreeindex', 61)
  6667. .with('classname', 'ImageButton')
  6668. .with('resource-id', 'com.android.contacts:id/btnVT')
  6669. .with('content-desc', 'Video Call')
  6670.  
  6671. $ruiObj.click
  6672.  
  6673. waitsecond(2)
  6674. end
  6675.  
  6676. tcase << TestAction.new(:wait8second_2) do
  6677. waitsecond(8)
  6678. end
  6679.  
  6680. tcase << TestAction.new(:scriptAction_18_1) do
  6681. sendBTCmd('answerCall')
  6682.  
  6683. waitsecond(8)
  6684. end
  6685.  
  6686. tcase << TestAction.new(:TextView_Callstatelabel_1_1_1_1_1_1) do
  6687. $ruiObj = RUIObject.new.with('objectid', -611515845).with('selfid', -821184504).with('textdescid', -1124622931).with('uniqueparentid', 0)
  6688. .with('uitreeindex', 5)
  6689. .with('classname', 'TextView')
  6690. .with('resource-id', 'com.android.incallui:id/callStateLabel')
  6691. .with('text', 'Incoming call')
  6692.  
  6693. $ruiObj.isNotExist
  6694. end
  6695.  
  6696. tcase << TestAction.new(:scriptAction_18_1_1) do
  6697. sendBTCmd('endCall')
  6698.  
  6699. waitsecond(2)
  6700. end
  6701.  
  6702. tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
  6703. $myTestResult = checkLastBTCmdResult
  6704. if $myTestResult == false
  6705. $myFailReason = "Call not come to other dev"
  6706. end
  6707. logStopTest("VideoCall_05")
  6708. end
  6709.  
  6710. tcase << TestAction.new(:Button_ButtonEndCall_4) do
  6711. $ruiObj = RUIObject.new.with('objectid', 449066258).with('selfid', 2024460923).with('textdescid', -1859117805).with('uniqueparentid', 0)
  6712. .with('uitreeindex', 8)
  6713. .with('classname', 'Button')
  6714. .with('resource-id', 'com.android.incallui:id/button_end_call')
  6715. .with('text', 'End')
  6716.  
  6717. $ruiObj.click
  6718.  
  6719. waitsecond(1)
  6720. end
  6721.  
  6722. tcase << TestAction.new(:pressBack_3) do
  6723. pressBack
  6724. end
  6725.  
  6726. tcase << TestAction.new(:pressBack_4) do
  6727. pressBack
  6728. end
  6729.  
  6730. tcase.run(loopTime)
  6731.  
  6732. end
  6733.  
  6734. def self.WiFi_05_01_10_01(loopTime)
  6735.  
  6736. tcase = TestCase.new("WiFi_05_01_10_01")
  6737.  
  6738. tcase << TestAction.new(:scriptAction_2) do
  6739. logStartTest("05_01_10_01_WiFi")
  6740. end
  6741.  
  6742. tcase << TestAction.new(:scriptAction_21) do
  6743. gotoSettings
  6744.  
  6745. waitsecond(2)
  6746. end
  6747.  
  6748. tcase << TestAction.new(:TextView_Title_2) do
  6749. $ruiObj = RUIObject.new.with('objectid', 674368800).with('selfid', -2078686330).with('textdescid', -957350501).with('uniqueparentid', 0)
  6750. .with('uitreeindex', 2)
  6751. .with('classname', 'TextView')
  6752. .with('resource-id', 'android:id/title')
  6753. .with('text', 'Networks')
  6754.  
  6755. $ruiObj.click
  6756.  
  6757. waitsecond(1)
  6758. end
  6759.  
  6760. tcase << TestAction.new(:swipeUp_1) do
  6761. swipe_vertical_back 500
  6762. end
  6763.  
  6764. tcase << TestAction.new(:TextView_Title_27) do
  6765. $ruiObj = RUIObject.new.with('objectid', 67205646).with('selfid', -589731018).with('textdescid', 397088473).with('uniqueparentid', 0).with('classresourceid', 490183159)
  6766. .with('uitreeindex', 16)
  6767. .with('classname', 'TextView')
  6768. .with('resource-id', 'android:id/title')
  6769. .with('text', 'WiFi')
  6770.  
  6771. $ruiObj.click
  6772.  
  6773. waitsecond(2)
  6774. end
  6775.  
  6776. tcase << TestAction.new(:ImageView_Icon_2) do
  6777. $ruiObj = RUIObject.new.with('objectid', -1337042610).with('selfid', -1580627678).with('textdescid', 1501352082).with('uniqueparentid', 0).with('classresourceid', -858811928)
  6778. .with('uitreeindex', 8)
  6779. .with('pretext', 'WiFi networks')
  6780. .with('classname', 'ImageView')
  6781. .with('resource-id', 'android:id/icon')
  6782.  
  6783. $ruiObj.isExist
  6784. ifFailJumpTo(:Switch_OFF_10)
  6785.  
  6786. waitsecond(1)
  6787. end
  6788.  
  6789. tcase << TestAction.new(:Switch_ON_8) do
  6790. $ruiObj = RUIObject.new.with('objectid', 1178284996).with('selfid', 1645353587).with('textdescid', -1975291963).with('uniqueparentid', 0)
  6791. .with('uitreeindex', 2)
  6792. .with('classname', 'Switch')
  6793. .with('text', 'ON')
  6794.  
  6795. $ruiObj.click
  6796.  
  6797. waitsecond(2)
  6798. end
  6799.  
  6800. tcase << TestAction.new(:Switch_OFF_10) do
  6801. $ruiObj = RUIObject.new.with('objectid', 1178284996).with('selfid', -533646533).with('textdescid', -1104515187).with('uniqueparentid', 0)
  6802. .with('uitreeindex', 2)
  6803. .with('classname', 'Switch')
  6804. .with('text', 'OFF')
  6805.  
  6806. $ruiObj.click
  6807.  
  6808. waitsecond(4)
  6809. end
  6810.  
  6811. tcase << TestAction.new(:Switch_ON_14) do
  6812. $ruiObj = RUIObject.new.with('objectid', 1178284996).with('selfid', 1645353587).with('textdescid', -1975291963).with('uniqueparentid', 0)
  6813. .with('uitreeindex', 2)
  6814. .with('classname', 'Switch')
  6815. .with('text', 'ON')
  6816.  
  6817. $ruiObj.click
  6818.  
  6819. waitsecond(4)
  6820. end
  6821.  
  6822. tcase << TestAction.new(:TextView_Title_245_1) do
  6823. $ruiObj = RUIObject.new.with('objectid', 1391628862).with('selfid', 1193786863).with('textdescid', 936938386).with('uniqueparentid', 0).with('classresourceid', 490183159)
  6824. .with('uitreeindex', 7)
  6825. .with('classname', 'TextView')
  6826. .with('resource-id', 'android:id/title')
  6827. .with('text', 'WIFI NETWORKS')
  6828.  
  6829. $ruiObj.isExist
  6830.  
  6831. waitsecond(1)
  6832. end
  6833.  
  6834. tcase << TestAction.new(:scriptAction_10_TrueFalse) do
  6835. $myTestResult = checkLastExistResult
  6836.  
  6837. if $myTestResult == false
  6838. $myFailReason = "WiFi cannot turn ON"
  6839. end
  6840. logStopTest("05_01_10_01_WiFi")
  6841.  
  6842. waitsecond(1)
  6843. end
  6844.  
  6845. tcase << TestAction.new(:pressBack_20) do
  6846. pressBack
  6847. end
  6848.  
  6849. tcase << TestAction.new(:pressBack_21) do
  6850. pressBack
  6851. end
  6852.  
  6853. tcase << TestAction.new(:pressHome_22) do
  6854. pressHome
  6855. end
  6856.  
  6857. tcase.run(loopTime)
  6858.  
  6859. end
  6860.  
  6861. def self.WiFi_05_01_10_02(loopTime)
  6862.  
  6863. tcase = TestCase.new("WiFi_05_01_10_02")
  6864.  
  6865. tcase << TestAction.new(:scriptAction_2) do
  6866. logStartTest("05_01_10_02_WiFi")
  6867. end
  6868.  
  6869. tcase << TestAction.new(:scriptAction_29) do
  6870. gotoSettings
  6871.  
  6872. waitsecond(2)
  6873. end
  6874.  
  6875. tcase << TestAction.new(:TextView_Title_2) do
  6876. $ruiObj = RUIObject.new.with('objectid', 674368800).with('selfid', -2078686330).with('textdescid', -957350501).with('uniqueparentid', 0)
  6877. .with('uitreeindex', 2)
  6878. .with('classname', 'TextView')
  6879. .with('resource-id', 'android:id/title')
  6880. .with('text', 'Networks')
  6881.  
  6882. $ruiObj.click
  6883. end
  6884.  
  6885. tcase << TestAction.new(:swipeUp_2) do
  6886. swipe_vertical_back 500
  6887. end
  6888.  
  6889. tcase << TestAction.new(:TextView_Title_26) do
  6890. $ruiObj = RUIObject.new.with('objectid', 67205646).with('selfid', -589731018).with('textdescid', 397088473).with('uniqueparentid', 0).with('classresourceid', 490183159)
  6891. .with('uitreeindex', 16)
  6892. .with('classname', 'TextView')
  6893. .with('resource-id', 'android:id/title')
  6894. .with('text', 'WiFi')
  6895.  
  6896. $ruiObj.click
  6897.  
  6898. waitsecond(2)
  6899. end
  6900.  
  6901. tcase << TestAction.new(:scriptAction_28) do
  6902. $connectedObj = RUIObject.new.with('objectid', 231187981).with('selfid', -404041766).with('textdescid', -632905142).with('uniqueparentid', 0).with('classresourceid', -1930775675)
  6903. .with('uitreeindex', 13)
  6904. .with('classname', 'TextView')
  6905. .with('resource-id', 'android:id/summary')
  6906. .with('text', 'Connected')
  6907.  
  6908. $forgetObj = RUIObject.new.with('objectid', -360890208).with('selfid', 1729096951).with('textdescid', -493869997).with('uniqueparentid', 1382955622)
  6909. .with('uitreeindex', 12)
  6910. .with('classname', 'Button')
  6911. .with('resource-id', 'android:id/button3')
  6912. .with('text', 'FORGET')
  6913.  
  6914. $switchOnObj = RUIObject.new.with('objectid', 1178284996).with('selfid', 1645353587).with('textdescid', -1975291963).with('uniqueparentid', 0)
  6915. .with('uitreeindex', 2)
  6916. .with('classname', 'Switch')
  6917. .with('text', 'ON')
  6918.  
  6919. $switchOffObj = RUIObject.new.with('objectid', 1178284996).with('selfid', -533646533).with('textdescid', -1104515187).with('uniqueparentid', 0)
  6920. .with('uitreeindex', 2)
  6921. .with('classname', 'Switch')
  6922. .with('text', 'OFF')
  6923.  
  6924. if $switchOnObj.isExist
  6925. if $connectedObj.isExist
  6926. $connectedObj.click
  6927. waitsecond(1)
  6928. $forgetObj.click
  6929. waitsecond(1)
  6930. end
  6931. else
  6932. $switchOffObj.click
  6933. end
  6934.  
  6935.  
  6936. waitsecond(4)
  6937. end
  6938.  
  6939. tcase << TestAction.new(:Add_wifi) do
  6940. $ruiObj = RUIObject.new.with('objectid', 1634319278).with('selfid', 1290820192).with('textdescid', 371464933).with('uniqueparentid', 0)
  6941. .with('uitreeindex', 3)
  6942. .with('classname', 'ImageButton')
  6943. .with('content-desc', 'More options')
  6944.  
  6945. $ruiObj.click
  6946.  
  6947. waitsecond(2)
  6948. end
  6949.  
  6950. tcase << TestAction.new(:TextView_Title_6) do
  6951. $ruiObj = RUIObject.new.with('objectid', -1984796814).with('selfid', -392058123).with('textdescid', -1929502754).with('uniqueparentid', 0).with('classresourceid', 490183159)
  6952. .with('uitreeindex', 0)
  6953. .with('classname', 'TextView')
  6954. .with('resource-id', 'android:id/title')
  6955. .with('text', 'Add WiFi')
  6956.  
  6957. $ruiObj.click
  6958.  
  6959. waitsecond(2)
  6960. end
  6961.  
  6962. tcase << TestAction.new(:EditText_Ssid_8) do
  6963. $ruiObj = RUIObject.new.with('objectid', 1745689399).with('selfid', 1359933717).with('textdescid', -1718203447).with('uniqueparentid', 0).with('classresourceid', -1413606463)
  6964. .with('uitreeindex', 2)
  6965. .with('classname', 'EditText')
  6966. .with('resource-id', 'com.lge.wifisettings:id/ssid')
  6967.  
  6968. $ruiObj.inputtext('qctcomp')
  6969.  
  6970. waitsecond(4)
  6971. end
  6972.  
  6973. tcase << TestAction.new(:TextView_Text1_2) do
  6974. $ruiObj = RUIObject.new.with('objectid', 189805031).with('selfid', -586759035).with('textdescid', 1468089423).with('uniqueparentid', 0).with('classresourceid', 490068035)
  6975. .with('uitreeindex', 4)
  6976. .with('classname', 'TextView')
  6977. .with('resource-id', 'android:id/text1')
  6978. .with('text', 'None')
  6979.  
  6980. $ruiObj.click
  6981.  
  6982. waitsecond(2)
  6983. end
  6984.  
  6985. tcase << TestAction.new(:CheckedTextView_Text1_5) do
  6986. $ruiObj = RUIObject.new.with('objectid', -540328984).with('selfid', 1449740166).with('textdescid', -877093410).with('uniqueparentid', 0).with('classresourceid', 2074814108)
  6987. .with('uitreeindex', 2)
  6988. .with('classname', 'CheckedTextView')
  6989. .with('resource-id', 'android:id/text1')
  6990. .with('text', 'WPAWPA2 PSK')
  6991.  
  6992. $ruiObj.click
  6993.  
  6994. waitsecond(2)
  6995. end
  6996.  
  6997. tcase << TestAction.new(:EditText_Password_17_1) do
  6998. $ruiObj = RUIObject.new.with('objectid', -976316462).with('selfid', -2120332491).with('textdescid', -201039218).with('uniqueparentid', 0).with('classresourceid', -714852383)
  6999. .with('uitreeindex', 2)
  7000. .with('classname', 'EditText')
  7001. .with('resource-id', 'com.lge.wifisettings:id/password')
  7002.  
  7003. $ruiObj.inputtext('12abcdef34')
  7004.  
  7005. waitsecond(4)
  7006. end
  7007.  
  7008. tcase << TestAction.new(:Button_Button1_10) do
  7009. $ruiObj = RUIObject.new.with('objectid', -360890210).with('selfid', -210572094).with('textdescid', 1221395928).with('uniqueparentid', 0)
  7010. .with('uitreeindex', 7)
  7011. .with('classname', 'Button')
  7012. .with('resource-id', 'android:id/button1')
  7013. .with('text', 'CONNECT')
  7014.  
  7015. $ruiObj.click
  7016.  
  7017. waitsecond(4)
  7018. end
  7019.  
  7020. tcase << TestAction.new(:TextView_Summary_2) do
  7021. $ruiObj = RUIObject.new.with('objectid', 1704199271).with('selfid', -404041766).with('textdescid', -634935376).with('uniqueparentid', 0).with('classresourceid', -1930775675)
  7022. .with('uitreeindex', 7)
  7023. .with('classname', 'TextView')
  7024. .with('resource-id', 'android:id/summary')
  7025. .with('text', 'Connected')
  7026.  
  7027. $ruiObj.isExist
  7028.  
  7029. waitsecond(1)
  7030. end
  7031.  
  7032. tcase << TestAction.new(:TextView_Summary_29) do
  7033. $ruiObj = RUIObject.new.with('objectid', 231187981).with('selfid', -404041766).with('textdescid', -632905142).with('uniqueparentid', 0).with('classresourceid', -1930775675)
  7034. .with('uitreeindex', 11)
  7035. .with('classname', 'TextView')
  7036. .with('resource-id', 'android:id/summary')
  7037. .with('text', 'Connected')
  7038.  
  7039. $ruiObj.click
  7040.  
  7041. waitsecond(2)
  7042. end
  7043.  
  7044. tcase << TestAction.new(:Button_Button3_4) do
  7045. $ruiObj = RUIObject.new.with('objectid', -360890208).with('selfid', 1729096951).with('textdescid', -493869997).with('uniqueparentid', 0)
  7046. .with('uitreeindex', 12)
  7047. .with('classname', 'Button')
  7048. .with('resource-id', 'android:id/button3')
  7049. .with('text', 'FORGET')
  7050.  
  7051. $ruiObj.click
  7052.  
  7053. waitsecond(2)
  7054. end
  7055.  
  7056. tcase << TestAction.new(:scriptAction_23_TrueFalse) do
  7057. $myTestResult = checkLastExistResult
  7058.  
  7059. if $myTestResult == false
  7060. $myFailReason == "WiFi cannot connected"
  7061. end
  7062. logStopTest("05_01_10_02_WiFi")
  7063. end
  7064.  
  7065. tcase << TestAction.new(:Switch_OFF_19_1) do
  7066. $ruiObj = RUIObject.new.with('objectid', 1178284996).with('selfid', 1645353587).with('textdescid', -1975291963).with('uniqueparentid', 0)
  7067. .with('uitreeindex', 2)
  7068. .with('classname', 'Switch')
  7069. .with('text', 'OFF')
  7070.  
  7071. if !$ruiObj.isExist
  7072. $ruiObj.click
  7073. end
  7074.  
  7075. waitsecond(2)
  7076. end
  7077.  
  7078. tcase << TestAction.new(:pressBack_15) do
  7079. pressBack
  7080. end
  7081.  
  7082. tcase << TestAction.new(:pressBack_16) do
  7083. pressBack
  7084. end
  7085.  
  7086. tcase << TestAction.new(:pressHome_17) do
  7087. pressHome
  7088. end
  7089.  
  7090. tcase.run(loopTime)
  7091.  
  7092. end
  7093.  
  7094. def self.WiFi_Calling_05_01_16_01(loopTime)
  7095.  
  7096. tcase = TestCase.new("WiFi_Calling_05_01_16_01")
  7097.  
  7098. tcase << TestAction.new(:scriptAction_StartTest_1) do
  7099. logStartTest("05_01_16_01_WiFI_Calling")
  7100. end
  7101.  
  7102. tcase << TestAction.new(:pressHome_4) do
  7103. pressHome
  7104. end
  7105.  
  7106. tcase << TestAction.new(:TextView_Phone_21) do
  7107. $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
  7108. .with('uitreeindex', 20)
  7109. .with('classname', 'TextView')
  7110. .with('content-desc', 'Phone')
  7111. .with('text', 'Phone')
  7112.  
  7113. $ruiObj.click
  7114.  
  7115. waitsecond(2)
  7116. end
  7117.  
  7118. tcase << TestAction.new(:TextView_Tabtext_2) do
  7119. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
  7120. .with('uitreeindex', 4)
  7121. .with('classname', 'TextView')
  7122. .with('resource-id', 'com.android.contacts:id/tabText')
  7123. .with('text', 'Contacts')
  7124.  
  7125. $ruiObj.click
  7126.  
  7127. waitsecond(1)
  7128. end
  7129.  
  7130. tcase << TestAction.new(:EditText_SearchSrcText_4) do
  7131. $ruiObj = RUIObject.new.with('objectid', 588070375).with('selfid', -959326622).with('textdescid', -497243406).with('uniqueparentid', 0)
  7132. .with('uitreeindex', 6)
  7133. .with('classname', 'EditText')
  7134. .with('resource-id', 'android:id/search_src_text')
  7135. .with('content-desc', 'Search contacts')
  7136.  
  7137. $ruiObj.inputtext('A01')
  7138.  
  7139. waitsecond(1)
  7140. end
  7141.  
  7142. tcase << TestAction.new(:scriptAction_10_1) do
  7143. sendBTCmd('pressHome')
  7144. end
  7145.  
  7146. tcase << TestAction.new(:ImageView_Button1_8) do
  7147. $ruiObj = RUIObject.new.with('objectid', -1827607533).with('selfid', 643737864).with('textdescid', -306619761).with('uniqueparentid', 0).with('classresourceid', -1143292048)
  7148. .with('uitreeindex', 13)
  7149. .with('classname', 'ImageView')
  7150. .with('resource-id', 'android:id/button1')
  7151. .with('content-desc', 'Call A01 a01')
  7152.  
  7153. $ruiObj.click
  7154.  
  7155. waitsecond(4)
  7156. end
  7157.  
  7158. tcase << TestAction.new(:wait8second_31) do
  7159. waitsecond(8)
  7160. end
  7161.  
  7162. tcase << TestAction.new(:scriptAction_10) do
  7163. sendBTCmd('answerCall')
  7164.  
  7165. waitsecond(8)
  7166. end
  7167.  
  7168. tcase << TestAction.new(:scriptAction_10_1) do
  7169.  
  7170. if rand(100) < 0
  7171.  
  7172. sendBTCmd('endCall')
  7173.  
  7174. waitsecond(1)
  7175.  
  7176. end
  7177.  
  7178. end
  7179.  
  7180. tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
  7181. $myTestResult = checkLastBTCmdResult
  7182. if $myTestResult == false
  7183. $myFailReason = "Call not come to other dev"
  7184. end
  7185. logStopTest("05_01_16_01_WiFI_Calling")
  7186.  
  7187. end
  7188.  
  7189. tcase << TestAction.new(:Button_Endbutton_2) do
  7190. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  7191. .with('uitreeindex', 8)
  7192. .with('classname', 'Button')
  7193. .with('resource-id', 'com.android.incallui:id/endButton')
  7194. .with('text', 'End')
  7195.  
  7196. $ruiObj.click
  7197.  
  7198. waitsecond(1)
  7199. end
  7200.  
  7201. tcase << TestAction.new(:pressBack_3) do
  7202. pressBack
  7203. end
  7204.  
  7205. tcase << TestAction.new(:pressBack_4) do
  7206. pressBack
  7207. end
  7208.  
  7209. tcase.run(loopTime)
  7210.  
  7211. end
  7212.  
  7213. def self.WiFi_Calling_05_01_16_02(loopTime)
  7214.  
  7215. tcase = TestCase.new("WiFi_Calling_05_01_16_02")
  7216.  
  7217. tcase << TestAction.new(:scriptAction_StartTest_1) do
  7218. logStartTest("05_01_16_02_WiFI_Calling")
  7219. end
  7220.  
  7221. tcase << TestAction.new(:pressHome_4) do
  7222. pressHome
  7223. end
  7224.  
  7225. tcase << TestAction.new(:TextView_Phone_2) do
  7226. $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
  7227. .with('uitreeindex', 9)
  7228. .with('classname', 'TextView')
  7229. .with('content-desc', 'Phone')
  7230. .with('text', 'Phone')
  7231.  
  7232. $ruiObj.click
  7233.  
  7234. waitsecond(1)
  7235. end
  7236.  
  7237. tcase << TestAction.new(:TextView_Tabtext_21) do
  7238. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 566119687).with('textdescid', 1861262411).with('uniqueparentid', 0)
  7239. .with('uitreeindex', 2)
  7240. .with('classname', 'TextView')
  7241. .with('resource-id', 'com.android.contacts:id/tabText')
  7242. .with('text', 'Dial')
  7243.  
  7244. $ruiObj.click
  7245.  
  7246. waitsecond(2)
  7247. end
  7248.  
  7249. tcase << TestAction.new(:EditText_Digits_4) do
  7250. $ruiObj = RUIObject.new.with('objectid', 477485968).with('selfid', -1326421482).with('textdescid', 1917163152).with('uniqueparentid', 0)
  7251. .with('uitreeindex', 7)
  7252. .with('classname', 'EditText')
  7253. .with('resource-id', 'com.android.contacts:id/digits')
  7254.  
  7255. $ruiObj.inputtext('18003310500')
  7256.  
  7257. waitsecond(2)
  7258. end
  7259.  
  7260. tcase << TestAction.new(:pressBack_2) do
  7261. pressBack
  7262.  
  7263. waitsecond(2)
  7264. end
  7265.  
  7266. tcase << TestAction.new(:ImageButton_Btnlogscall_4) do
  7267. $ruiObj = RUIObject.new.with('objectid', -1934426254).with('selfid', -2053967649).with('textdescid', -911487124).with('uniqueparentid', 0)
  7268. .with('uitreeindex', 35)
  7269. .with('classname', 'ImageButton')
  7270. .with('resource-id', 'com.android.contacts:id/btnLogsCall')
  7271. .with('content-desc', 'Call')
  7272.  
  7273. $ruiObj.click
  7274.  
  7275. waitsecond(2)
  7276. end
  7277.  
  7278. tcase << TestAction.new(:wait8second_31) do
  7279. waitsecond(8)
  7280. end
  7281.  
  7282. tcase << TestAction.new(:Button_Endbutton_6) do
  7283. $ruiObj = RUIObject.new.with('objectid', -2133227471).with('selfid', 1277076029).with('textdescid', -2023955116).with('uniqueparentid', 0)
  7284. .with('uitreeindex', 7)
  7285. .with('classname', 'Button')
  7286. .with('resource-id', 'com.android.incallui:id/endButton')
  7287. .with('text', 'End')
  7288.  
  7289. $ruiObj.isExist
  7290. end
  7291.  
  7292. tcase << TestAction.new(:Button_Endbutton_6_1) do
  7293. $ruiObj = RUIObject.new.with('objectid', -2133227471).with('selfid', 1277076029).with('textdescid', -2023955116).with('uniqueparentid', 0)
  7294. .with('uitreeindex', 7)
  7295. .with('classname', 'Button')
  7296. .with('resource-id', 'com.android.incallui:id/endButton')
  7297. .with('text', 'End')
  7298.  
  7299. $ruiObj.click
  7300.  
  7301. waitsecond(2)
  7302. end
  7303.  
  7304. tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
  7305. $myTestResult = checkLastBTCmdResult
  7306. if $myTestResult == false
  7307. $myFailReason = "Call not come to other dev"
  7308. end
  7309. logStopTest("05_01_16_01_WiFI_Calling")
  7310.  
  7311. end
  7312.  
  7313. tcase << TestAction.new(:pressBack_3) do
  7314. pressBack
  7315. end
  7316.  
  7317. tcase << TestAction.new(:pressBack_4) do
  7318. pressBack
  7319. end
  7320.  
  7321. tcase.run(loopTime)
  7322.  
  7323. end
  7324.  
  7325. def self.WiFi_Calling_05_01_16_03(loopTime)
  7326.  
  7327. tcase = TestCase.new("WiFi_Calling_05_01_16_03")
  7328.  
  7329. tcase << TestAction.new(:pressHome_2) do
  7330. pressHome
  7331. end
  7332.  
  7333. tcase << TestAction.new(:turnOnWiFi) do
  7334. sendBTCmd('turnOnWiFi')
  7335.  
  7336. waitsecond(32)
  7337. end
  7338.  
  7339. tcase << TestAction.new(:wait20second_4) do
  7340. waitsecond(20)
  7341. end
  7342.  
  7343. tcase << TestAction.new(:scriptAction_StartTestLog_1) do
  7344. logStartTest("05_01_16_03_WiFI_Calling")
  7345. end
  7346.  
  7347. tcase << TestAction.new(:scriptAction_BTMakeCall) do
  7348. sendBTCmd("makeCall2('#{db('CallNumber')[0]}')")
  7349.  
  7350. waitsecond(8)
  7351. end
  7352.  
  7353. tcase << TestAction.new(:wait8second_10) do
  7354. waitsecond(8)
  7355. end
  7356.  
  7357. tcase << TestAction.new(:scriptAction_3_1) do
  7358. sendBTCmd("uiObj('ImageButton').desc('Call').click")
  7359.  
  7360. waitsecond(8)
  7361. end
  7362.  
  7363. tcase << TestAction.new(:answerSwipe) do
  7364. answerCall
  7365.  
  7366. waitsecond(8)
  7367. end
  7368.  
  7369. tcase << TestAction.new(:scriptAction_BTEndCall_1) do
  7370. sendBTCmd('endCall')
  7371. end
  7372.  
  7373. tcase << TestAction.new(:Button_Endbutton_5) do
  7374. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  7375. .with('uitreeindex', 13)
  7376. .with('classname', 'Button')
  7377. .with('resource-id', 'com.android.incallui:id/endButton')
  7378. .with('text', 'End')
  7379.  
  7380. $ruiObj.click
  7381.  
  7382. waitsecond(2)
  7383. end
  7384.  
  7385. tcase << TestAction.new(:scriptAction_7) do
  7386. sendBTCmd('wfc_disabled')
  7387.  
  7388. waitsecond(2)
  7389. end
  7390.  
  7391. tcase << TestAction.new(:turnOffWiFi) do
  7392. sendBTCmd('turnOffWiFi')
  7393.  
  7394. waitsecond(32)
  7395. end
  7396.  
  7397. tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
  7398. $myTestResult = checkLastBTCmdResult
  7399. if $myTestResult == false
  7400. $myFailReason = "Call not come to other dev"
  7401. end
  7402. logStopTest("05_01_16_03_WiFI_Calling")
  7403.  
  7404. waitsecond(2)
  7405. end
  7406.  
  7407. tcase << TestAction.new(:pressBack_1) do
  7408. pressBack
  7409. end
  7410.  
  7411. tcase << TestAction.new(:pressBack_2) do
  7412. pressBack
  7413. end
  7414.  
  7415. tcase.run(loopTime)
  7416.  
  7417. end
  7418.  
  7419. def self.WiFi_Calling_Disabled(loopTime)
  7420.  
  7421. tcase = TestCase.new("WiFi_Calling_Disabled")
  7422.  
  7423. tcase << TestAction.new(:scriptAction_4) do
  7424. wfc_disabled
  7425.  
  7426. waitsecond(2)
  7427. end
  7428.  
  7429. tcase.run(loopTime)
  7430.  
  7431. end
  7432.  
  7433. def self.WiFi_Calling_Enabled(loopTime)
  7434.  
  7435. tcase = TestCase.new("WiFi_Calling_Enabled")
  7436.  
  7437. tcase << TestAction.new(:scriptAction_1) do
  7438. wfc_enabled
  7439.  
  7440.  
  7441. waitsecond(2)
  7442. end
  7443.  
  7444. tcase.run(loopTime)
  7445.  
  7446. end
  7447.  
  7448. def self.android_ExpHandler(loopTime)
  7449.  
  7450. tcase = TestCase.new("android_ExpHandler")
  7451.  
  7452. tcase << TestAction.new(:scriptAction_check) do
  7453. $err = "system popup detected::#{takeScreenShot}::screenshot saved"
  7454. $myTestResult = false
  7455. puts $err
  7456. logcat($err)
  7457. writelog($err)
  7458. uiObj("Button").click if uiObj("Button").exists
  7459.  
  7460. waitsecond(2)
  7461. end
  7462.  
  7463. tcase.run(loopTime)
  7464.  
  7465. end
  7466.  
  7467. def self.change_3G(loopTime)
  7468.  
  7469. tcase = TestCase.new("change_3G")
  7470.  
  7471. tcase << TestAction.new(:pressHome_2) do
  7472. pressHome
  7473.  
  7474. waitsecond(2)
  7475. end
  7476.  
  7477. tcase << TestAction.new(:TextView_Phone_4) do
  7478. $ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 1923496804).with('textdescid', -1252643750).with('uniqueparentid', 0)
  7479. .with('uitreeindex', 20)
  7480. .with('classname', 'TextView')
  7481. .with('content-desc', 'Phone')
  7482.  
  7483. $ruiObj.click
  7484.  
  7485. waitsecond(2)
  7486. end
  7487.  
  7488. tcase << TestAction.new(:EditText_Digits_6) do
  7489. $ruiObj = RUIObject.new.with('objectid', 477485968).with('selfid', -1326421482).with('textdescid', 1917163152).with('uniqueparentid', 0)
  7490. .with('uitreeindex', 7)
  7491. .with('classname', 'EditText')
  7492. .with('resource-id', 'com.android.contacts:id/digits')
  7493.  
  7494. $ruiObj.inputtext('*#546368#*910#')
  7495.  
  7496. waitsecond(2)
  7497. end
  7498.  
  7499. tcase << TestAction.new(:TextView_Title_2) do
  7500. $ruiObj = RUIObject.new.with('objectid', 1100751325).with('selfid', -167282287).with('textdescid', -350417171).with('uniqueparentid', 0).with('classresourceid', 490183159)
  7501. .with('uitreeindex', 1)
  7502. .with('classname', 'TextView')
  7503. .with('resource-id', 'android:id/title')
  7504. .with('text', 'LG Hidden Menu')
  7505.  
  7506. $ruiObj.click
  7507.  
  7508. waitsecond(1)
  7509. end
  7510.  
  7511. tcase << TestAction.new(:TextView_Title_87) do
  7512. $ruiObj = RUIObject.new.with('objectid', 684902757).with('selfid', 538152793).with('textdescid', -1915478867).with('uniqueparentid', 0).with('classresourceid', 490183159)
  7513. .with('uitreeindex', 4)
  7514. .with('classname', 'TextView')
  7515. .with('resource-id', 'android:id/title')
  7516. .with('text', 'Field Test')
  7517.  
  7518. $ruiObj.click
  7519.  
  7520. waitsecond(1)
  7521. end
  7522.  
  7523. tcase << TestAction.new(:TextView_Text1_10) do
  7524. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', -141259386).with('textdescid', -734720867).with('uniqueparentid', 0).with('classresourceid', 490068035)
  7525. .with('uitreeindex', 1)
  7526. .with('classname', 'TextView')
  7527. .with('resource-id', 'android:id/text1')
  7528. .with('text', 'Modem Settings')
  7529.  
  7530. $ruiObj.click
  7531.  
  7532. waitsecond(1)
  7533. end
  7534.  
  7535. tcase << TestAction.new(:swipeDown_12) do
  7536. swipe_vertical 500
  7537.  
  7538. waitsecond(1)
  7539. end
  7540.  
  7541. tcase << TestAction.new(:TextView_Text1_14) do
  7542. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', 12767364).with('textdescid', 1760273017).with('uniqueparentid', 0).with('classresourceid', 490068035)
  7543. .with('uitreeindex', 6)
  7544. .with('classname', 'TextView')
  7545. .with('resource-id', 'android:id/text1')
  7546. .with('text', 'RAT Selection')
  7547.  
  7548. $ruiObj.click
  7549.  
  7550. waitsecond(1)
  7551. end
  7552.  
  7553. tcase << TestAction.new(:TextView_Text1_2) do
  7554. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', -244179464).with('textdescid', 496935915).with('uniqueparentid', 0).with('classresourceid', 490068035)
  7555. .with('uitreeindex', 5)
  7556. .with('classname', 'TextView')
  7557. .with('resource-id', 'android:id/text1')
  7558. .with('text', 'GSM WCDMA')
  7559.  
  7560. $ruiObj.click
  7561.  
  7562. waitsecond(1)
  7563. end
  7564.  
  7565. tcase << TestAction.new(:Button_Button1_18) do
  7566. $ruiObj = RUIObject.new.with('objectid', 2089308220).with('selfid', -1318451484).with('textdescid', 1664978912).with('uniqueparentid', 0)
  7567. .with('uitreeindex', 1)
  7568. .with('classname', 'Button')
  7569. .with('resource-id', 'android:id/button1')
  7570. .with('text', 'OK')
  7571.  
  7572. $ruiObj.click
  7573.  
  7574. waitsecond(1)
  7575. end
  7576.  
  7577. tcase << TestAction.new(:pressBack_7) do
  7578. pressBack
  7579. end
  7580.  
  7581. tcase << TestAction.new(:pressBack_8) do
  7582. pressBack
  7583. end
  7584.  
  7585. tcase << TestAction.new(:pressBack_20) do
  7586. pressBack
  7587. end
  7588.  
  7589. tcase << TestAction.new(:pressBack_20_1) do
  7590. pressBack
  7591. end
  7592.  
  7593. tcase << TestAction.new(:pressHome_9) do
  7594. pressHome
  7595. end
  7596.  
  7597. tcase.run(loopTime)
  7598.  
  7599. end
  7600.  
  7601. def self.change_LTE(loopTime)
  7602.  
  7603. tcase = TestCase.new("change_LTE")
  7604.  
  7605. tcase << TestAction.new(:gotoApp_16_1) do
  7606. gotoApp('HiddenMenuCall')
  7607. end
  7608.  
  7609. tcase << TestAction.new(:TextView_Title_3) do
  7610. $ruiObj = RUIObject.new.with('objectid', 1100751325).with('selfid', -167282287).with('textdescid', -350417171).with('uniqueparentid', 0).with('classresourceid', 490183159)
  7611. .with('uitreeindex', 1)
  7612. .with('classname', 'TextView')
  7613. .with('resource-id', 'android:id/title')
  7614. .with('text', 'LG Hidden Menu')
  7615.  
  7616. $ruiObj.click
  7617.  
  7618. waitsecond(1)
  7619. end
  7620.  
  7621. tcase << TestAction.new(:TextView_Title_87) do
  7622. $ruiObj = RUIObject.new.with('objectid', 684902757).with('selfid', 538152793).with('textdescid', -1915478867).with('uniqueparentid', 0).with('classresourceid', 490183159)
  7623. .with('uitreeindex', 4)
  7624. .with('classname', 'TextView')
  7625. .with('resource-id', 'android:id/title')
  7626. .with('text', 'Field Test')
  7627.  
  7628. $ruiObj.click
  7629.  
  7630. waitsecond(1)
  7631. end
  7632.  
  7633. tcase << TestAction.new(:TextView_Text1_10) do
  7634. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', -141259386).with('textdescid', -734720867).with('uniqueparentid', 0).with('classresourceid', 490068035)
  7635. .with('uitreeindex', 1)
  7636. .with('classname', 'TextView')
  7637. .with('resource-id', 'android:id/text1')
  7638. .with('text', 'Modem Settings')
  7639.  
  7640. $ruiObj.click
  7641.  
  7642. waitsecond(1)
  7643. end
  7644.  
  7645. tcase << TestAction.new(:swipeDown_12) do
  7646. swipe_vertical 500
  7647.  
  7648. waitsecond(1)
  7649. end
  7650.  
  7651. tcase << TestAction.new(:TextView_Text1_14) do
  7652. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', 12767364).with('textdescid', 1760273017).with('uniqueparentid', 0).with('classresourceid', 490068035)
  7653. .with('uitreeindex', 6)
  7654. .with('classname', 'TextView')
  7655. .with('resource-id', 'android:id/text1')
  7656. .with('text', 'RAT Selection')
  7657.  
  7658. $ruiObj.click
  7659.  
  7660. waitsecond(1)
  7661. end
  7662.  
  7663. tcase << TestAction.new(:TextView_Text1_2) do
  7664. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', 747569194).with('textdescid', -1653100487).with('uniqueparentid', 0).with('classresourceid', 490068035)
  7665. .with('uitreeindex', 1)
  7666. .with('classname', 'TextView')
  7667. .with('resource-id', 'android:id/text1')
  7668. .with('text', 'GSM WCDMA LTE auto')
  7669.  
  7670. $ruiObj.click
  7671.  
  7672. waitsecond(1)
  7673. end
  7674.  
  7675. tcase << TestAction.new(:Button_Button1_18) do
  7676. $ruiObj = RUIObject.new.with('objectid', 2089308220).with('selfid', -1318451484).with('textdescid', 1664978912).with('uniqueparentid', 0)
  7677. .with('uitreeindex', 1)
  7678. .with('classname', 'Button')
  7679. .with('resource-id', 'android:id/button1')
  7680. .with('text', 'OK')
  7681.  
  7682. $ruiObj.click
  7683.  
  7684. waitsecond(1)
  7685. end
  7686.  
  7687. tcase << TestAction.new(:pressBack_7) do
  7688. pressBack
  7689. end
  7690.  
  7691. tcase << TestAction.new(:pressBack_8) do
  7692. pressBack
  7693. end
  7694.  
  7695. tcase << TestAction.new(:pressBack_20) do
  7696. pressBack
  7697. end
  7698.  
  7699. tcase << TestAction.new(:pressBack_20_1) do
  7700. pressBack
  7701. end
  7702.  
  7703. tcase << TestAction.new(:pressHome_9) do
  7704. pressHome
  7705. end
  7706.  
  7707. tcase.run(loopTime)
  7708.  
  7709. end
  7710.  
  7711. def self.connectWifi(loopTime)
  7712.  
  7713. tcase = TestCase.new("connectWifi")
  7714.  
  7715. tcase << TestAction.new(:scriptAction_21) do
  7716. turnOnWiFi
  7717.  
  7718. waitsecond(2)
  7719. end
  7720.  
  7721. tcase.run(loopTime)
  7722.  
  7723. end
  7724.  
  7725. def self.disconnectWifi(loopTime)
  7726.  
  7727. tcase = TestCase.new("disconnectWifi")
  7728.  
  7729. tcase << TestAction.new(:scriptAction_2) do
  7730. turnOffWiFi
  7731.  
  7732. waitsecond(2)
  7733. end
  7734.  
  7735. tcase.run(loopTime)
  7736.  
  7737. end
  7738.  
  7739. def self.startTest(loopTime)
  7740.  
  7741. tcase = TestCase.new("startTest")
  7742.  
  7743. tcase << TestAction.new(:pressRecentApps_1) do
  7744. pressRecentApps
  7745.  
  7746. waitsecond(2)
  7747. end
  7748.  
  7749. tcase << TestAction.new(:TextView_Button_3) do
  7750. $ruiObj = RUIObject.new.with('objectid', -213794734).with('selfid', -204985471).with('textdescid', 1763854688).with('uniqueparentid', 0)
  7751. .with('uitreeindex', 7)
  7752. .with('classname', 'TextView')
  7753. .with('resource-id', 'com.android.systemui:id/button')
  7754. .with('text', 'CLEAR ALL')
  7755.  
  7756. $ruiObj.click
  7757.  
  7758. waitsecond(2)
  7759. end
  7760.  
  7761. tcase << TestAction.new(:pressHome_5) do
  7762. pressHome
  7763.  
  7764. waitsecond(2)
  7765. end
  7766.  
  7767. tcase.run(loopTime)
  7768.  
  7769. end
  7770.  
  7771. def self.MenuNavigation_05_01_09_01(loopTime)
  7772.  
  7773. tcase = TestCase.new("MenuNavigation_05_01_09_01")
  7774.  
  7775. tcase << TestAction.new(:pressHome_1) do
  7776. pressHome
  7777. end
  7778.  
  7779. tcase << TestAction.new(:scriptAction_off) do
  7780. $ignoreDefaultExpHandler = true
  7781.  
  7782. waitsecond(2)
  7783. end
  7784.  
  7785. tcase << TestAction.new(:scriptAction_StartTestLog) do
  7786. logStartTest("05_01_09_01_Menu_Navigation")
  7787.  
  7788.  
  7789. waitsecond(2)
  7790. end
  7791.  
  7792. tcase << TestAction.new(:scriptAction_resetCounter) do
  7793. $appCounter = 0
  7794.  
  7795. waitsecond(2)
  7796. end
  7797.  
  7798. tcase << TestAction.new(:scriptAction_loop) do
  7799.  
  7800. until $appCounter > 31
  7801. $appCounter += 1
  7802. gotoAppByAppDrawer(db('NavApp')[$appCounter-1])
  7803. waitsecond(2)
  7804. allow_popup
  7805. waitsecond(2)
  7806. pressHome
  7807. $ruiObj = RUIObject.new.with('objectid', -1351376744).with('selfid', -1318451484).with('textdescid', -1794026948).with('uniqueparentid', 0)
  7808. .with('uitreeindex', 1)
  7809. .with('classname', 'Button')
  7810. .with('resource-id', 'android:id/button1')
  7811. .with('text', 'OK')
  7812.  
  7813. $ruiObj.click
  7814. end
  7815.  
  7816. waitsecond(2)
  7817. end
  7818.  
  7819. tcase << TestAction.new(:scriptAction_StopLogTest) do
  7820. if $appCounter == 26
  7821. $myTestResult = true
  7822. else
  7823. $myTestRsult = false
  7824. $myFailReason = "Failed"
  7825. end
  7826. logStopTest("05_01_09_01_Menu_Navigation")
  7827.  
  7828. waitsecond(2)
  7829. end
  7830.  
  7831. tcase.run(loopTime)
  7832.  
  7833. end
  7834.  
  7835. def self.Email_05_01_03_02(loopTime)
  7836.  
  7837. tcase = TestCase.new("Email_05_01_03_02")
  7838.  
  7839. tcase << TestAction.new(:scriptAction_12) do
  7840. logStartTest("Email_05_01_03_02")
  7841. end
  7842.  
  7843. tcase << TestAction.new(:gotoApp_3) do
  7844. gotoApp('Email')
  7845.  
  7846. waitsecond(2)
  7847. end
  7848.  
  7849. tcase << TestAction.new(:ImageView_Img1_2) do
  7850. $ruiObj = RUIObject.new.with('objectid', 577677288).with('selfid', 1832242753).with('textdescid', 1040024250).with('uniqueparentid', 0)
  7851. .with('uitreeindex', 13)
  7852. .with('classname', 'ImageView')
  7853. .with('resource-id', 'com.lge.email:id/img1')
  7854. .with('content-desc', 'Compose')
  7855.  
  7856. $ruiObj.click
  7857.  
  7858. waitsecond(1)
  7859. end
  7860.  
  7861. tcase << TestAction.new(:EditText_To_2) do
  7862. $ruiObj = RUIObject.new.with('objectid', 949433449).with('selfid', -182898776).with('textdescid', -900253096).with('uniqueparentid', 0).with('classresourceid', 1666676343)
  7863. .with('uitreeindex', 6)
  7864. .with('pretext', 'To')
  7865. .with('classname', 'EditText')
  7866. .with('content-desc', 'To: ')
  7867.  
  7868. $ruiObj.inputtext('dvgats1@gmail.com')
  7869. end
  7870.  
  7871. tcase << TestAction.new(:pressEnter_3) do
  7872. pressEnter
  7873. end
  7874.  
  7875. tcase << TestAction.new(:EditText_Txtemailsubject_6) do
  7876. $ruiObj = RUIObject.new.with('objectid', 1286174050).with('selfid', -1018848110).with('textdescid', 1216689918).with('uniqueparentid', 1959895911).with('classresourceid', 386631998)
  7877. .with('uitreeindex', 11)
  7878. .with('classname', 'EditText')
  7879. .with('resource-id', 'com.lge.email:id/txtEmailSubject')
  7880.  
  7881. $ruiObj.inputtext('Email Test')
  7882.  
  7883. waitsecond(1)
  7884. end
  7885.  
  7886. tcase << TestAction.new(:clickXY_96_920_2) do
  7887. click(96,920)
  7888.  
  7889. waitsecond(1)
  7890. end
  7891.  
  7892. tcase << TestAction.new(:View_EditBox_4) do
  7893. $ruiObj = RUIObject.new.with('objectid', 134611444).with('selfid', 1661648749).with('textdescid', 1161931405).with('uniqueparentid', -2001114113).with('classresourceid', -760537482)
  7894. .with('uitreeindex', 12)
  7895. .with('pretext', 'CcBcc')
  7896. .with('classname', 'android.view.View')
  7897. .with('resource-id', 'EditBox')
  7898. .with('content-desc', '
  7899.  
  7900. Sent from my LG Mobile')
  7901.  
  7902. $ruiObj.click
  7903. end
  7904.  
  7905. tcase << TestAction.new(:scriptAction_14) do
  7906. $ruiObj.inputtext('Testing UiEngine Email Test!!!')
  7907. end
  7908.  
  7909. tcase << TestAction.new(:Button_BtnattachAtnt_2) do
  7910. $ruiObj = RUIObject.new.with('objectid', 61942491).with('selfid', 1685585846).with('textdescid', 746935205).with('uniqueparentid', 0)
  7911. .with('uitreeindex', 15)
  7912. .with('classname', 'Button')
  7913. .with('resource-id', 'com.lge.email:id/btnAttach_atnt')
  7914. .with('content-desc', 'Attach')
  7915. .with('text', 'ATTACH')
  7916.  
  7917. $ruiObj.click
  7918.  
  7919. waitsecond(2)
  7920. end
  7921.  
  7922. tcase << TestAction.new(:ImageView_Iv_15) do
  7923. $ruiObj = RUIObject.new.with('objectid', 973762667).with('selfid', -408094862).with('textdescid', 121871637).with('uniqueparentid', 0)
  7924. .with('uitreeindex', 1)
  7925. .with('pretext', 'Attach 0 B215 MB')
  7926. .with('classname', 'ImageView')
  7927. .with('resource-id', 'com.lge.email:id/iv')
  7928.  
  7929. $ruiObj.click
  7930.  
  7931. waitsecond(4)
  7932. end
  7933.  
  7934. tcase << TestAction.new(:ImageButton_Show_6) do
  7935. $ruiObj = RUIObject.new.with('objectid', -1807230859).with('selfid', -929198491).with('textdescid', 629574489).with('uniqueparentid', 0)
  7936. .with('uitreeindex', 0)
  7937. .with('classname', 'ImageButton')
  7938. .with('content-desc', 'Show roots')
  7939.  
  7940. $ruiObj.click
  7941.  
  7942. waitsecond(2)
  7943. end
  7944.  
  7945. tcase << TestAction.new(:TextView_Title_6) do
  7946. $ruiObj = RUIObject.new.with('objectid', 942770025).with('selfid', 525544369).with('textdescid', 2103473669).with('uniqueparentid', 0).with('classresourceid', 490183159)
  7947. .with('uitreeindex', 15)
  7948. .with('classname', 'TextView')
  7949. .with('resource-id', 'android:id/title')
  7950. .with('text', 'Gallery')
  7951.  
  7952. $ruiObj.click
  7953.  
  7954. waitsecond(2)
  7955. end
  7956.  
  7957. tcase << TestAction.new(:clickXY_228_560_6) do
  7958. click(228,560)
  7959.  
  7960. waitsecond(1)
  7961. end
  7962.  
  7963. tcase << TestAction.new(:clickXY_204_544_8) do
  7964. click(204,544)
  7965.  
  7966. waitsecond(1)
  7967. end
  7968.  
  7969. tcase << TestAction.new(:Button_SelectionOk_10) do
  7970. $ruiObj = RUIObject.new.with('objectid', 1615080131).with('selfid', 1112270122).with('textdescid', -118829337).with('uniqueparentid', 0)
  7971. .with('uitreeindex', 3)
  7972. .with('classname', 'Button')
  7973. .with('resource-id', 'com.android.gallery3d:id/selection_ok')
  7974. .with('text', 'OK')
  7975.  
  7976. $ruiObj.click
  7977.  
  7978. waitsecond(1)
  7979. end
  7980.  
  7981. tcase << TestAction.new(:Click_Original) do
  7982. $ruiObj = RUIObject.new.with('objectid', -784272264).with('selfid', -1179635554).with('textdescid', -74272089).with('uniqueparentid', 0).with('classresourceid', 490068035)
  7983. .with('uitreeindex', 1)
  7984. .with('classname', 'TextView')
  7985. .with('resource-id', 'android:id/text1')
  7986. .with('text', 'Original')
  7987.  
  7988. $ruiObj.click
  7989.  
  7990. waitsecond(1)
  7991. end
  7992.  
  7993. tcase << TestAction.new(:Button_BtnsendAtnt_4) do
  7994. $ruiObj = RUIObject.new.with('objectid', 1747678584).with('selfid', 1651854553).with('textdescid', 36858568).with('uniqueparentid', 0)
  7995. .with('uitreeindex', 21)
  7996. .with('classname', 'Button')
  7997. .with('resource-id', 'com.lge.email:id/btnSend_atnt')
  7998. .with('content-desc', 'Send')
  7999. .with('text', 'SEND')
  8000.  
  8001. $ruiObj.click
  8002.  
  8003. waitsecond(2)
  8004. end
  8005.  
  8006. tcase << TestAction.new(:ImageView_Img1_23) do
  8007. $ruiObj = RUIObject.new.with('objectid', 577677288).with('selfid', 1832242753).with('textdescid', 1040024250).with('uniqueparentid', 0)
  8008. .with('uitreeindex', 18)
  8009. .with('classname', 'ImageView')
  8010. .with('resource-id', 'com.lge.email:id/img1')
  8011. .with('content-desc', 'Compose')
  8012.  
  8013. $ruiObj.isExist
  8014.  
  8015. waitsecond(2)
  8016. end
  8017.  
  8018. tcase << TestAction.new(:ImageView_Slidedrawerimg_20) do
  8019. $ruiObj = RUIObject.new.with('objectid', -431894634).with('selfid', -1542033050).with('textdescid', -503831734).with('uniqueparentid', 0)
  8020. .with('uitreeindex', 0)
  8021. .with('classname', 'ImageView')
  8022. .with('resource-id', 'com.lge.email:id/slidedrawerimg')
  8023.  
  8024. $ruiObj.click
  8025.  
  8026. waitsecond(2)
  8027. end
  8028.  
  8029. tcase << TestAction.new(:TextView_DrawerChildName_22) do
  8030. $ruiObj = RUIObject.new.with('objectid', 2119189077).with('selfid', 232899905).with('textdescid', -1453017635).with('uniqueparentid', 0)
  8031. .with('uitreeindex', 19)
  8032. .with('classname', 'TextView')
  8033. .with('resource-id', 'com.lge.email:id/drawer_child_name')
  8034. .with('text', 'Sent')
  8035.  
  8036. $ruiObj.click
  8037.  
  8038. waitsecond(2)
  8039. end
  8040.  
  8041. tcase << TestAction.new(:clickXY_560_492_12) do
  8042. click(560,492)
  8043.  
  8044. waitsecond(1)
  8045. end
  8046.  
  8047. tcase << TestAction.new(:Button_Btnatntbottomdelete_6) do
  8048. $ruiObj = RUIObject.new.with('objectid', -2098725759).with('selfid', 480632483).with('textdescid', 1124287286).with('uniqueparentid', 0)
  8049. .with('uitreeindex', 25)
  8050. .with('classname', 'Button')
  8051. .with('resource-id', 'com.lge.email:id/btnAtntBottomDelete')
  8052. .with('text', 'DELETE')
  8053.  
  8054. $ruiObj.click
  8055.  
  8056. waitsecond(2)
  8057. end
  8058.  
  8059. tcase << TestAction.new(:Button_Button1_29) do
  8060. $ruiObj = RUIObject.new.with('objectid', 892548796).with('selfid', 1012902611).with('textdescid', 1604787793).with('uniqueparentid', 0)
  8061. .with('uitreeindex', 3)
  8062. .with('classname', 'Button')
  8063. .with('resource-id', 'android:id/button1')
  8064. .with('text', 'Delete')
  8065.  
  8066. $ruiObj.click
  8067.  
  8068. waitsecond(1)
  8069. end
  8070.  
  8071. tcase << TestAction.new(:scriptAction_8) do
  8072. $myTestResult = checkLastExistResult
  8073.  
  8074. if $myTestResult == false
  8075. $myFailReason = "Email not sent"
  8076. end
  8077. logStopTest("Email_05_01_03_02")
  8078. end
  8079.  
  8080. tcase << TestAction.new(:pressBack_3) do
  8081. pressBack
  8082. end
  8083.  
  8084. tcase << TestAction.new(:pressBack_4) do
  8085. pressBack
  8086. end
  8087.  
  8088. tcase.run(loopTime)
  8089.  
  8090. end
  8091.  
  8092. def self.Email_05_01_03_03(loopTime)
  8093.  
  8094. tcase = TestCase.new("Email_05_01_03_03")
  8095.  
  8096. tcase << TestAction.new(:scriptAction_3) do
  8097. logStartTest("Email_05_01_03_03")
  8098. end
  8099.  
  8100. tcase << TestAction.new(:gotoApp_3) do
  8101. gotoApp('Email')
  8102.  
  8103. waitsecond(2)
  8104. end
  8105.  
  8106. tcase << TestAction.new(:ImageView_Slidedrawerimg_2) do
  8107. $ruiObj = RUIObject.new.with('objectid', -431894634).with('selfid', -1542033050).with('textdescid', -503831734).with('uniqueparentid', 0)
  8108. .with('uitreeindex', 0)
  8109. .with('classname', 'ImageView')
  8110. .with('resource-id', 'com.lge.email:id/slidedrawerimg')
  8111.  
  8112. $ruiObj.click
  8113.  
  8114. waitsecond(2)
  8115. end
  8116.  
  8117. tcase << TestAction.new(:TextView_DrawerChildName_11) do
  8118. $ruiObj = RUIObject.new.with('objectid', 2119189077).with('selfid', -1379016195).with('textdescid', 1922754213).with('uniqueparentid', 0)
  8119. .with('uitreeindex', 12)
  8120. .with('classname', 'TextView')
  8121. .with('resource-id', 'com.lge.email:id/drawer_child_name')
  8122. .with('text', 'Inbox')
  8123.  
  8124. $ruiObj.click
  8125.  
  8126. waitsecond(2)
  8127. end
  8128.  
  8129. tcase << TestAction.new(:clickXY_444_404_8) do
  8130. click(444,404)
  8131.  
  8132. waitsecond(1)
  8133. end
  8134.  
  8135. tcase << TestAction.new(:Button_Btnatntbottomdelete_2) do
  8136. $ruiObj = RUIObject.new.with('objectid', -2098725759).with('selfid', 480632483).with('textdescid', 1124287286).with('uniqueparentid', 0)
  8137. .with('uitreeindex', 19)
  8138. .with('classname', 'Button')
  8139. .with('resource-id', 'com.lge.email:id/btnAtntBottomDelete')
  8140. .with('text', 'DELETE')
  8141.  
  8142. $ruiObj.click
  8143.  
  8144. waitsecond(2)
  8145. end
  8146.  
  8147. tcase << TestAction.new(:Button_Button1_4) do
  8148. $ruiObj = RUIObject.new.with('objectid', 892548796).with('selfid', 982364851).with('textdescid', 658117233).with('uniqueparentid', 0)
  8149. .with('uitreeindex', 3)
  8150. .with('classname', 'Button')
  8151. .with('resource-id', 'android:id/button1')
  8152. .with('text', 'DELETE')
  8153.  
  8154. $ruiObj.click
  8155.  
  8156. waitsecond(2)
  8157. end
  8158.  
  8159. tcase << TestAction.new(:scriptAction_8_1_1) do
  8160. $myTestResult = checkLastExistResult
  8161.  
  8162. if $myTestResult == false
  8163. $myFailReason = "Email not opened"
  8164. end
  8165. logStopTest("Email_05_01_03_03")
  8166. end
  8167.  
  8168. tcase << TestAction.new(:pressBack_1) do
  8169. pressBack
  8170. end
  8171.  
  8172. tcase << TestAction.new(:pressBack_2) do
  8173. pressBack
  8174. end
  8175.  
  8176. tcase.run(loopTime)
  8177.  
  8178. end
  8179.  
  8180. def self.StoreFrontDownload_05_01_05_01(loopTime)
  8181.  
  8182. tcase = TestCase.new("StoreFrontDownload_05_01_05_01")
  8183.  
  8184. tcase << TestAction.new(:scriptAction_1) do
  8185. logStartTest("05_01_05_01_StoreFrontDownload")
  8186. end
  8187.  
  8188. tcase << TestAction.new(:gotoApp_2) do
  8189. gotoApp('Play Store')
  8190.  
  8191. waitsecond(1)
  8192. end
  8193.  
  8194. tcase << TestAction.new(:ImageView_SearchBoxIdleText_5) do
  8195. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
  8196. .with('uitreeindex', 32)
  8197. .with('classname', 'ImageView')
  8198. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  8199. .with('content-desc', 'Search')
  8200.  
  8201. $ruiObj.click
  8202.  
  8203. waitsecond(1)
  8204. end
  8205.  
  8206. tcase << TestAction.new(:EditText_SearchBoxTextInput_6) do
  8207. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
  8208. .with('uitreeindex', 32)
  8209. .with('classname', 'EditText')
  8210. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  8211.  
  8212. $ruiObj.inputtext('ColorNote')
  8213.  
  8214. waitsecond(2)
  8215. end
  8216.  
  8217. tcase << TestAction.new(:pressEnter_2) do
  8218. pressEnter
  8219.  
  8220. waitsecond(2)
  8221. end
  8222.  
  8223. tcase << TestAction.new(:TextView_LiTitle_2) do
  8224. $ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', -1969590474).with('textdescid', 83190698).with('uniqueparentid', 0)
  8225. .with('uitreeindex', 5)
  8226. .with('classname', 'TextView')
  8227. .with('resource-id', 'com.android.vending:id/li_title')
  8228. .with('content-desc', 'App: ColorNote Notepad Notes')
  8229. .with('text', 'ColorNote Notepad Notes')
  8230.  
  8231. $ruiObj.click
  8232.  
  8233. waitsecond(2)
  8234. end
  8235.  
  8236. tcase << TestAction.new(:Button_UninstallButton_15_pressed) do
  8237. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  8238. .with('uitreeindex', 7)
  8239. .with('classname', 'Button')
  8240. .with('resource-id', 'com.android.vending:id/uninstall_button')
  8241. .with('text', 'UNINSTALL')
  8242.  
  8243. $ruiObj.click
  8244.  
  8245. waitsecond(1)
  8246. end
  8247.  
  8248. tcase << TestAction.new(:Button_Button1_16_pressed_OK) do
  8249. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', 0)
  8250. .with('uitreeindex', 2)
  8251. .with('classname', 'Button')
  8252. .with('resource-id', 'android:id/button1')
  8253. .with('text', 'OK')
  8254.  
  8255. $ruiObj.click
  8256.  
  8257. waitsecond(8)
  8258. end
  8259.  
  8260. tcase << TestAction.new(:Button_BuyButton_18_Install) do
  8261. $ruiObj = RUIObject.new.with('objectid', 1237348910).with('selfid', -652886121).with('textdescid', 538738615).with('uniqueparentid', 0)
  8262. .with('uitreeindex', 7)
  8263. .with('classname', 'Button')
  8264. .with('resource-id', 'com.android.vending:id/buy_button')
  8265. .with('text', 'INSTALL')
  8266.  
  8267. $ruiObj.isExist
  8268.  
  8269. waitsecond(1)
  8270. end
  8271.  
  8272. tcase << TestAction.new(:Button_BuyButton_2) do
  8273. $ruiObj = RUIObject.new.with('objectid', -329901969).with('selfid', -652886121).with('textdescid', 992432790).with('uniqueparentid', 0)
  8274. .with('uitreeindex', 7)
  8275. .with('classname', 'Button')
  8276. .with('resource-id', 'com.android.vending:id/buy_button')
  8277. .with('text', 'INSTALL')
  8278.  
  8279. $ruiObj.click
  8280.  
  8281. waitsecond(1)
  8282. end
  8283.  
  8284. tcase << TestAction.new(:Button_PositiveButton_4) do
  8285. $ruiObj = RUIObject.new.with('objectid', 1281581194).with('selfid', -1901489946).with('textdescid', -1976674237).with('uniqueparentid', 0)
  8286. .with('uitreeindex', 2)
  8287. .with('classname', 'Button')
  8288. .with('resource-id', 'com.android.vending:id/positive_button')
  8289. .with('text', 'CONTINUE')
  8290.  
  8291. $ruiObj.click
  8292.  
  8293. waitsecond(8)
  8294. end
  8295.  
  8296. tcase << TestAction.new(:scriptAction_CheckPass) do
  8297. $myTestResult = checkLastExistResult
  8298.  
  8299. if $myTestResult == false
  8300. $myFailReason == "Install Failed"
  8301. end
  8302. logStopTest("05_01_05_07_StoreFrontDownload")
  8303. end
  8304.  
  8305. tcase << TestAction.new(:pressBack_16) do
  8306. pressBack
  8307. end
  8308.  
  8309. tcase << TestAction.new(:pressBack_17) do
  8310. pressBack
  8311. end
  8312.  
  8313. tcase << TestAction.new(:pressHome_19) do
  8314. pressHome
  8315. end
  8316.  
  8317. tcase.run(loopTime)
  8318.  
  8319. end
  8320.  
  8321. def self.StoreFrontDownload_05_01_05_03(loopTime)
  8322.  
  8323. tcase = TestCase.new("StoreFrontDownload_05_01_05_03")
  8324.  
  8325. tcase << TestAction.new(:scriptAction_1) do
  8326. logStartTest("05_01_05_03_StoreFrontDownload")
  8327. end
  8328.  
  8329. tcase << TestAction.new(:gotoApp_2) do
  8330. gotoApp('Play Store')
  8331.  
  8332. waitsecond(2)
  8333. end
  8334.  
  8335. tcase << TestAction.new(:ImageView_SearchBoxIdleText_5) do
  8336. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
  8337. .with('uitreeindex', 32)
  8338. .with('classname', 'ImageView')
  8339. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  8340. .with('content-desc', 'Search')
  8341.  
  8342. $ruiObj.click
  8343.  
  8344. waitsecond(1)
  8345. end
  8346.  
  8347. tcase << TestAction.new(:EditText_SearchBoxTextInput_6) do
  8348. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
  8349. .with('uitreeindex', 32)
  8350. .with('classname', 'EditText')
  8351. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  8352.  
  8353. $ruiObj.inputtext('ColorNote')
  8354.  
  8355. waitsecond(1)
  8356. end
  8357.  
  8358. tcase << TestAction.new(:pressEnter_2) do
  8359. pressEnter
  8360.  
  8361. waitsecond(4)
  8362. end
  8363.  
  8364. tcase << TestAction.new(:TextView_LiTitle_2) do
  8365. $ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', -1969590474).with('textdescid', 83190698).with('uniqueparentid', 0)
  8366. .with('uitreeindex', 1)
  8367. .with('classname', 'TextView')
  8368. .with('resource-id', 'com.android.vending:id/li_title')
  8369. .with('content-desc', 'App: ColorNote Notepad Notes')
  8370. .with('text', 'ColorNote Notepad Notes')
  8371.  
  8372. $ruiObj.click
  8373.  
  8374. waitsecond(2)
  8375. end
  8376.  
  8377. tcase << TestAction.new(:Button_UninstallButton_UnInstall_exist) do
  8378. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  8379. .with('uitreeindex', 7)
  8380. .with('classname', 'Button')
  8381. .with('resource-id', 'com.android.vending:id/uninstall_button')
  8382. .with('text', 'UNINSTALL')
  8383.  
  8384. $ruiObj.isExist
  8385. ifFailJumpTo(:Button_BuyButton_1)
  8386.  
  8387. waitsecond(1)
  8388. end
  8389.  
  8390. tcase << TestAction.new(:Button_UninstallButton_UninstallCK_1) do
  8391. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  8392. .with('uitreeindex', 7)
  8393. .with('classname', 'Button')
  8394. .with('resource-id', 'com.android.vending:id/uninstall_button')
  8395. .with('text', 'UNINSTALL')
  8396.  
  8397. $ruiObj.click
  8398.  
  8399. waitsecond(1)
  8400. end
  8401.  
  8402. tcase << TestAction.new(:Button_Button1_Clk_OK) do
  8403. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', 0)
  8404. .with('uitreeindex', 2)
  8405. .with('classname', 'Button')
  8406. .with('resource-id', 'android:id/button1')
  8407. .with('text', 'OK')
  8408.  
  8409. $ruiObj.click
  8410.  
  8411. waitsecond(8)
  8412. end
  8413.  
  8414. tcase << TestAction.new(:Button_BuyButton_1) do
  8415. $ruiObj = RUIObject.new.with('objectid', 1237348910).with('selfid', -652886121).with('textdescid', 538738615).with('uniqueparentid', 0)
  8416. .with('uitreeindex', 7)
  8417. .with('classname', 'Button')
  8418. .with('resource-id', 'com.android.vending:id/buy_button')
  8419. .with('text', 'INSTALL')
  8420.  
  8421. $ruiObj.click
  8422.  
  8423. waitsecond(2)
  8424. end
  8425.  
  8426. tcase << TestAction.new(:Button_PositiveButton_4) do
  8427. $ruiObj = RUIObject.new.with('objectid', 1281581194).with('selfid', -1901489946).with('textdescid', -1976674237).with('uniqueparentid', 0)
  8428. .with('uitreeindex', 2)
  8429. .with('classname', 'Button')
  8430. .with('resource-id', 'com.android.vending:id/positive_button')
  8431. .with('text', 'CONTINUE')
  8432.  
  8433. $ruiObj.click
  8434.  
  8435. waitsecond(2)
  8436. end
  8437.  
  8438. tcase << TestAction.new(:wait1second_6) do
  8439. waitsecond(1)
  8440. end
  8441.  
  8442. tcase << TestAction.new(:Button_UninstallButton_4) do
  8443. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  8444. .with('uitreeindex', 7)
  8445. .with('classname', 'Button')
  8446. .with('resource-id', 'com.android.vending:id/uninstall_button')
  8447. .with('text', 'UNINSTALL')
  8448.  
  8449. $ruiObj.isExist
  8450.  
  8451. waitsecond(1)
  8452. end
  8453.  
  8454. tcase << TestAction.new(:scriptAction_CheckPass) do
  8455. $myTestResult = checkLastExistResult
  8456.  
  8457. if $myTestResult == false
  8458. $myFailReason == "Install Failed"
  8459. end
  8460. logStopTest("05_01_05_02_StoreFrontDownload")
  8461. end
  8462.  
  8463. tcase << TestAction.new(:pressBack_16) do
  8464. pressBack
  8465. end
  8466.  
  8467. tcase << TestAction.new(:pressBack_17) do
  8468. pressBack
  8469. end
  8470.  
  8471. tcase << TestAction.new(:pressHome_19) do
  8472. pressHome
  8473. end
  8474.  
  8475. tcase.run(loopTime)
  8476.  
  8477. end
  8478.  
  8479. def self.StoreFrontDownload_05_01_05_04(loopTime)
  8480.  
  8481. tcase = TestCase.new("StoreFrontDownload_05_01_05_04")
  8482.  
  8483. tcase << TestAction.new(:scriptAction_1) do
  8484. logStartTest("05_01_05_04_StoreFrontDownload")
  8485. end
  8486.  
  8487. tcase << TestAction.new(:gotoApp_2) do
  8488. gotoApp('Play Store')
  8489.  
  8490. waitsecond(1)
  8491. end
  8492.  
  8493. tcase << TestAction.new(:ImageView_SearchBoxIdleText_5) do
  8494. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
  8495. .with('uitreeindex', 32)
  8496. .with('classname', 'ImageView')
  8497. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  8498. .with('content-desc', 'Search')
  8499.  
  8500. $ruiObj.click
  8501.  
  8502. waitsecond(1)
  8503. end
  8504.  
  8505. tcase << TestAction.new(:EditText_SearchBoxTextInput_6) do
  8506. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
  8507. .with('uitreeindex', 32)
  8508. .with('classname', 'EditText')
  8509. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  8510.  
  8511. $ruiObj.inputtext('ColorNote')
  8512.  
  8513. waitsecond(1)
  8514. end
  8515.  
  8516. tcase << TestAction.new(:TextView_SuggestText_7_Click_ColorNote) do
  8517. $ruiObj = RUIObject.new.with('objectid', 193809363).with('selfid', 208620854).with('textdescid', 1052874934).with('uniqueparentid', 0)
  8518. .with('uitreeindex', 36)
  8519. .with('classname', 'TextView')
  8520. .with('resource-id', 'com.android.vending:id/suggest_text')
  8521. .with('text', 'ColorNote Notepad Notes')
  8522.  
  8523. $ruiObj.click
  8524.  
  8525. waitsecond(1)
  8526. end
  8527.  
  8528. tcase << TestAction.new(:TextView_LiTitle_2) do
  8529. $ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', -1969590474).with('textdescid', 83190698).with('uniqueparentid', 0)
  8530. .with('uitreeindex', 5)
  8531. .with('classname', 'TextView')
  8532. .with('resource-id', 'com.android.vending:id/li_title')
  8533. .with('content-desc', 'App: ColorNote Notepad Notes')
  8534. .with('text', 'ColorNote Notepad Notes')
  8535.  
  8536. $ruiObj.click
  8537.  
  8538. waitsecond(1)
  8539. end
  8540.  
  8541. tcase << TestAction.new(:Button_UninstallButton_15_pressed) do
  8542. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  8543. .with('uitreeindex', 7)
  8544. .with('classname', 'Button')
  8545. .with('resource-id', 'com.android.vending:id/uninstall_button')
  8546. .with('text', 'UNINSTALL')
  8547.  
  8548. $ruiObj.click
  8549.  
  8550. waitsecond(1)
  8551. end
  8552.  
  8553. tcase << TestAction.new(:Button_Button1_16_pressed_OK) do
  8554. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', 0)
  8555. .with('uitreeindex', 2)
  8556. .with('classname', 'Button')
  8557. .with('resource-id', 'android:id/button1')
  8558. .with('text', 'OK')
  8559.  
  8560. $ruiObj.click
  8561.  
  8562. waitsecond(8)
  8563. end
  8564.  
  8565. tcase << TestAction.new(:Button_BuyButton_18_Install) do
  8566. $ruiObj = RUIObject.new.with('objectid', 1237348910).with('selfid', -652886121).with('textdescid', 538738615).with('uniqueparentid', 0)
  8567. .with('uitreeindex', 7)
  8568. .with('classname', 'Button')
  8569. .with('resource-id', 'com.android.vending:id/buy_button')
  8570. .with('text', 'INSTALL')
  8571.  
  8572. $ruiObj.isExist
  8573.  
  8574. waitsecond(1)
  8575. end
  8576.  
  8577. tcase << TestAction.new(:scriptAction_CheckPass) do
  8578. $myTestResult = checkLastExistResult
  8579.  
  8580. if $myTestResult == false
  8581. $myFailReason == "Install Failed"
  8582. end
  8583. logStopTest("05_01_05_07_StoreFrontDownload")
  8584. end
  8585.  
  8586. tcase << TestAction.new(:pressBack_16) do
  8587. pressBack
  8588. end
  8589.  
  8590. tcase << TestAction.new(:pressBack_17) do
  8591. pressBack
  8592. end
  8593.  
  8594. tcase << TestAction.new(:pressHome_19) do
  8595. pressHome
  8596. end
  8597.  
  8598. tcase.run(loopTime)
  8599.  
  8600. end
  8601.  
  8602. def self.StoreFrontDownload_05_01_05_08(loopTime)
  8603.  
  8604. tcase = TestCase.new("StoreFrontDownload_05_01_05_08")
  8605.  
  8606. tcase << TestAction.new(:scriptAction_1) do
  8607. logStartTest("05_01_05_02_StoreFrontDownload")
  8608. end
  8609.  
  8610. tcase << TestAction.new(:gotoApp_2) do
  8611. gotoApp('Play Store')
  8612.  
  8613. waitsecond(2)
  8614. end
  8615.  
  8616. tcase << TestAction.new(:ImageView_SearchBoxIdleText_5) do
  8617. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
  8618. .with('uitreeindex', 32)
  8619. .with('classname', 'ImageView')
  8620. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  8621. .with('content-desc', 'Search')
  8622.  
  8623. $ruiObj.click
  8624.  
  8625. waitsecond(1)
  8626. end
  8627.  
  8628. tcase << TestAction.new(:EditText_SearchBoxTextInput_6) do
  8629. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
  8630. .with('uitreeindex', 32)
  8631. .with('classname', 'EditText')
  8632. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  8633.  
  8634. $ruiObj.inputtext('ColorNote')
  8635.  
  8636. waitsecond(1)
  8637. end
  8638.  
  8639. tcase << TestAction.new(:pressEnter_2) do
  8640. pressEnter
  8641.  
  8642. waitsecond(4)
  8643. end
  8644.  
  8645. tcase << TestAction.new(:TextView_LiTitle_2) do
  8646. $ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', -1969590474).with('textdescid', 83190698).with('uniqueparentid', 0)
  8647. .with('uitreeindex', 1)
  8648. .with('classname', 'TextView')
  8649. .with('resource-id', 'com.android.vending:id/li_title')
  8650. .with('content-desc', 'App: ColorNote Notepad Notes')
  8651. .with('text', 'ColorNote Notepad Notes')
  8652.  
  8653. $ruiObj.click
  8654.  
  8655. waitsecond(2)
  8656. end
  8657.  
  8658. tcase << TestAction.new(:Button_UninstallButton_UnInstall_exist) do
  8659. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  8660. .with('uitreeindex', 7)
  8661. .with('classname', 'Button')
  8662. .with('resource-id', 'com.android.vending:id/uninstall_button')
  8663. .with('text', 'UNINSTALL')
  8664.  
  8665. $ruiObj.isExist
  8666. ifFailJumpTo(:Button_BuyButton_1)
  8667.  
  8668. waitsecond(1)
  8669. end
  8670.  
  8671. tcase << TestAction.new(:Button_UninstallButton_UninstallCK_1) do
  8672. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  8673. .with('uitreeindex', 7)
  8674. .with('classname', 'Button')
  8675. .with('resource-id', 'com.android.vending:id/uninstall_button')
  8676. .with('text', 'UNINSTALL')
  8677.  
  8678. $ruiObj.click
  8679.  
  8680. waitsecond(1)
  8681. end
  8682.  
  8683. tcase << TestAction.new(:Button_Button1_Clk_OK) do
  8684. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', 0)
  8685. .with('uitreeindex', 2)
  8686. .with('classname', 'Button')
  8687. .with('resource-id', 'android:id/button1')
  8688. .with('text', 'OK')
  8689.  
  8690. $ruiObj.click
  8691.  
  8692. waitsecond(4)
  8693. end
  8694.  
  8695. tcase << TestAction.new(:Button_BuyButton_1) do
  8696. $ruiObj = RUIObject.new.with('objectid', 1237348910).with('selfid', -652886121).with('textdescid', 538738615).with('uniqueparentid', 0)
  8697. .with('uitreeindex', 7)
  8698. .with('classname', 'Button')
  8699. .with('resource-id', 'com.android.vending:id/buy_button')
  8700. .with('text', 'INSTALL')
  8701.  
  8702. $ruiObj.click
  8703.  
  8704. waitsecond(2)
  8705. end
  8706.  
  8707. tcase << TestAction.new(:Button_PositiveButton_4) do
  8708. $ruiObj = RUIObject.new.with('objectid', 1281581194).with('selfid', -1901489946).with('textdescid', -1976674237).with('uniqueparentid', 0)
  8709. .with('uitreeindex', 2)
  8710. .with('classname', 'Button')
  8711. .with('resource-id', 'com.android.vending:id/positive_button')
  8712. .with('text', 'CONTINUE')
  8713.  
  8714. $ruiObj.click
  8715.  
  8716. waitsecond(2)
  8717. end
  8718.  
  8719. tcase << TestAction.new(:wait1second_6) do
  8720. waitsecond(1)
  8721. end
  8722.  
  8723. tcase << TestAction.new(:Button_UninstallButton_4) do
  8724. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  8725. .with('uitreeindex', 7)
  8726. .with('classname', 'Button')
  8727. .with('resource-id', 'com.android.vending:id/uninstall_button')
  8728. .with('text', 'UNINSTALL')
  8729.  
  8730. $ruiObj.isExist
  8731.  
  8732. waitsecond(1)
  8733. end
  8734.  
  8735. tcase << TestAction.new(:Button_UninstallButton_2) do
  8736. $ruiObj = RUIObject.new.with('objectid', 82686867).with('selfid', -895718918).with('textdescid', 1814403659).with('uniqueparentid', 0)
  8737. .with('uitreeindex', 7)
  8738. .with('classname', 'Button')
  8739. .with('resource-id', 'com.android.vending:id/uninstall_button')
  8740. .with('text', 'UNINSTALL')
  8741.  
  8742. $ruiObj.click
  8743.  
  8744. waitsecond(2)
  8745. end
  8746.  
  8747. tcase << TestAction.new(:Button_Button1_4) do
  8748. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', 0)
  8749. .with('uitreeindex', 2)
  8750. .with('classname', 'Button')
  8751. .with('resource-id', 'android:id/button1')
  8752. .with('text', 'OK')
  8753.  
  8754. $ruiObj.click
  8755.  
  8756. waitsecond(2)
  8757. end
  8758.  
  8759. tcase << TestAction.new(:scriptAction_CheckPass) do
  8760. $myTestResult = checkLastExistResult
  8761.  
  8762. if $myTestResult == false
  8763. $myFailReason == "Install Failed"
  8764. end
  8765. logStopTest("05_01_05_02_StoreFrontDownload")
  8766. end
  8767.  
  8768. tcase << TestAction.new(:pressBack_16) do
  8769. pressBack
  8770. end
  8771.  
  8772. tcase << TestAction.new(:pressBack_17) do
  8773. pressBack
  8774. end
  8775.  
  8776. tcase << TestAction.new(:pressHome_19) do
  8777. pressHome
  8778. end
  8779.  
  8780. tcase.run(loopTime)
  8781.  
  8782. end
  8783.  
  8784. def self.MultiTasking_05_01_08_01(loopTime)
  8785.  
  8786. tcase = TestCase.new("MultiTasking_05_01_08_01")
  8787.  
  8788. tcase << TestAction.new(:scriptAction_StartTest) do
  8789. logStartTest("05_01_08_01_MultiTasking")
  8790. end
  8791.  
  8792. tcase << TestAction.new(:TextView_Phone_2) do
  8793. $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
  8794. .with('uitreeindex', 20)
  8795. .with('classname', 'TextView')
  8796. .with('content-desc', 'Phone')
  8797. .with('text', 'Phone')
  8798.  
  8799. $ruiObj.click
  8800.  
  8801. waitsecond(1)
  8802. end
  8803.  
  8804. tcase << TestAction.new(:TextView_Tabtext_21) do
  8805. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 566119687).with('textdescid', 1861262411).with('uniqueparentid', 0)
  8806. .with('uitreeindex', 2)
  8807. .with('classname', 'TextView')
  8808. .with('resource-id', 'com.android.contacts:id/tabText')
  8809. .with('text', 'Dial')
  8810.  
  8811. $ruiObj.click
  8812.  
  8813. waitsecond(1)
  8814. end
  8815.  
  8816. tcase << TestAction.new(:EditText_Digits_4) do
  8817. $ruiObj = RUIObject.new.with('objectid', 477485968).with('selfid', -1326421482).with('textdescid', 1917163152).with('uniqueparentid', 0)
  8818. .with('uitreeindex', 7)
  8819. .with('classname', 'EditText')
  8820. .with('resource-id', 'com.android.contacts:id/digits')
  8821.  
  8822. $ruiObj.inputtext('18003310500')
  8823.  
  8824. waitsecond(2)
  8825. end
  8826.  
  8827. tcase << TestAction.new(:pressBack_8) do
  8828. pressBack
  8829.  
  8830. waitsecond(2)
  8831. end
  8832.  
  8833. tcase << TestAction.new(:ImageButton_Btnlogscall_10) do
  8834. $ruiObj = RUIObject.new.with('objectid', -1934426254).with('selfid', -2053967649).with('textdescid', -911487124).with('uniqueparentid', 0)
  8835. .with('uitreeindex', 35)
  8836. .with('classname', 'ImageButton')
  8837. .with('resource-id', 'com.android.contacts:id/btnLogsCall')
  8838. .with('content-desc', 'Call')
  8839.  
  8840. $ruiObj.click
  8841.  
  8842. waitsecond(2)
  8843. end
  8844.  
  8845. tcase << TestAction.new(:Button_Endbutton_2) do
  8846. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  8847. .with('uitreeindex', 10)
  8848. .with('classname', 'Button')
  8849. .with('resource-id', 'com.android.incallui:id/endButton')
  8850. .with('text', 'End')
  8851.  
  8852. $ruiObj.isExist
  8853. end
  8854.  
  8855. tcase << TestAction.new(:scriptAction_4) do
  8856. $myTestResult = checkLastExistResult
  8857.  
  8858. if $myTestResult == false
  8859. $myFailReason = "End button not found"
  8860. end
  8861. logStopTest("05_01_08_01_MultiTasking")
  8862.  
  8863. end
  8864.  
  8865. tcase << TestAction.new(:pressHome_2) do
  8866. pressHome
  8867. end
  8868.  
  8869. tcase.run(loopTime)
  8870.  
  8871. end
  8872.  
  8873. def self.MultiTasking_05_01_08_02(loopTime)
  8874.  
  8875. tcase = TestCase.new("MultiTasking_05_01_08_02")
  8876.  
  8877. tcase << TestAction.new(:scriptAction_StartTestLog) do
  8878. logStartTest("05_01_08_02_MultiTasking")
  8879. end
  8880.  
  8881. tcase << TestAction.new(:pressHome_13) do
  8882. pressHome
  8883.  
  8884. waitsecond(2)
  8885. end
  8886.  
  8887. tcase << TestAction.new(:TextView_Contacts_2) do
  8888. $ruiObj = RUIObject.new.with('objectid', -477238524).with('selfid', 1993945070).with('textdescid', 1542309180).with('uniqueparentid', 0)
  8889. .with('uitreeindex', 12)
  8890. .with('classname', 'TextView')
  8891. .with('content-desc', 'Contacts')
  8892. .with('text', 'Contacts')
  8893.  
  8894. $ruiObj.click
  8895.  
  8896. waitsecond(2)
  8897. end
  8898.  
  8899. tcase << TestAction.new(:pressHome_18) do
  8900. pressHome
  8901.  
  8902. waitsecond(2)
  8903. end
  8904.  
  8905. tcase << TestAction.new(:TextView_Messaging_4) do
  8906. $ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 3320718).with('textdescid', -234290576).with('uniqueparentid', 0)
  8907. .with('uitreeindex', 19)
  8908. .with('classname', 'TextView')
  8909. .with('content-desc', 'Messaging')
  8910.  
  8911. $ruiObj.click
  8912.  
  8913. waitsecond(2)
  8914. end
  8915.  
  8916. tcase << TestAction.new(:pressHome_20) do
  8917. pressHome
  8918.  
  8919. waitsecond(2)
  8920. end
  8921.  
  8922. tcase << TestAction.new(:TextView_Phone_6) do
  8923. $ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 1923496804).with('textdescid', -1252643750).with('uniqueparentid', 0)
  8924. .with('uitreeindex', 18)
  8925. .with('classname', 'TextView')
  8926. .with('content-desc', 'Phone')
  8927.  
  8928. $ruiObj.click
  8929.  
  8930. waitsecond(2)
  8931. end
  8932.  
  8933. tcase << TestAction.new(:pressHome_22) do
  8934. pressHome
  8935.  
  8936. waitsecond(2)
  8937. end
  8938.  
  8939. tcase << TestAction.new(:TextView_Play_8) do
  8940. $ruiObj = RUIObject.new.with('objectid', -477238524).with('selfid', 809278702).with('textdescid', -10183748).with('uniqueparentid', 0)
  8941. .with('uitreeindex', 15)
  8942. .with('classname', 'TextView')
  8943. .with('content-desc', 'Play Store')
  8944. .with('text', 'Play Store')
  8945.  
  8946. $ruiObj.click
  8947.  
  8948. waitsecond(2)
  8949. end
  8950.  
  8951. tcase << TestAction.new(:pressHome_24) do
  8952. pressHome
  8953.  
  8954. waitsecond(2)
  8955. end
  8956.  
  8957. tcase << TestAction.new(:TextView_Camera_10) do
  8958. $ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 643708137).with('textdescid', 953340153).with('uniqueparentid', 0)
  8959. .with('uitreeindex', 22)
  8960. .with('classname', 'TextView')
  8961. .with('content-desc', 'Camera')
  8962.  
  8963. $ruiObj.click
  8964.  
  8965. waitsecond(2)
  8966. end
  8967.  
  8968. tcase << TestAction.new(:pressHome_26) do
  8969. pressHome
  8970.  
  8971. waitsecond(2)
  8972. end
  8973.  
  8974. tcase << TestAction.new(:TextView_Chrome_12) do
  8975. $ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 849023028).with('textdescid', -1271832818).with('uniqueparentid', 0)
  8976. .with('uitreeindex', 21)
  8977. .with('classname', 'TextView')
  8978. .with('content-desc', 'Chrome')
  8979.  
  8980. $ruiObj.click
  8981.  
  8982. waitsecond(2)
  8983. end
  8984.  
  8985. tcase << TestAction.new(:ImageButton_MenuButton_2) do
  8986. $ruiObj = RUIObject.new.with('objectid', 554731264).with('selfid', -17041368).with('textdescid', 1097269587).with('uniqueparentid', 0)
  8987. .with('uitreeindex', 19)
  8988. .with('classname', 'ImageButton')
  8989. .with('resource-id', 'com.android.chrome:id/menu_button')
  8990. .with('content-desc', 'More options')
  8991.  
  8992. $ruiObj.isExist
  8993. end
  8994.  
  8995. tcase << TestAction.new(:pressHome_15) do
  8996. pressHome
  8997.  
  8998. waitsecond(2)
  8999. end
  9000.  
  9001. tcase << TestAction.new(:TextView_Phone_14) do
  9002. $ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 1923496804).with('textdescid', -1252643750).with('uniqueparentid', 0)
  9003. .with('uitreeindex', 18)
  9004. .with('classname', 'TextView')
  9005. .with('content-desc', 'Phone')
  9006.  
  9007. $ruiObj.click
  9008.  
  9009. waitsecond(2)
  9010. end
  9011.  
  9012. tcase << TestAction.new(:Button_Endbutton_4) do
  9013. $ruiObj = RUIObject.new.with('objectid', -2133227471).with('selfid', 1277076029).with('textdescid', -2023955116).with('uniqueparentid', 0)
  9014. .with('uitreeindex', 7)
  9015. .with('classname', 'Button')
  9016. .with('resource-id', 'com.android.incallui:id/endButton')
  9017. .with('text', 'End')
  9018.  
  9019. $ruiObj.click
  9020.  
  9021. waitsecond(2)
  9022. end
  9023.  
  9024. tcase << TestAction.new(:TextView_Phone_16) do
  9025. $ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 1923496804).with('textdescid', -1252643750).with('uniqueparentid', 0)
  9026. .with('uitreeindex', 18)
  9027. .with('classname', 'TextView')
  9028. .with('content-desc', 'Phone')
  9029.  
  9030. $ruiObj.click
  9031.  
  9032. waitsecond(2)
  9033. end
  9034.  
  9035. tcase << TestAction.new(:EditText_Digits_20) do
  9036. $ruiObj = RUIObject.new.with('objectid', 477485968).with('selfid', -1326421482).with('textdescid', 1917163152).with('uniqueparentid', 0)
  9037. .with('uitreeindex', 6)
  9038. .with('classname', 'EditText')
  9039. .with('resource-id', 'com.android.contacts:id/digits')
  9040.  
  9041. $ruiObj.inputtext('18003310500')
  9042.  
  9043. waitsecond(2)
  9044. end
  9045.  
  9046. tcase << TestAction.new(:ImageButton_Btnlogscall_22) do
  9047. $ruiObj = RUIObject.new.with('objectid', -1934426254).with('selfid', -2053967649).with('textdescid', -911487124).with('uniqueparentid', 0)
  9048. .with('uitreeindex', 35)
  9049. .with('classname', 'ImageButton')
  9050. .with('resource-id', 'com.android.contacts:id/btnLogsCall')
  9051. .with('content-desc', 'Call')
  9052.  
  9053. $ruiObj.click
  9054.  
  9055. waitsecond(2)
  9056. end
  9057.  
  9058. tcase << TestAction.new(:scriptAction_LogStopTest) do
  9059. $myTestResult = checkLastExistResult
  9060. if $myTestResult == false
  9061. $myFailReason = "Apps not loaded"
  9062. end
  9063. logStopTest("05_01_08_02_MultiTasking")
  9064. end
  9065.  
  9066. tcase << TestAction.new(:pressBack_6) do
  9067. pressBack
  9068. end
  9069.  
  9070. tcase << TestAction.new(:pressBack_7) do
  9071. pressBack
  9072. end
  9073.  
  9074. tcase.run(loopTime)
  9075.  
  9076. end
  9077.  
  9078. def self.MultiTasking_05_01_08_03(loopTime)
  9079.  
  9080. tcase = TestCase.new("MultiTasking_05_01_08_03")
  9081.  
  9082. tcase << TestAction.new(:scriptAction_3) do
  9083. wakeUp()
  9084.  
  9085. waitsecond(1)
  9086. end
  9087.  
  9088. tcase << TestAction.new(:scriptAction_StartTestLog_1) do
  9089. logStartTest("05_01_08_03_MultiTasking")
  9090. end
  9091.  
  9092. tcase << TestAction.new(:TextView_Phone_2) do
  9093. $ruiObj = RUIObject.new.with('objectid', 513918636).with('selfid', 1923496804).with('textdescid', -1252643750).with('uniqueparentid', 0)
  9094. .with('uitreeindex', 20)
  9095. .with('classname', 'TextView')
  9096. .with('content-desc', 'Phone')
  9097.  
  9098. $ruiObj.click
  9099.  
  9100. waitsecond(2)
  9101. end
  9102.  
  9103. tcase << TestAction.new(:Button_Endbutton_2_1_1) do
  9104. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  9105. .with('uitreeindex', 8)
  9106. .with('classname', 'Button')
  9107. .with('resource-id', 'com.android.incallui:id/endButton')
  9108. .with('text', 'End')
  9109.  
  9110. $ruiObj.isExist
  9111.  
  9112. waitsecond(1)
  9113. end
  9114.  
  9115. tcase << TestAction.new(:scriptAction_4_1) do
  9116. $UIDev.swipe(200,
  9117. $UIDev.getDisplayHeight-300,
  9118. $UIDev.getDisplayWidth-50,
  9119. $UIDev.getDisplayHeight-300,
  9120. 10)
  9121. end
  9122.  
  9123. tcase << TestAction.new(:Button_Endbutton_6_1) do
  9124. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  9125. .with('uitreeindex', 12)
  9126. .with('classname', 'Button')
  9127. .with('resource-id', 'com.android.incallui:id/endButton')
  9128. .with('text', 'End')
  9129.  
  9130. $ruiObj.click
  9131.  
  9132. waitsecond(1)
  9133. end
  9134.  
  9135. tcase << TestAction.new(:scriptAction_LogStopTest) do
  9136. $myTestResult = checkLastExistResult
  9137.  
  9138. if $myTestResult == false
  9139. $myFailReason = "End button not found"
  9140. end
  9141. logStopTest("05_01_08_03_MultiTasking")
  9142. end
  9143.  
  9144. tcase << TestAction.new(:pressHome_20) do
  9145. pressHome
  9146. end
  9147.  
  9148. tcase.run(loopTime)
  9149.  
  9150. end
  9151.  
  9152. def self.MultiTasking_05_01_08_04(loopTime)
  9153.  
  9154. tcase = TestCase.new("MultiTasking_05_01_08_04")
  9155.  
  9156. tcase << TestAction.new(:scriptAction_StartTestLog) do
  9157. logStartTest("05_01_08_04_MultiTasking")
  9158. end
  9159.  
  9160. tcase << TestAction.new(:scriptAction_2) do
  9161. gotoAppByAppDrawer("Chrome")
  9162.  
  9163. waitsecond(2)
  9164. end
  9165.  
  9166. tcase << TestAction.new(:scriptAction_LogStopTest) do
  9167. $reload = RUIObject.new.with('objectid', -1485276626).with('selfid', 131798869).with('textdescid', -1148751605).with('uniqueparentid', -932380963)
  9168. .with('uitreeindex', 1)
  9169. .with('classname', 'Button')
  9170. .with('content-desc', 'RELOAD').exists?
  9171.  
  9172. $progressBar = RUIObject.new.with('objectid', 460148827).with('selfid', -703099949).with('textdescid', 1379711781).with('uniqueparentid', 0)
  9173. .with('uitreeindex', 4)
  9174. .with('pretext', 'Block')
  9175. .with('classname', 'ProgressBar')
  9176. .with('resource-id', 'com.android.chrome:id/progress').exists?
  9177.  
  9178. if ($progressBar or $reload) == true
  9179. $myTestResult = false
  9180. else
  9181. $myTestResult = true
  9182. end
  9183. if $myTestResult == false
  9184. $myFailReason = "Browser is not starting"
  9185. end
  9186. logStopTest("05_01_08_04_MultiTasking")
  9187. end
  9188.  
  9189. tcase << TestAction.new(:pressHome_1) do
  9190. pressHome
  9191. end
  9192.  
  9193. tcase.run(loopTime)
  9194.  
  9195. end
  9196.  
  9197. def self.MultiTasking_05_01_08_05(loopTime)
  9198.  
  9199. tcase = TestCase.new("MultiTasking_05_01_08_05")
  9200.  
  9201. tcase << TestAction.new(:scriptAction_StartTestLog) do
  9202. logStartTest("05_01_08_05_MultiTasking")
  9203. end
  9204.  
  9205. tcase << TestAction.new(:Contacts) do
  9206. gotoAppByAppDrawer("Contacts")
  9207.  
  9208. waitsecond(2)
  9209. end
  9210.  
  9211. tcase << TestAction.new(:Messaging) do
  9212. gotoAppByAppDrawer("Messaging")
  9213.  
  9214. waitsecond(2)
  9215. end
  9216.  
  9217. tcase << TestAction.new(:Phone) do
  9218. gotoAppByAppDrawer("Phone")
  9219.  
  9220. waitsecond(2)
  9221. end
  9222.  
  9223. tcase << TestAction.new(:Play_Store) do
  9224. gotoAppByAppDrawer("Play Store")
  9225.  
  9226. waitsecond(2)
  9227. end
  9228.  
  9229. tcase << TestAction.new(:Camera) do
  9230. gotoAppByAppDrawer("Camera")
  9231.  
  9232. waitsecond(2)
  9233. end
  9234.  
  9235. tcase << TestAction.new(:Chrome) do
  9236. gotoAppByAppDrawer("Chrome")
  9237.  
  9238. waitsecond(2)
  9239. end
  9240.  
  9241. tcase << TestAction.new(:ImageButton_DocumentMenuButton_2) do
  9242. $ruiObj = RUIObject.new.with('objectid', -1808270022).with('selfid', -336731118).with('textdescid', -1833889831).with('uniqueparentid', 0)
  9243. .with('uitreeindex', 4)
  9244. .with('classname', 'ImageButton')
  9245. .with('resource-id', 'com.android.chrome:id/document_menu_button')
  9246. .with('content-desc', 'More options')
  9247.  
  9248. $ruiObj.isExist
  9249.  
  9250. waitsecond(1)
  9251. end
  9252.  
  9253. tcase << TestAction.new(:scriptAction_LogStopTest) do
  9254. $myTestResult = checkLastExistResult
  9255. if $myTestResult == false
  9256. $myFailReason = "End button not found"
  9257. end
  9258. logStopTest("05_01_08_05_MultiTasking")
  9259. end
  9260.  
  9261. tcase << TestAction.new(:pressBack_3) do
  9262. pressBack
  9263. end
  9264.  
  9265. tcase << TestAction.new(:pressBack_4) do
  9266. pressBack
  9267. end
  9268.  
  9269. tcase.run(loopTime)
  9270.  
  9271. end
  9272.  
  9273. def self.exception_handler
  9274. puts "Module Exception Hanlder..."
  9275. if ($lastPackageName == "android")
  9276. android_ExpHandler(1)
  9277. end
  9278. end
  9279.  
  9280. def self.run(loop)
  9281. mainLoop loop
  9282. end
  9283.  
  9284. end
  9285.  
  9286. $exceptionPackageNameList = []
  9287. $exceptionPackageNameList_exclude = []
  9288. $exceptionPackageNameList << "android"
  9289.  
  9290. def exception_handler
  9291. DIVA_MTBF_ATT.exception_handler
  9292. end
  9293.  
  9294. $curProjectLogFile = $useLastLogFile
  9295.  
  9296. $curProjectLogFile = "DIVA_MTBF_ATT_#{getTimeStamp}.log" if $useLastLogFile.nil?
  9297.  
  9298. $useLastLogFile = nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement