Guest User

Untitled

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