Advertisement
Guest User

Untitled

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