Advertisement
Guest User

Untitled

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