Advertisement
Guest User

Untitled

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