Advertisement
Guest User

Untitled

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