Advertisement
Guest User

Untitled

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