Advertisement
Guest User

Untitled

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