Advertisement
Guest User

Untitled

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