Advertisement
Guest User

Untitled

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