Advertisement
Guest User

Untitled

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