Advertisement
Guest User

Untitled

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