Advertisement
Guest User

Untitled

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