Advertisement
Guest User

Untitled

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