Advertisement
Guest User

Untitled

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