Advertisement
Guest User

Untitled

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