Advertisement
Guest User

Untitled

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