Advertisement
Guest User

Untitled

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