Advertisement
Guest User

Untitled

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