Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 71.33 KB | None | 0 0
  1. loadTestDB
  2.  
  3. module JUDY_UIENGINE_CONCURRENCY
  4.  
  5. def self.Browser(loopTime)
  6.  
  7. tcase = TestCase.new("Browser")
  8.  
  9. tcase << TestAction.new(:pressHome_2) do
  10. pressHome
  11.  
  12. waitsecond(2)
  13. end
  14.  
  15. tcase << TestAction.new(:goto_Chrome_2) do
  16. $ruiObj = RUIObject.new
  17. .with('classname', 'TextView')
  18. .with('content-desc', 'Chrome')
  19. .with('text', 'Chrome')
  20.  
  21. $ruiObj.click
  22.  
  23. waitsecond(2)
  24. end
  25.  
  26. tcase << TestAction.new(:logstart) do
  27. logStartTest("Browser")
  28. end
  29.  
  30. tcase << TestAction.new(:click_url) do
  31. click(904.5,211.5)
  32.  
  33. waitsecond(2)
  34. end
  35.  
  36. tcase << TestAction.new(:EditText_UrlBar_2) do
  37. $ruiObj = RUIObject.new.with('objectid', 882195433).with('selfid', 613381324).with('textdescid', 1578254679).with('uniqueparentid', 0)
  38. .with('uitreeindex', 215)
  39. .with('classname', 'EditText')
  40. .with('resource-id', 'com.android.chrome:id/url_bar')
  41.  
  42. $ruiObj.inputtext('m.naver.com')
  43.  
  44. waitsecond(1)
  45. end
  46.  
  47. tcase << TestAction.new(:pressEnter_15) do
  48. pressEnter
  49.  
  50. waitsecond(4)
  51. end
  52.  
  53. tcase << TestAction.new(:click_url2) do
  54. click(904.5,211.5)
  55.  
  56. waitsecond(2)
  57. end
  58.  
  59. tcase << TestAction.new(:EditText_UrlBar_2_1) do
  60. $ruiObj = RUIObject.new.with('objectid', 882195433).with('selfid', 613381324).with('textdescid', 1578254679).with('uniqueparentid', 0)
  61. .with('uitreeindex', 215)
  62. .with('classname', 'EditText')
  63. .with('resource-id', 'com.android.chrome:id/url_bar')
  64.  
  65. $ruiObj.inputtext('www.google.com')
  66.  
  67. waitsecond(1)
  68. end
  69.  
  70. tcase << TestAction.new(:pressEnter_17) do
  71. pressEnter
  72.  
  73. waitsecond(4)
  74. end
  75.  
  76. tcase << TestAction.new(:checkforerror_stoplog) do
  77. $reload = RUIObject.new.with('objectid', -1298956826).with('selfid', 1403544531).with('textdescid', 1877548115).with('uniqueparentid', 0)
  78. .with('uitreeindex', 4)
  79. .with('classname', 'Button')
  80. .with('resource-id', 'reload-button')
  81. .with('content-desc', 'RELOAD').exists?
  82.  
  83. $progressBar = RUIObject.new.with('objectid', 1158061653).with('selfid', 1366906829).with('textdescid', 1540172907).with('uniqueparentid', 0)
  84. .with('uitreeindex', 18)
  85. .with('classname', 'ImageView')
  86. .with('resource-id', 'com.android.chrome:id/progress').exists?
  87.  
  88. if ($progressBar || $reload) == true
  89. $myTestResult = false
  90. else
  91. $myTestResult = true
  92. end
  93. if $myTestResult == false
  94. $myFailReason = "Page not loaded."
  95. end
  96. logStopTest("Browser")
  97. end
  98.  
  99. tcase << TestAction.new(:pressBack_11) do
  100. pressBack
  101. end
  102.  
  103. tcase << TestAction.new(:pressBack_12) do
  104. pressBack
  105. end
  106.  
  107. tcase << TestAction.new(:pressHome_13) do
  108. pressHome
  109. end
  110.  
  111. tcase.run(loopTime)
  112.  
  113. end
  114.  
  115. def self.Data(loopTime)
  116.  
  117. tcase = TestCase.new("Data")
  118.  
  119. tcase << TestAction.new(:scriptAction_2) do
  120.  
  121. end
  122.  
  123. tcase << TestAction.new(:gotoApp_2) do
  124. gotoApp('AndFTP')
  125.  
  126. waitsecond(2)
  127. end
  128.  
  129. tcase << TestAction.new(:Button_Button1_24) do
  130. $ruiObj = RUIObject.new.with('objectid', 415387334).with('selfid', -522226736).with('textdescid', -233514014).with('uniqueparentid', 0)
  131. .with('uitreeindex', 6)
  132. .with('classname', 'Button')
  133. .with('resource-id', 'android:id/button1')
  134. .with('text', 'Close')
  135.  
  136. $ruiObj.click
  137.  
  138. waitsecond(1)
  139. end
  140.  
  141. tcase << TestAction.new(:home_check) do
  142. $ruiObj = RUIObject.new.with('objectid', 1579875351).with('selfid', -1965414104).with('textdescid', 1731495657).with('uniqueparentid', 0)
  143. .with('uitreeindex', 7)
  144. .with('classname', 'ImageView')
  145. .with('resource-id', 'lysesoft.andftp:id/cell_icon_image')
  146.  
  147. $ruiObj.isNotExist
  148. ifFailJumpTo(:home_click)
  149.  
  150. waitsecond(4)
  151. end
  152.  
  153. tcase << TestAction.new(:ImageView_Home_9) do
  154. $ruiObj = RUIObject.new.with('objectid', -987150073).with('selfid', -1580646008).with('textdescid', -536881159).with('uniqueparentid', 0)
  155. .with('uitreeindex', 1)
  156. .with('classname', 'ImageView')
  157. .with('resource-id', 'android:id/home')
  158.  
  159. $ruiObj.click
  160.  
  161. waitsecond(2)
  162. end
  163.  
  164. tcase << TestAction.new(:home_check_again) do
  165. $ruiObj = RUIObject.new.with('objectid', 1579875351).with('selfid', -1965414104).with('textdescid', 1731495657).with('uniqueparentid', 0)
  166. .with('uitreeindex', 7)
  167. .with('classname', 'ImageView')
  168. .with('resource-id', 'lysesoft.andftp:id/cell_icon_image')
  169.  
  170. $ruiObj.isExist
  171. ifFailJumpTo(:gotoApp_2)
  172. end
  173.  
  174. tcase << TestAction.new(:home_click) do
  175. $ruiObj = RUIObject.new.with('objectid', 1579875351).with('selfid', -1965414104).with('textdescid', 1731495657).with('uniqueparentid', 0)
  176. .with('uitreeindex', 7)
  177. .with('classname', 'ImageView')
  178. .with('resource-id', 'lysesoft.andftp:id/cell_icon_image')
  179.  
  180. $ruiObj.click
  181.  
  182. waitsecond(8)
  183. end
  184.  
  185. tcase << TestAction.new(:TextView_Device_4) do
  186. $ruiObj = RUIObject.new.with('objectid', -1040420566).with('selfid', -1121792188).with('textdescid', 1884807160).with('uniqueparentid', 0)
  187. .with('uitreeindex', 2)
  188. .with('classname', 'TextView')
  189. .with('content-desc', 'Device file browser')
  190.  
  191. $ruiObj.click
  192.  
  193. waitsecond(2)
  194. end
  195.  
  196. tcase << TestAction.new(:pressRecentApps_3) do
  197. pressRecentApps
  198.  
  199. waitsecond(1)
  200. end
  201.  
  202. tcase << TestAction.new(:clickXY_693_14895_5) do
  203. click(693,1489.5)
  204.  
  205. waitsecond(1)
  206. end
  207.  
  208. tcase << TestAction.new(:TextView_BrowserItemName_13) do
  209. $ruiObj = RUIObject.new.with('objectid', 607501065).with('selfid', 459470620).with('textdescid', -839577675).with('uniqueparentid', 0).with('classresourceid', -324157026)
  210. .with('uitreeindex', 18)
  211. .with('classname', 'TextView')
  212. .with('resource-id', 'lysesoft.andftp:id/browser_item_name')
  213. .with('text', '01 Concurrency')
  214.  
  215. $ruiObj.click
  216.  
  217. waitsecond(2)
  218. end
  219.  
  220. tcase << TestAction.new(:pressRecentApps_7) do
  221. pressRecentApps
  222.  
  223. waitsecond(1)
  224. end
  225.  
  226. tcase << TestAction.new(:clickXY_7155_14985_9) do
  227. click(715.5,1498.5)
  228.  
  229. waitsecond(2)
  230. end
  231.  
  232. tcase << TestAction.new(:clickXY_388_616_10) do
  233. click(388,616)
  234.  
  235. waitsecond(2)
  236. end
  237.  
  238. tcase << TestAction.new(:TextView_Upload_2) do
  239. $ruiObj = RUIObject.new.with('objectid', -1040420566).with('selfid', -132299379).with('textdescid', 572528663).with('uniqueparentid', 0)
  240. .with('uitreeindex', 3)
  241. .with('classname', 'TextView')
  242. .with('content-desc', 'Upload')
  243.  
  244. $ruiObj.click
  245.  
  246. waitsecond(2)
  247. end
  248.  
  249. tcase << TestAction.new(:Button_Button1_8) do
  250. $ruiObj = RUIObject.new.with('objectid', 415387334).with('selfid', -1318451484).with('textdescid', 1038170474).with('uniqueparentid', 0)
  251. .with('uitreeindex', 5)
  252. .with('classname', 'Button')
  253. .with('resource-id', 'android:id/button1')
  254. .with('text', 'OK')
  255.  
  256. $ruiObj.click
  257.  
  258. waitsecond(4)
  259. end
  260.  
  261. tcase << TestAction.new(:Button_Button1_2) do
  262. $ruiObj = RUIObject.new.with('objectid', 415387334).with('selfid', -1318451484).with('textdescid', 1038170474).with('uniqueparentid', 0)
  263. .with('uitreeindex', 7)
  264. .with('classname', 'Button')
  265. .with('resource-id', 'android:id/button1')
  266. .with('text', 'OK')
  267.  
  268. $ruiObj.click
  269.  
  270. waitsecond(2)
  271. end
  272.  
  273. tcase << TestAction.new(:pressHome_9) do
  274. pressHome
  275. end
  276.  
  277. tcase << TestAction.new(:scriptAction_1) do
  278. logStopTest("Data")
  279. end
  280.  
  281. tcase.run(loopTime)
  282.  
  283. end
  284.  
  285. def self.DataEnd(loopTime)
  286.  
  287. tcase = TestCase.new("DataEnd")
  288.  
  289. tcase << TestAction.new(:gotoApp_2_1) do
  290. gotoApp('AndFTP')
  291. end
  292.  
  293. tcase << TestAction.new(:Button_ProgressCancel_2) do
  294. $ruiObj = RUIObject.new.with('objectid', -646559864).with('selfid', -1723240818).with('textdescid', 1120146478).with('uniqueparentid', 0)
  295. .with('uitreeindex', 5)
  296. .with('classname', 'Button')
  297. .with('resource-id', 'lysesoft.andftp:id/progress_cancel')
  298. .with('text', 'Cancel')
  299.  
  300. $ruiObj.click
  301.  
  302. waitsecond(2)
  303. end
  304.  
  305. tcase << TestAction.new(:Button_ProgressSelect_4) do
  306. $ruiObj = RUIObject.new.with('objectid', -184857078).with('selfid', 1303670098).with('textdescid', 1262548654).with('uniqueparentid', 0)
  307. .with('uitreeindex', 4)
  308. .with('classname', 'Button')
  309. .with('resource-id', 'lysesoft.andftp:id/progress_select')
  310. .with('text', 'OK')
  311.  
  312. $ruiObj.click
  313.  
  314. waitsecond(2)
  315. end
  316.  
  317. tcase << TestAction.new(:pressBack_3) do
  318. pressBack
  319. end
  320.  
  321. tcase << TestAction.new(:pressBack_5) do
  322. pressBack
  323. end
  324.  
  325. tcase << TestAction.new(:pressHome_9) do
  326. pressHome
  327. end
  328.  
  329. tcase << TestAction.new(:scriptAction_1_1) do
  330. logStopTest("DataEnd")
  331. end
  332.  
  333. tcase.run(loopTime)
  334.  
  335. end
  336.  
  337. def self.mainLoop(loopTime)
  338.  
  339. WebSocketXServer.setAutoUpdate(false)
  340.  
  341. index = $mainResumeMainLoop
  342. $mainResumeMainLoop = 0
  343.  
  344. writelog("mainLoop::#{index}::Resume") if index > 0
  345.  
  346. while index < loopTime
  347.  
  348. $curMainLoopNum = index
  349.  
  350. $actionParamInput = "none"
  351. startTest 1
  352.  
  353. $POWERLOG = true
  354.  
  355. $actionParamInput = "none"
  356. Voice 1
  357.  
  358. $actionParamInput = "none"
  359. Browser 1
  360.  
  361. $actionParamInput = "none"
  362. Youtube 1
  363.  
  364. $actionParamInput = "none"
  365. Voice 1
  366.  
  367. $actionParamInput = "none"
  368. Emails 1
  369.  
  370. $actionParamInput = "none"
  371. Voice 1
  372.  
  373. $actionParamInput = "none"
  374. SMS 1
  375.  
  376. $actionParamInput = "none"
  377. MMS 1
  378.  
  379. $actionParamInput = "none"
  380. Voice 1
  381.  
  382. $actionParamInput = "none"
  383. GPS 1
  384.  
  385. $actionParamInput = "none"
  386. Voice 1
  387.  
  388. $actionParamInput = "none"
  389. Camera 1
  390.  
  391. $actionParamInput = "none"
  392. Video 1
  393.  
  394. $actionParamInput = "none"
  395. wifi 1
  396.  
  397. $actionParamInput = "none"
  398. Data 0
  399.  
  400. $actionParamInput = "none"
  401. Browser 1
  402.  
  403. $actionParamInput = "none"
  404. Youtube 1
  405.  
  406. $actionParamInput = "none"
  407. Emails 1
  408.  
  409. $actionParamInput = "none"
  410. SMS 1
  411.  
  412. $actionParamInput = "none"
  413. MMS 1
  414.  
  415. $actionParamInput = "none"
  416. Camera 1
  417.  
  418. $actionParamInput = "none"
  419. Video 1
  420.  
  421. $actionParamInput = "none"
  422. Multimedia 1
  423.  
  424. $actionParamInput = "none"
  425. DataEnd 0
  426.  
  427. $actionParamInput = "none"
  428. Voice 1
  429.  
  430. $actionParamInput = "none"
  431. Data 0
  432.  
  433. $actionParamInput = "none"
  434. Camera 1
  435.  
  436. $actionParamInput = "none"
  437. Video 1
  438.  
  439. $actionParamInput = "none"
  440. Multimedia 1
  441.  
  442. $actionParamInput = "none"
  443. DataEnd 0
  444.  
  445. $actionParamInput = "none"
  446. wifiOff 1
  447.  
  448. $actionParamInput = "none"
  449. VoiceRecord 5
  450.  
  451. $actionParamInput = "none"
  452. idle_wait 1
  453.  
  454.  
  455. sendStatus("Done::mainLoop::Loop::#{index}")
  456.  
  457.  
  458. writelog("Finish::Loop::#{$curMainLoopNum}")
  459.  
  460.  
  461. saveLogFileToGist if $saveLogToGist
  462.  
  463. index += 1
  464.  
  465. end
  466.  
  467. $engineStatus = "Idle"
  468. resetStatus
  469. sendStatus("Finish::mainLoop::END")
  470.  
  471. end
  472.  
  473. def self.Multimedia(loopTime)
  474.  
  475. tcase = TestCase.new("Multimedia")
  476.  
  477. tcase << TestAction.new(:gotoApp_1) do
  478. gotoApp('Gallery')
  479.  
  480. waitsecond(1)
  481. end
  482.  
  483. tcase << TestAction.new(:scriptAction_2) do
  484. logStartTest("Multimedia")
  485. end
  486.  
  487. tcase << TestAction.new(:Button_Button1_2) do
  488. $ruiObj = RUIObject.new.with('objectid', 1034541174).with('selfid', -1318451484).with('textdescid', 730622746).with('uniqueparentid', 0)
  489. .with('uitreeindex', 4)
  490. .with('classname', 'Button')
  491. .with('resource-id', 'android:id/button1')
  492. .with('text', 'OK')
  493.  
  494. $ruiObj.click
  495.  
  496. waitsecond(1)
  497. end
  498.  
  499. tcase << TestAction.new(:pressRecentApps_5) do
  500. pressRecentApps
  501.  
  502. waitsecond(1)
  503. end
  504.  
  505. tcase << TestAction.new(:clickXY_702_1422_7) do
  506. click(702,1422)
  507.  
  508. waitsecond(1)
  509. end
  510.  
  511. tcase << TestAction.new(:ImageButton_Open_1) do
  512. $ruiObj = RUIObject.new.with('objectid', 1547446343).with('selfid', 1589392844).with('textdescid', -1415314368).with('uniqueparentid', 0)
  513. .with('uitreeindex', 0)
  514. .with('classname', 'ImageButton')
  515. .with('content-desc', 'Open navigation drawer')
  516.  
  517. $ruiObj.click
  518. noFailCheck
  519.  
  520. waitsecond(1)
  521. end
  522.  
  523. tcase << TestAction.new(:CheckedTextView_DrawerItem_2) do
  524. $ruiObj = RUIObject.new.with('objectid', -401550358).with('selfid', 229733217).with('textdescid', 1081503090).with('uniqueparentid', 0).with('classresourceid', 396870609)
  525. .with('uitreeindex', 4)
  526. .with('classname', 'CheckedTextView')
  527. .with('resource-id', 'com.android.gallery3d:id/drawer_item')
  528. .with('text', 'Videos')
  529.  
  530. $ruiObj.click
  531.  
  532. waitsecond(1)
  533. end
  534.  
  535. tcase << TestAction.new(:clickXY_180_1204_8) do
  536. click(180,1204)
  537.  
  538. waitsecond(1)
  539. end
  540.  
  541. tcase << TestAction.new(:TextView_ActionShare_16) do
  542. $ruiObj = RUIObject.new.with('objectid', 810661028).with('selfid', 1147601526).with('textdescid', 1124326531).with('uniqueparentid', 0)
  543. .with('uitreeindex', 4)
  544. .with('classname', 'TextView')
  545. .with('resource-id', 'com.android.gallery3d:id/action_share')
  546. .with('content-desc', 'Share')
  547.  
  548. $ruiObj.isNotExist
  549. ifFailJumpTo(:clickXY_200_560_10)
  550.  
  551. waitsecond(1)
  552. end
  553.  
  554. tcase << TestAction.new(:clickXY_196_544_18) do
  555. click(196,544)
  556.  
  557. waitsecond(1)
  558. end
  559.  
  560. tcase << TestAction.new(:clickXY_200_560_10) do
  561. click(200,560)
  562.  
  563. waitsecond(1)
  564. end
  565.  
  566. tcase << TestAction.new(:TextView_ResolverText_2) do
  567. $ruiObj = RUIObject.new.with('objectid', -686048727).with('selfid', 1334281818).with('textdescid', 2007893244).with('uniqueparentid', 0).with('classresourceid', -472389065)
  568. .with('uitreeindex', 2)
  569. .with('classname', 'TextView')
  570. .with('resource-id', 'com.lge:id/resolver_text')
  571. .with('text', 'Video')
  572.  
  573. $ruiObj.click
  574. end
  575.  
  576. tcase << TestAction.new(:Button_AllowButton_4) do
  577. $ruiObj = RUIObject.new.with('objectid', -1049422851).with('selfid', -808516471).with('textdescid', -374437087).with('uniqueparentid', 0).with('classresourceid', 771022871)
  578. .with('uitreeindex', 8)
  579. .with('classname', 'Button')
  580. .with('resource-id', 'com.lge:id/allow_button')
  581. .with('text', 'OK')
  582.  
  583. $ruiObj.click
  584. end
  585.  
  586. tcase << TestAction.new(:Button_PermissionAllowButton_6) do
  587. $ruiObj = RUIObject.new.with('objectid', -886457929).with('selfid', 1443382411).with('textdescid', 270556320).with('uniqueparentid', 0)
  588. .with('uitreeindex', 3)
  589. .with('classname', 'Button')
  590. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  591. .with('text', 'ALLOW')
  592.  
  593. $ruiObj.click
  594.  
  595. waitsecond(1)
  596. end
  597.  
  598. tcase << TestAction.new(:TextView_Edit_20) do
  599. $ruiObj = RUIObject.new.with('objectid', -428282449).with('selfid', 1160143396).with('textdescid', -197620933).with('uniqueparentid', 0)
  600. .with('uitreeindex', 13)
  601. .with('classname', 'TextView')
  602. .with('content-desc', 'Edit')
  603.  
  604. $ruiObj.isExist
  605.  
  606. waitsecond(1)
  607. end
  608.  
  609. tcase << TestAction.new(:scriptAction_4) do
  610. $myTestResult = checkLastExistResult
  611.  
  612. if $myTestResult == false
  613. $myFailReason = "Failed to play video"
  614. end
  615.  
  616. logStopTest("Multimedia")
  617. end
  618.  
  619. tcase << TestAction.new(:pressBack_4) do
  620. pressBack
  621. end
  622.  
  623. tcase << TestAction.new(:pressBack_5) do
  624. pressBack
  625. end
  626.  
  627. tcase << TestAction.new(:pressHome_6) do
  628. pressHome
  629. end
  630.  
  631. tcase.run(loopTime)
  632.  
  633. end
  634.  
  635. def self.SMS(loopTime)
  636.  
  637. tcase = TestCase.new("SMS")
  638.  
  639. tcase << TestAction.new(:gotoApp_1) do
  640. gotoApp('Messaging')
  641.  
  642. waitsecond(2)
  643. end
  644.  
  645. tcase << TestAction.new(:scriptAction_2) do
  646. logStartTest("SMS")
  647. end
  648.  
  649. tcase << TestAction.new(:ImageView_Img1_2) do
  650. $ruiObj = RUIObject.new.with('objectid', 160312923).with('selfid', 468961841).with('textdescid', 339488965).with('uniqueparentid', 0)
  651. .with('uitreeindex', 6)
  652. .with('classname', 'ImageView')
  653. .with('resource-id', 'com.android.mms:id/img1')
  654. .with('content-desc', 'Compose button')
  655.  
  656. $ruiObj.click
  657.  
  658. waitsecond(1)
  659. end
  660.  
  661. tcase << TestAction.new(:ImageView_FabImg_2) do
  662. $ruiObj = RUIObject.new.with('objectid', -820305049).with('selfid', 1638137891).with('textdescid', 1158507182).with('uniqueparentid', 0)
  663. .with('uitreeindex', 5)
  664. .with('classname', 'ImageView')
  665. .with('resource-id', 'com.android.mms:id/fab_img')
  666. .with('content-desc', 'New message')
  667.  
  668. $ruiObj.click
  669.  
  670. waitsecond(2)
  671. end
  672.  
  673. tcase << TestAction.new(:MultiAutoCompleteTextView_3) do
  674. $ruiObj = RUIObject.new.with('objectid', 784817492).with('selfid', -1346021293).with('textdescid', -1440461492).with('uniqueparentid', 0).with('classresourceid', -1346021293)
  675. .with('uitreeindex', 0)
  676. .with('classname', 'MultiAutoCompleteTextView')
  677.  
  678. $ruiObj.inputtext('A01 a01')
  679.  
  680. waitsecond(1)
  681. end
  682.  
  683. tcase << TestAction.new(:clickXY_90_172_2) do
  684. click(90,172)
  685.  
  686. waitsecond(1)
  687. end
  688.  
  689. tcase << TestAction.new(:EditText_Enter_4) do
  690. $ruiObj = RUIObject.new.with('objectid', 1986611722).with('selfid', -454502120).with('textdescid', -628489015).with('uniqueparentid', 0).with('classresourceid', 1666676343)
  691. .with('uitreeindex', 5)
  692. .with('classname', 'EditText')
  693. .with('content-desc', 'Enter message')
  694.  
  695. $ruiObj.inputtext('Testing "Concurrency tests"')
  696.  
  697. waitsecond(2)
  698. end
  699.  
  700. tcase << TestAction.new(:Button_SendButton_6) do
  701. $ruiObj = RUIObject.new
  702. .with('classname', 'Button')
  703. .with('text', 'Send')
  704.  
  705. $ruiObj.click
  706.  
  707. waitsecond(1)
  708. end
  709.  
  710. tcase << TestAction.new(:scriptAction_2_1) do
  711. logStopTest("SMS")
  712. end
  713.  
  714. tcase << TestAction.new(:pressBack_10) do
  715. pressBack
  716. end
  717.  
  718. tcase << TestAction.new(:pressBack_11) do
  719. pressBack
  720. end
  721.  
  722. tcase << TestAction.new(:pressHome_12) do
  723. pressHome
  724. end
  725.  
  726. tcase.run(loopTime)
  727.  
  728. end
  729.  
  730. def self.Video(loopTime)
  731.  
  732. tcase = TestCase.new("Video")
  733.  
  734. tcase << TestAction.new(:gotoApp_1) do
  735. gotoApp('Camera')
  736.  
  737. waitsecond(1)
  738. end
  739.  
  740. tcase << TestAction.new(:scriptAction_2) do
  741. logStartTest("Video")
  742. end
  743.  
  744. tcase << TestAction.new(:ImageButton_ShutterTopComp_2) do
  745. $ruiObj = RUIObject.new.with('objectid', -1799776401).with('selfid', -1818636331).with('textdescid', -839551902).with('uniqueparentid', 0)
  746. .with('uitreeindex', 8)
  747. .with('classname', 'ImageButton')
  748. .with('resource-id', 'com.lge.camera:id/shutter_top_comp')
  749. .with('content-desc', 'Start recording')
  750.  
  751. $ruiObj.click
  752. noFailCheck
  753.  
  754. waitsecond(4)
  755. end
  756.  
  757. tcase << TestAction.new(:wait12second_2) do
  758. waitsecond(12)
  759. end
  760.  
  761. tcase << TestAction.new(:ImageButton_ShutterTopComp_4) do
  762. $ruiObj = RUIObject.new.with('objectid', -1799776401).with('selfid', -1930433243).with('textdescid', 415097668).with('uniqueparentid', 0)
  763. .with('uitreeindex', 4)
  764. .with('classname', 'ImageButton')
  765. .with('resource-id', 'com.lge.camera:id/shutter_top_comp')
  766. .with('content-desc', 'Stop recording')
  767.  
  768. $ruiObj.click
  769. noFailCheck
  770.  
  771. waitsecond(1)
  772. end
  773.  
  774. tcase << TestAction.new(:scriptAction_2_1) do
  775. logStopTest("Video")
  776. end
  777.  
  778. tcase << TestAction.new(:pressBack_5) do
  779. pressBack
  780. end
  781.  
  782. tcase << TestAction.new(:pressBack_6) do
  783. pressBack
  784. end
  785.  
  786. tcase << TestAction.new(:pressHome_7) do
  787. pressHome
  788. end
  789.  
  790. tcase.run(loopTime)
  791.  
  792. end
  793.  
  794. def self.VideoCall_01(loopTime)
  795.  
  796. tcase = TestCase.new("VideoCall_01")
  797.  
  798. tcase << TestAction.new(:scriptAction_StartTest_1) do
  799. logStartTest("VideoCall_01")
  800. end
  801.  
  802. tcase << TestAction.new(:pressHome_4) do
  803. pressHome
  804. end
  805.  
  806. tcase << TestAction.new(:TextView_Phone_2) do
  807. $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
  808. .with('uitreeindex', 9)
  809. .with('classname', 'TextView')
  810. .with('content-desc', 'Phone')
  811. .with('text', 'Phone')
  812.  
  813. $ruiObj.click
  814.  
  815. waitsecond(1)
  816. end
  817.  
  818. tcase << TestAction.new(:TextView_Tabtext_2) do
  819. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
  820. .with('uitreeindex', 4)
  821. .with('classname', 'TextView')
  822. .with('resource-id', 'com.android.contacts:id/tabText')
  823. .with('text', 'Contacts')
  824.  
  825. $ruiObj.click
  826.  
  827. waitsecond(1)
  828. end
  829.  
  830. tcase << TestAction.new(:EditText_SearchSrcText_2) do
  831. $ruiObj = RUIObject.new.with('objectid', 588070375).with('selfid', -959326622).with('textdescid', -497243406).with('uniqueparentid', 0)
  832. .with('uitreeindex', 6)
  833. .with('classname', 'EditText')
  834. .with('resource-id', 'android:id/search_src_text')
  835. .with('content-desc', 'Search contacts')
  836.  
  837. $ruiObj.inputtext('A01 a01')
  838.  
  839. waitsecond(1)
  840. end
  841.  
  842. tcase << TestAction.new(:TextView_A01_4) do
  843. $ruiObj = RUIObject.new.with('objectid', -728261803).with('selfid', -2094016618).with('textdescid', -1517178717).with('uniqueparentid', 0).with('classresourceid', -938935918)
  844. .with('uitreeindex', 12)
  845. .with('classname', 'TextView')
  846. .with('content-desc', 'A01 a01')
  847. .with('text', 'A01 a01')
  848.  
  849. $ruiObj.click
  850.  
  851. waitsecond(1)
  852. end
  853.  
  854. tcase << TestAction.new(:ImageView_Button1_16) do
  855. $ruiObj = RUIObject.new.with('objectid', -1827607533).with('selfid', 671123258).with('textdescid', 504320911).with('uniqueparentid', 0).with('classresourceid', -1143292048)
  856. .with('uitreeindex', 15)
  857. .with('classname', 'ImageView')
  858. .with('resource-id', 'android:id/button1')
  859. .with('content-desc', 'Video call to A01 a01')
  860.  
  861. $ruiObj.click
  862.  
  863. waitsecond(2)
  864. end
  865.  
  866. tcase << TestAction.new(:ImageView_FirstActionButton_6) do
  867. $ruiObj = RUIObject.new.with('objectid', -284633982).with('selfid', -1819582550).with('textdescid', -721488607).with('uniqueparentid', 0).with('classresourceid', 745414969)
  868. .with('uitreeindex', 11)
  869. .with('classname', 'ImageView')
  870. .with('resource-id', 'com.android.contacts:id/first_action_button')
  871. .with('content-desc', 'Video call')
  872.  
  873. $ruiObj.click
  874.  
  875. waitsecond(1)
  876. end
  877.  
  878. tcase << TestAction.new(:wait8second_31) do
  879. waitsecond(8)
  880. end
  881.  
  882. tcase << TestAction.new(:scriptAction_18_1) do
  883. sendBTCmd('videoCall')
  884.  
  885. waitsecond(8)
  886. end
  887.  
  888. tcase << TestAction.new(:scriptAction_18_1_1) do
  889. sendBTCmd('endCall')
  890.  
  891. waitsecond(2)
  892. end
  893.  
  894. tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
  895. $myTestResult = checkLastBTCmdResult
  896. if $myTestResult == false
  897. $myFailReason = "Call not come to other dev"
  898. end
  899. logStopTest("VideoCall_01")
  900.  
  901. end
  902.  
  903. tcase << TestAction.new(:Button_Endbutton_2) do
  904. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  905. .with('uitreeindex', 8)
  906. .with('classname', 'Button')
  907. .with('resource-id', 'com.android.incallui:id/endButton')
  908. .with('text', 'End')
  909.  
  910. $ruiObj.click
  911.  
  912. waitsecond(1)
  913. end
  914.  
  915. tcase << TestAction.new(:pressBack_3) do
  916. pressBack
  917. end
  918.  
  919. tcase << TestAction.new(:pressBack_4) do
  920. pressBack
  921. end
  922.  
  923. tcase.run(loopTime)
  924.  
  925. end
  926.  
  927. def self.Voice(loopTime)
  928.  
  929. tcase = TestCase.new("Voice")
  930.  
  931. tcase << TestAction.new(:pressHome_1) do
  932. pressHome
  933. end
  934.  
  935. tcase << TestAction.new(:scriptAction_2) do
  936. logStartTest("Voice")
  937. end
  938.  
  939. tcase << TestAction.new(:scriptAction_4) do
  940.  
  941. UiDevice.getInstance.openNotification()
  942.  
  943. waitsecond(1)
  944. end
  945.  
  946. tcase << TestAction.new(:Button_Action0_10_1) do
  947. $ruiObj = RUIObject.new.with('objectid', 195744714).with('selfid', 316612829).with('textdescid', 467727542).with('uniqueparentid', 0)
  948. .with('uitreeindex', 12)
  949. .with('classname', 'Button')
  950. .with('resource-id', 'android:id/action0')
  951. .with('content-desc', 'End call')
  952. .with('text', 'End call')
  953.  
  954. $ruiObj.click
  955.  
  956. waitsecond(1)
  957. end
  958.  
  959. tcase << TestAction.new(:pressRecentApps_2) do
  960. pressRecentApps
  961.  
  962. waitsecond(2)
  963. end
  964.  
  965. tcase << TestAction.new(:pressHome_4) do
  966. pressHome
  967.  
  968. waitsecond(2)
  969. end
  970.  
  971. tcase << TestAction.new(:gotoApp_2) do
  972. gotoApp('Phone')
  973.  
  974. waitsecond(4)
  975. end
  976.  
  977. tcase << TestAction.new(:Button_Endbutton_9) do
  978. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  979. .with('uitreeindex', 8)
  980. .with('classname', 'Button')
  981. .with('resource-id', 'com.android.incallui:id/endButton')
  982. .with('text', 'End')
  983.  
  984. $ruiObj.click
  985.  
  986. waitsecond(1)
  987. end
  988.  
  989. tcase << TestAction.new(:TextView_Tabtext_2) do
  990. $ruiObj = RUIObject.new.with('objectid', -66640566).with('selfid', 566119687).with('textdescid', 1718553658).with('uniqueparentid', 0)
  991. .with('uitreeindex', 2)
  992. .with('classname', 'TextView')
  993. .with('resource-id', 'com.android.contacts:id/tabText')
  994. .with('text', 'Dial')
  995.  
  996. $ruiObj.click
  997.  
  998. waitsecond(1)
  999. end
  1000.  
  1001. tcase << TestAction.new(:ImageButton_Btndelete_2) do
  1002. $ruiObj = RUIObject.new.with('objectid', 1208458233).with('selfid', 194799554).with('textdescid', -91453704).with('uniqueparentid', 0)
  1003. .with('uitreeindex', 31)
  1004. .with('classname', 'ImageButton')
  1005. .with('resource-id', 'com.android.contacts:id/btnDelete')
  1006. .with('content-desc', 'Backspace')
  1007.  
  1008. $ruiObj.longClick
  1009.  
  1010. waitsecond(1)
  1011. end
  1012.  
  1013. tcase << TestAction.new(:EditText_Digits_2) do
  1014. $ruiObj = RUIObject.new.with('objectid', 1211786433).with('selfid', -1326421482).with('textdescid', -1089326209).with('uniqueparentid', 0)
  1015. .with('uitreeindex', 8)
  1016. .with('classname', 'EditText')
  1017. .with('resource-id', 'com.android.contacts:id/digits')
  1018.  
  1019. $ruiObj.inputtext('511')
  1020.  
  1021. waitsecond(1)
  1022. end
  1023.  
  1024. tcase << TestAction.new(:ImageButton_Btnvolte_2) do
  1025. $ruiObj = RUIObject.new.with('objectid', -1313327681).with('selfid', -460279496).with('textdescid', -1259661061).with('uniqueparentid', 0)
  1026. .with('uitreeindex', 36)
  1027. .with('classname', 'ImageButton')
  1028. .with('resource-id', 'com.android.contacts:id/btnVoLTE')
  1029. .with('content-desc', 'VoLTE call')
  1030.  
  1031. $ruiObj.click
  1032.  
  1033. waitsecond(2)
  1034. end
  1035.  
  1036. tcase << TestAction.new(:ImageButton_Btnlogscall_2) do
  1037. $ruiObj = RUIObject.new.with('objectid', -1934426254).with('selfid', -2053967649).with('textdescid', -911487124).with('uniqueparentid', 0)
  1038. .with('uitreeindex', 36)
  1039. .with('classname', 'ImageButton')
  1040. .with('resource-id', 'com.android.contacts:id/btnLogsCall')
  1041. .with('content-desc', 'Call')
  1042.  
  1043. $ruiObj.click
  1044.  
  1045. waitsecond(2)
  1046. end
  1047.  
  1048. tcase << TestAction.new(:pressHome_8) do
  1049. pressHome
  1050.  
  1051. waitsecond(1)
  1052. end
  1053.  
  1054. tcase << TestAction.new(:scriptAction_2_1) do
  1055. logStopTest("Voice")
  1056. end
  1057.  
  1058. tcase << TestAction.new(:scriptAction_40) do
  1059. drag(409.5,247.5,54,2668.5,10)
  1060. end
  1061.  
  1062. tcase.run(loopTime)
  1063.  
  1064. end
  1065.  
  1066. def self.VoiceRecord(loopTime)
  1067.  
  1068. tcase = TestCase.new("VoiceRecord")
  1069.  
  1070. tcase << TestAction.new(:gotoApp_1) do
  1071. gotoApp('HD Audio Recorder')
  1072. end
  1073.  
  1074. tcase << TestAction.new(:scriptAction_2_1) do
  1075. logStartTest("Voice")
  1076. end
  1077.  
  1078. tcase << TestAction.new(:Button_BtnAgree_4) do
  1079. $ruiObj = RUIObject.new.with('objectid', -348214443).with('selfid', 1095265349).with('textdescid', -1957555649).with('uniqueparentid', 0)
  1080. .with('uitreeindex', 89)
  1081. .with('classname', 'Button')
  1082. .with('resource-id', 'com.lge.eula:id/btn_agree')
  1083. .with('text', 'Agree')
  1084.  
  1085. $ruiObj.click
  1086. end
  1087.  
  1088. tcase << TestAction.new(:Button_PermissionAllowButton_3) do
  1089. $ruiObj = RUIObject.new.with('objectid', -1492498299).with('selfid', 1443382411).with('textdescid', -1772738030).with('uniqueparentid', 0).with('classresourceid', -227364920)
  1090. .with('uitreeindex', 4)
  1091. .with('classname', 'Button')
  1092. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  1093. .with('text', 'ALLOW')
  1094.  
  1095. $ruiObj.click
  1096.  
  1097. waitsecond(1)
  1098. end
  1099.  
  1100. tcase << TestAction.new(:Button_PermissionAllowButton_3_1) do
  1101. $ruiObj = RUIObject.new.with('objectid', -1492498299).with('selfid', 1443382411).with('textdescid', -1772738030).with('uniqueparentid', 0).with('classresourceid', -227364920)
  1102. .with('uitreeindex', 4)
  1103. .with('classname', 'Button')
  1104. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  1105. .with('text', 'ALLOW')
  1106.  
  1107. $ruiObj.click
  1108.  
  1109. waitsecond(2)
  1110. end
  1111.  
  1112. tcase << TestAction.new(:Button_TipHelpNextButton_2) do
  1113. $ruiObj = RUIObject.new.with('objectid', -1434682713).with('selfid', 1581855318).with('textdescid', 1391497428).with('uniqueparentid', 0)
  1114. .with('uitreeindex', 12)
  1115. .with('classname', 'Button')
  1116. .with('resource-id', 'com.lge.hifirecorder:id/tip_help_next_button')
  1117. .with('text', 'NEXT')
  1118.  
  1119. $ruiObj.click
  1120.  
  1121. waitsecond(1)
  1122. end
  1123.  
  1124. tcase << TestAction.new(:Button_TipHelpNextButton_4) do
  1125. $ruiObj = RUIObject.new.with('objectid', -1434682713).with('selfid', 1581855318).with('textdescid', 1391497428).with('uniqueparentid', 0)
  1126. .with('uitreeindex', 14)
  1127. .with('classname', 'Button')
  1128. .with('resource-id', 'com.lge.hifirecorder:id/tip_help_next_button')
  1129. .with('text', 'NEXT')
  1130.  
  1131. $ruiObj.click
  1132.  
  1133. waitsecond(1)
  1134. end
  1135.  
  1136. tcase << TestAction.new(:Button_TipHelpNextButton_4_1) do
  1137. $ruiObj = RUIObject.new.with('objectid', -1434682713).with('selfid', 1581855318).with('textdescid', 1391497428).with('uniqueparentid', 0)
  1138. .with('uitreeindex', 14)
  1139. .with('classname', 'Button')
  1140. .with('resource-id', 'com.lge.hifirecorder:id/tip_help_next_button')
  1141. .with('text', 'NEXT')
  1142.  
  1143. $ruiObj.click
  1144.  
  1145. waitsecond(1)
  1146. end
  1147.  
  1148. tcase << TestAction.new(:Button_TipHelpNextButton_4_1_1) do
  1149. $ruiObj = RUIObject.new.with('objectid', -1434682713).with('selfid', 1581855318).with('textdescid', 1391497428).with('uniqueparentid', 0)
  1150. .with('uitreeindex', 14)
  1151. .with('classname', 'Button')
  1152. .with('resource-id', 'com.lge.hifirecorder:id/tip_help_next_button')
  1153. .with('text', 'NEXT')
  1154.  
  1155. $ruiObj.click
  1156.  
  1157. waitsecond(1)
  1158. end
  1159.  
  1160. tcase << TestAction.new(:Button_TipHelpNextButton_8) do
  1161. $ruiObj = RUIObject.new.with('objectid', -1434682713).with('selfid', 1581566693).with('textdescid', 1382550053).with('uniqueparentid', 0)
  1162. .with('uitreeindex', 10)
  1163. .with('classname', 'Button')
  1164. .with('resource-id', 'com.lge.hifirecorder:id/tip_help_next_button')
  1165. .with('text', 'DONE')
  1166.  
  1167. $ruiObj.click
  1168.  
  1169. waitsecond(1)
  1170. end
  1171.  
  1172. tcase << TestAction.new(:pressRecentApps_10) do
  1173. pressRecentApps
  1174.  
  1175. waitsecond(1)
  1176. end
  1177.  
  1178. tcase << TestAction.new(:pressRecentApps_10_1) do
  1179. pressRecentApps
  1180.  
  1181. waitsecond(1)
  1182. end
  1183.  
  1184. tcase << TestAction.new(:ImageView_Recordimage_13) do
  1185. $ruiObj = RUIObject.new.with('objectid', -1465298129).with('selfid', 238279933).with('textdescid', 1820398289).with('uniqueparentid', 0)
  1186. .with('uitreeindex', 17)
  1187. .with('classname', 'ImageView')
  1188. .with('resource-id', 'com.lge.hifirecorder:id/recordImage')
  1189.  
  1190. $ruiObj.click
  1191.  
  1192. waitsecond(0)
  1193. end
  1194.  
  1195. tcase << TestAction.new(:wait12second_2) do
  1196. waitsecond(12)
  1197. end
  1198.  
  1199. tcase << TestAction.new(:ImageView_Recordimage_15) do
  1200. $ruiObj = RUIObject.new.with('objectid', -1465298129).with('selfid', 238279933).with('textdescid', 1820398289).with('uniqueparentid', 0)
  1201. .with('uitreeindex', 16)
  1202. .with('classname', 'ImageView')
  1203. .with('resource-id', 'com.lge.hifirecorder:id/recordImage')
  1204.  
  1205. $ruiObj.click
  1206.  
  1207. waitsecond(1)
  1208. end
  1209.  
  1210. tcase << TestAction.new(:ImageView_Recordimage_20) do
  1211. $ruiObj = RUIObject.new.with('objectid', -1465298129).with('selfid', 238279933).with('textdescid', 1820398289).with('uniqueparentid', 0)
  1212. .with('uitreeindex', 16)
  1213. .with('classname', 'ImageView')
  1214. .with('resource-id', 'com.lge.hifirecorder:id/recordImage')
  1215.  
  1216. $ruiObj.click
  1217.  
  1218. waitsecond(2)
  1219. end
  1220.  
  1221. tcase << TestAction.new(:wait12second_8) do
  1222. waitsecond(12)
  1223. end
  1224.  
  1225. tcase << TestAction.new(:ImageView_Stopimage_22) do
  1226. $ruiObj = RUIObject.new.with('objectid', -394191601).with('selfid', -1953519444).with('textdescid', 664962289).with('uniqueparentid', 0)
  1227. .with('uitreeindex', 18)
  1228. .with('classname', 'ImageView')
  1229. .with('resource-id', 'com.lge.hifirecorder:id/stopImage')
  1230.  
  1231. $ruiObj.click
  1232.  
  1233. waitsecond(2)
  1234. end
  1235.  
  1236. tcase << TestAction.new(:ImageView_Playimage_24) do
  1237. $ruiObj = RUIObject.new.with('objectid', 1501925340).with('selfid', -1166191430).with('textdescid', -684954684).with('uniqueparentid', 0)
  1238. .with('uitreeindex', 29)
  1239. .with('classname', 'ImageView')
  1240. .with('resource-id', 'com.lge.hifirecorder:id/playImage')
  1241.  
  1242. $ruiObj.click
  1243.  
  1244. waitsecond(2)
  1245. end
  1246.  
  1247. tcase << TestAction.new(:wait8second_26) do
  1248. waitsecond(8)
  1249. end
  1250.  
  1251. tcase << TestAction.new(:Button_Deletebutton_28) do
  1252. $ruiObj = RUIObject.new.with('objectid', 963964431).with('selfid', -1380084967).with('textdescid', 2110292476).with('uniqueparentid', 0)
  1253. .with('uitreeindex', 15)
  1254. .with('classname', 'Button')
  1255. .with('resource-id', 'com.lge.hifirecorder:id/deletebutton')
  1256. .with('content-desc', 'Delete')
  1257.  
  1258. $ruiObj.click
  1259.  
  1260. waitsecond(1)
  1261. end
  1262.  
  1263. tcase << TestAction.new(:Button_Button1_30) do
  1264. $ruiObj = RUIObject.new.with('objectid', 562328070).with('selfid', 982364851).with('textdescid', -739744837).with('uniqueparentid', 0).with('classresourceid', 1834539358)
  1265. .with('uitreeindex', 2)
  1266. .with('classname', 'Button')
  1267. .with('resource-id', 'android:id/button1')
  1268. .with('text', 'DELETE')
  1269.  
  1270. $ruiObj.click
  1271.  
  1272. waitsecond(2)
  1273. end
  1274.  
  1275. tcase << TestAction.new(:scriptAction_2_1_1) do
  1276. logStopTest("VoiceRecord")
  1277. end
  1278.  
  1279. tcase << TestAction.new(:pressBack_16) do
  1280. pressBack
  1281.  
  1282. waitsecond(1)
  1283. end
  1284.  
  1285. tcase << TestAction.new(:pressBack_19) do
  1286. pressBack
  1287.  
  1288. waitsecond(1)
  1289. end
  1290.  
  1291. tcase << TestAction.new(:pressHome_20) do
  1292. pressHome
  1293.  
  1294. waitsecond(1)
  1295. end
  1296.  
  1297. tcase.run(loopTime)
  1298.  
  1299. end
  1300.  
  1301. def self.Youtube(loopTime)
  1302.  
  1303. tcase = TestCase.new("Youtube")
  1304.  
  1305. tcase << TestAction.new(:gotoApp_1) do
  1306. gotoApp('YouTube')
  1307.  
  1308. waitsecond(1)
  1309. end
  1310.  
  1311. tcase << TestAction.new(:scriptAction_2) do
  1312. logStartTest("Youtube")
  1313. end
  1314.  
  1315. tcase << TestAction.new(:TextView_DoneButton_2) do
  1316. $ruiObj = RUIObject.new.with('objectid', -1205593873).with('selfid', -1917900695).with('textdescid', 1076943437).with('uniqueparentid', 0)
  1317. .with('uitreeindex', 2)
  1318. .with('classname', 'TextView')
  1319. .with('resource-id', 'com.google.android.youtube:id/done_button')
  1320. .with('text', 'Done')
  1321.  
  1322. $ruiObj.click
  1323.  
  1324. waitsecond(4)
  1325. end
  1326.  
  1327. tcase << TestAction.new(:ImageView_Thumbnail_2) do
  1328. $ruiObj = RUIObject.new.with('objectid', 1925683767).with('selfid', -2120336906).with('textdescid', -433345335).with('uniqueparentid', 0)
  1329. .with('uitreeindex', 9)
  1330. .with('pretext', 'Home')
  1331. .with('classname', 'ImageView')
  1332. .with('resource-id', 'com.google.android.youtube:id/thumbnail')
  1333.  
  1334. $ruiObj.click
  1335.  
  1336. waitsecond(8)
  1337. end
  1338.  
  1339. tcase << TestAction.new(:scriptAction_2_1) do
  1340. logStopTest("Youtube")
  1341. end
  1342.  
  1343. tcase << TestAction.new(:pressBack_5) do
  1344. pressBack
  1345. end
  1346.  
  1347. tcase << TestAction.new(:pressBack_6) do
  1348. pressBack
  1349. end
  1350.  
  1351. tcase << TestAction.new(:pressHome_7) do
  1352. pressHome
  1353. end
  1354.  
  1355. tcase.run(loopTime)
  1356.  
  1357. end
  1358.  
  1359. def self.android_ExpHandler(loopTime)
  1360.  
  1361. tcase = TestCase.new("android_ExpHandler")
  1362.  
  1363. tcase << TestAction.new(:scriptAction_check) do
  1364. $err = "system popup detected::#{takeScreenShot}::screenshot saved"
  1365. $myTestResult = false
  1366. puts $err
  1367. logcat($err)
  1368. writelog($err)
  1369. uiObj("Button").click if uiObj("Button").exists
  1370.  
  1371. waitsecond(2)
  1372. end
  1373.  
  1374. tcase.run(loopTime)
  1375.  
  1376. end
  1377.  
  1378. def self.change_3G(loopTime)
  1379.  
  1380. tcase = TestCase.new("change_3G")
  1381.  
  1382. tcase << TestAction.new(:gotoApp_16) do
  1383. gotoApp('HiddenMenuCall')
  1384. end
  1385.  
  1386. tcase << TestAction.new(:TextView_Title_2) do
  1387. $ruiObj = RUIObject.new.with('objectid', 1100751325).with('selfid', -167282287).with('textdescid', -350417171).with('uniqueparentid', 0).with('classresourceid', 490183159)
  1388. .with('uitreeindex', 1)
  1389. .with('classname', 'TextView')
  1390. .with('resource-id', 'android:id/title')
  1391. .with('text', 'LG Hidden Menu')
  1392.  
  1393. $ruiObj.click
  1394.  
  1395. waitsecond(1)
  1396. end
  1397.  
  1398. tcase << TestAction.new(:TextView_Title_87) do
  1399. $ruiObj = RUIObject.new.with('objectid', 684902757).with('selfid', 538152793).with('textdescid', -1915478867).with('uniqueparentid', 0).with('classresourceid', 490183159)
  1400. .with('uitreeindex', 4)
  1401. .with('classname', 'TextView')
  1402. .with('resource-id', 'android:id/title')
  1403. .with('text', 'Field Test')
  1404.  
  1405. $ruiObj.click
  1406.  
  1407. waitsecond(1)
  1408. end
  1409.  
  1410. tcase << TestAction.new(:TextView_Text1_10) do
  1411. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', -141259386).with('textdescid', -734720867).with('uniqueparentid', 0).with('classresourceid', 490068035)
  1412. .with('uitreeindex', 1)
  1413. .with('classname', 'TextView')
  1414. .with('resource-id', 'android:id/text1')
  1415. .with('text', 'Modem Settings')
  1416.  
  1417. $ruiObj.click
  1418.  
  1419. waitsecond(1)
  1420. end
  1421.  
  1422. tcase << TestAction.new(:swipeDown_12) do
  1423. swipe_vertical 500
  1424.  
  1425. waitsecond(1)
  1426. end
  1427.  
  1428. tcase << TestAction.new(:TextView_Text1_14) do
  1429. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', 12767364).with('textdescid', 1760273017).with('uniqueparentid', 0).with('classresourceid', 490068035)
  1430. .with('uitreeindex', 6)
  1431. .with('classname', 'TextView')
  1432. .with('resource-id', 'android:id/text1')
  1433. .with('text', 'RAT Selection')
  1434.  
  1435. $ruiObj.click
  1436.  
  1437. waitsecond(1)
  1438. end
  1439.  
  1440. tcase << TestAction.new(:TextView_Text1_2) do
  1441. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', -244179464).with('textdescid', 496935915).with('uniqueparentid', 0).with('classresourceid', 490068035)
  1442. .with('uitreeindex', 5)
  1443. .with('classname', 'TextView')
  1444. .with('resource-id', 'android:id/text1')
  1445. .with('text', 'GSM WCDMA')
  1446.  
  1447. $ruiObj.click
  1448.  
  1449. waitsecond(1)
  1450. end
  1451.  
  1452. tcase << TestAction.new(:Button_Button1_18) do
  1453. $ruiObj = RUIObject.new.with('objectid', 2089308220).with('selfid', -1318451484).with('textdescid', 1664978912).with('uniqueparentid', 0)
  1454. .with('uitreeindex', 1)
  1455. .with('classname', 'Button')
  1456. .with('resource-id', 'android:id/button1')
  1457. .with('text', 'OK')
  1458.  
  1459. $ruiObj.click
  1460.  
  1461. waitsecond(1)
  1462. end
  1463.  
  1464. tcase << TestAction.new(:pressBack_7) do
  1465. pressBack
  1466. end
  1467.  
  1468. tcase << TestAction.new(:pressBack_8) do
  1469. pressBack
  1470. end
  1471.  
  1472. tcase << TestAction.new(:pressBack_20) do
  1473. pressBack
  1474. end
  1475.  
  1476. tcase << TestAction.new(:pressBack_20_1) do
  1477. pressBack
  1478. end
  1479.  
  1480. tcase << TestAction.new(:pressHome_9) do
  1481. pressHome
  1482. end
  1483.  
  1484. tcase.run(loopTime)
  1485.  
  1486. end
  1487.  
  1488. def self.change_LTE(loopTime)
  1489.  
  1490. tcase = TestCase.new("change_LTE")
  1491.  
  1492. tcase << TestAction.new(:gotoApp_16_1) do
  1493. gotoApp('HiddenMenuCall')
  1494. end
  1495.  
  1496. tcase << TestAction.new(:TextView_Title_3) do
  1497. $ruiObj = RUIObject.new.with('objectid', 1100751325).with('selfid', -167282287).with('textdescid', -350417171).with('uniqueparentid', 0).with('classresourceid', 490183159)
  1498. .with('uitreeindex', 1)
  1499. .with('classname', 'TextView')
  1500. .with('resource-id', 'android:id/title')
  1501. .with('text', 'LG Hidden Menu')
  1502.  
  1503. $ruiObj.click
  1504.  
  1505. waitsecond(1)
  1506. end
  1507.  
  1508. tcase << TestAction.new(:TextView_Title_87) do
  1509. $ruiObj = RUIObject.new.with('objectid', 684902757).with('selfid', 538152793).with('textdescid', -1915478867).with('uniqueparentid', 0).with('classresourceid', 490183159)
  1510. .with('uitreeindex', 4)
  1511. .with('classname', 'TextView')
  1512. .with('resource-id', 'android:id/title')
  1513. .with('text', 'Field Test')
  1514.  
  1515. $ruiObj.click
  1516.  
  1517. waitsecond(1)
  1518. end
  1519.  
  1520. tcase << TestAction.new(:TextView_Text1_10) do
  1521. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', -141259386).with('textdescid', -734720867).with('uniqueparentid', 0).with('classresourceid', 490068035)
  1522. .with('uitreeindex', 1)
  1523. .with('classname', 'TextView')
  1524. .with('resource-id', 'android:id/text1')
  1525. .with('text', 'Modem Settings')
  1526.  
  1527. $ruiObj.click
  1528.  
  1529. waitsecond(1)
  1530. end
  1531.  
  1532. tcase << TestAction.new(:swipeDown_12) do
  1533. swipe_vertical 500
  1534.  
  1535. waitsecond(1)
  1536. end
  1537.  
  1538. tcase << TestAction.new(:TextView_Text1_14) do
  1539. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', 12767364).with('textdescid', 1760273017).with('uniqueparentid', 0).with('classresourceid', 490068035)
  1540. .with('uitreeindex', 6)
  1541. .with('classname', 'TextView')
  1542. .with('resource-id', 'android:id/text1')
  1543. .with('text', 'RAT Selection')
  1544.  
  1545. $ruiObj.click
  1546.  
  1547. waitsecond(1)
  1548. end
  1549.  
  1550. tcase << TestAction.new(:TextView_Text1_2) do
  1551. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', 747569194).with('textdescid', -1653100487).with('uniqueparentid', 0).with('classresourceid', 490068035)
  1552. .with('uitreeindex', 1)
  1553. .with('classname', 'TextView')
  1554. .with('resource-id', 'android:id/text1')
  1555. .with('text', 'GSM WCDMA LTE auto')
  1556.  
  1557. $ruiObj.click
  1558.  
  1559. waitsecond(1)
  1560. end
  1561.  
  1562. tcase << TestAction.new(:Button_Button1_18) do
  1563. $ruiObj = RUIObject.new.with('objectid', 2089308220).with('selfid', -1318451484).with('textdescid', 1664978912).with('uniqueparentid', 0)
  1564. .with('uitreeindex', 1)
  1565. .with('classname', 'Button')
  1566. .with('resource-id', 'android:id/button1')
  1567. .with('text', 'OK')
  1568.  
  1569. $ruiObj.click
  1570.  
  1571. waitsecond(1)
  1572. end
  1573.  
  1574. tcase << TestAction.new(:pressBack_7) do
  1575. pressBack
  1576. end
  1577.  
  1578. tcase << TestAction.new(:pressBack_8) do
  1579. pressBack
  1580. end
  1581.  
  1582. tcase << TestAction.new(:pressBack_20) do
  1583. pressBack
  1584. end
  1585.  
  1586. tcase << TestAction.new(:pressBack_20_1) do
  1587. pressBack
  1588. end
  1589.  
  1590. tcase << TestAction.new(:pressHome_9) do
  1591. pressHome
  1592. end
  1593.  
  1594. tcase.run(loopTime)
  1595.  
  1596. end
  1597.  
  1598. def self.connectWifi(loopTime)
  1599.  
  1600. tcase = TestCase.new("connectWifi")
  1601.  
  1602. tcase << TestAction.new(:scriptAction_2) do
  1603. logStartTest("Connect_to_wifi")
  1604. end
  1605.  
  1606. tcase << TestAction.new(:gotoApp_4) do
  1607. gotoApp('Settings')
  1608. end
  1609.  
  1610. tcase << TestAction.new(:TextView_Title_27) do
  1611. $ruiObj = RUIObject.new.with('objectid', 674368800).with('selfid', -2078686330).with('textdescid', -957350501).with('uniqueparentid', 0)
  1612. .with('uitreeindex', 3)
  1613. .with('classname', 'TextView')
  1614. .with('resource-id', 'android:id/title')
  1615. .with('text', 'Networks')
  1616.  
  1617. $ruiObj.click
  1618.  
  1619. waitsecond(1)
  1620. end
  1621.  
  1622. tcase << TestAction.new(:swipeUp_8) do
  1623. swipe_vertical_back 500
  1624. end
  1625.  
  1626. tcase << TestAction.new(:TextView_Title_4) do
  1627. $ruiObj = RUIObject.new.with('objectid', 2008023572).with('selfid', -589731018).with('textdescid', 498664031).with('uniqueparentid', 0).with('classresourceid', 490183159)
  1628. .with('uitreeindex', 9)
  1629. .with('classname', 'TextView')
  1630. .with('resource-id', 'android:id/title')
  1631. .with('text', 'WiFi')
  1632.  
  1633. $ruiObj.click
  1634.  
  1635. waitsecond(1)
  1636. end
  1637.  
  1638. tcase << TestAction.new(:ImageView_Icon_6) do
  1639. $ruiObj = RUIObject.new.with('objectid', -1337042610).with('selfid', -1580627678).with('textdescid', 1501352082).with('uniqueparentid', 0).with('classresourceid', -858811928)
  1640. .with('uitreeindex', 10)
  1641. .with('pretext', 'Searching')
  1642. .with('classname', 'ImageView')
  1643. .with('resource-id', 'android:id/icon')
  1644.  
  1645. $ruiObj.isNotExist
  1646. ifFailJumpTo(:TextView_Title_10)
  1647.  
  1648. waitsecond(1)
  1649. end
  1650.  
  1651. tcase << TestAction.new(:Switch_ON_8) do
  1652. $ruiObj = RUIObject.new.with('objectid', 1178284996).with('selfid', 1645353587).with('textdescid', -1975291963).with('uniqueparentid', 0)
  1653. .with('uitreeindex', 2)
  1654. .with('classname', 'Switch')
  1655. .with('text', 'ON')
  1656.  
  1657. $ruiObj.click
  1658.  
  1659. waitsecond(1)
  1660. end
  1661.  
  1662. tcase << TestAction.new(:TextView_Title_10) do
  1663. $ruiObj = RUIObject.new.with('objectid', 1034430516).with('selfid', -71636208).with('textdescid', -1976912357).with('uniqueparentid', 0).with('classresourceid', 490183159)
  1664. .with('uitreeindex', 9)
  1665. .with('classname', 'TextView')
  1666. .with('resource-id', 'android:id/title')
  1667. .with('text', 'QCTCOMP')
  1668.  
  1669. $ruiObj.click
  1670.  
  1671. waitsecond(2)
  1672. end
  1673.  
  1674. tcase << TestAction.new(:EditText_Password_12) do
  1675. $ruiObj = RUIObject.new.with('objectid', -976316462).with('selfid', -2120332491).with('textdescid', -201039218).with('uniqueparentid', 0).with('classresourceid', -714852383)
  1676. .with('uitreeindex', 2)
  1677. .with('classname', 'EditText')
  1678. .with('resource-id', 'com.lge.wifisettings:id/password')
  1679.  
  1680. $ruiObj.inputtext('12abcdef34')
  1681.  
  1682. waitsecond(1)
  1683. end
  1684.  
  1685. tcase << TestAction.new(:Button_Button1_14) do
  1686. $ruiObj = RUIObject.new.with('objectid', -360890210).with('selfid', 736098498).with('textdescid', 503413208).with('uniqueparentid', 0)
  1687. .with('uitreeindex', 6)
  1688. .with('classname', 'Button')
  1689. .with('resource-id', 'android:id/button1')
  1690. .with('text', 'Connect')
  1691.  
  1692. $ruiObj.click
  1693.  
  1694. waitsecond(4)
  1695. end
  1696.  
  1697. tcase << TestAction.new(:TextView_Summary_16) do
  1698. $ruiObj = RUIObject.new.with('objectid', 1399891586).with('selfid', -404041766).with('textdescid', 623785653).with('uniqueparentid', 0).with('classresourceid', -1930775675)
  1699. .with('uitreeindex', 10)
  1700. .with('classname', 'TextView')
  1701. .with('resource-id', 'android:id/summary')
  1702. .with('text', 'Connected')
  1703.  
  1704. $ruiObj.isExist
  1705. end
  1706.  
  1707. tcase << TestAction.new(:scriptAction_23_TrueFalse) do
  1708. $myTestResult = checkLastExistResult
  1709.  
  1710. if $myTestResult == false
  1711. $myFailReason == "WiFi cannot connected"
  1712. end
  1713. logStopTest("Connect_to_wifi")
  1714. end
  1715.  
  1716. tcase << TestAction.new(:pressBack_15) do
  1717. pressBack
  1718. end
  1719.  
  1720. tcase << TestAction.new(:pressBack_16) do
  1721. pressBack
  1722. end
  1723.  
  1724. tcase << TestAction.new(:pressHome_17) do
  1725. pressHome
  1726. end
  1727.  
  1728. tcase.run(loopTime)
  1729.  
  1730. end
  1731.  
  1732. def self.endcall(loopTime)
  1733.  
  1734. tcase = TestCase.new("endcall")
  1735.  
  1736. tcase << TestAction.new(:scriptAction_3) do
  1737.  
  1738. UiDevice.getInstance.openNotification()
  1739.  
  1740. waitsecond(2)
  1741. end
  1742.  
  1743. tcase << TestAction.new(:swipeDown_2) do
  1744. swipe_vertical 500
  1745.  
  1746. waitsecond(2)
  1747. end
  1748.  
  1749. tcase << TestAction.new(:clickXY_1136_628_1) do
  1750. click(1136,628)
  1751.  
  1752. waitsecond(2)
  1753. end
  1754.  
  1755. tcase << TestAction.new(:pressRecentApps_2) do
  1756. pressRecentApps
  1757.  
  1758. waitsecond(2)
  1759. end
  1760.  
  1761. tcase << TestAction.new(:pressHome_4) do
  1762. pressHome
  1763.  
  1764. waitsecond(2)
  1765. end
  1766.  
  1767. tcase.run(loopTime)
  1768.  
  1769. end
  1770.  
  1771. def self.idle_wait(loopTime)
  1772.  
  1773. tcase = TestCase.new("idle_wait")
  1774.  
  1775. tcase << TestAction.new(:wait32second_1) do
  1776. waitsecond(300)
  1777. end
  1778.  
  1779. tcase << TestAction.new(:pressHome_2) do
  1780. pressHome
  1781.  
  1782. waitsecond(2)
  1783. end
  1784.  
  1785. tcase << TestAction.new(:wait32second_1_1) do
  1786. waitsecond(300)
  1787. end
  1788.  
  1789. tcase << TestAction.new(:pressHome_4) do
  1790. pressHome
  1791.  
  1792. waitsecond(2)
  1793. end
  1794.  
  1795. tcase << TestAction.new(:wait32second_1_1_1) do
  1796. waitsecond(300)
  1797. end
  1798.  
  1799. tcase << TestAction.new(:pressHome_6) do
  1800. pressHome
  1801.  
  1802. waitsecond(2)
  1803. end
  1804.  
  1805. tcase << TestAction.new(:wait32second_1_1_1_1) do
  1806. waitsecond(300)
  1807. end
  1808.  
  1809. tcase << TestAction.new(:pressHome_8) do
  1810. pressHome
  1811.  
  1812. waitsecond(2)
  1813. end
  1814.  
  1815. tcase << TestAction.new(:wait32second_1_1_1_1_1) do
  1816. waitsecond(300)
  1817. end
  1818.  
  1819. tcase << TestAction.new(:pressHome_10) do
  1820. pressHome
  1821.  
  1822. waitsecond(2)
  1823. end
  1824.  
  1825. tcase << TestAction.new(:wait32second_1_1_1_1_1_1) do
  1826. waitsecond(300)
  1827. end
  1828.  
  1829. tcase.run(loopTime)
  1830.  
  1831. end
  1832.  
  1833. def self.ltecall_ExpHandler(loopTime)
  1834.  
  1835. tcase = TestCase.new("ltecall_ExpHandler")
  1836.  
  1837. tcase << TestAction.new(:wait1second_1) do
  1838. waitsecond(1)
  1839. end
  1840.  
  1841. tcase << TestAction.new(:scriptAction_2) do
  1842. puts "Detected Incomming Call"
  1843. $UIDev.swipe(200,$UIDev.getDisplayHeight-300,$UIDev.getDisplayWidth-50,$UIDev.getDisplayHeight-300,10)
  1844.  
  1845. waitsecond(2)
  1846. end
  1847.  
  1848. tcase << TestAction.new(:wait2second_3) do
  1849. waitsecond(2)
  1850. end
  1851.  
  1852. tcase.run(loopTime)
  1853.  
  1854. end
  1855.  
  1856. def self.wifi(loopTime)
  1857.  
  1858. tcase = TestCase.new("wifi")
  1859.  
  1860. tcase << TestAction.new(:gotoApp_1) do
  1861. gotoApp('Settings')
  1862. end
  1863.  
  1864. tcase << TestAction.new(:TextView_Title_25) do
  1865. $ruiObj = RUIObject.new.with('objectid', 773617948).with('selfid', -2078686330).with('textdescid', 405839511).with('uniqueparentid', 0)
  1866. .with('uitreeindex', 3)
  1867. .with('classname', 'TextView')
  1868. .with('resource-id', 'android:id/title')
  1869. .with('text', 'Networks')
  1870.  
  1871. $ruiObj.click
  1872.  
  1873. waitsecond(1)
  1874. end
  1875.  
  1876. tcase << TestAction.new(:TextView_Title_2) do
  1877. $ruiObj = RUIObject.new.with('objectid', 2008023572).with('selfid', -589731018).with('textdescid', 498664031).with('uniqueparentid', 0).with('classresourceid', 490183159)
  1878. .with('uitreeindex', 9)
  1879. .with('classname', 'TextView')
  1880. .with('resource-id', 'android:id/title')
  1881. .with('text', 'WiFi')
  1882.  
  1883. $ruiObj.click
  1884.  
  1885. waitsecond(1)
  1886. end
  1887.  
  1888. tcase << TestAction.new(:check_wifi_on) do
  1889. $ruiObj = RUIObject.new.with('objectid', 1391628862).with('selfid', 1193786863).with('textdescid', 936938386).with('uniqueparentid', 0).with('classresourceid', 490183159)
  1890. .with('uitreeindex', 7)
  1891. .with('classname', 'TextView')
  1892. .with('resource-id', 'android:id/title')
  1893. .with('text', 'WIFI NETWORKS')
  1894.  
  1895. $ruiObj.isNotExist
  1896. ifFailJumpTo(:check_wifi_added)
  1897.  
  1898. waitsecond(1)
  1899. end
  1900.  
  1901. tcase << TestAction.new(:Switch_OFF_2) do
  1902. $ruiObj = RUIObject.new.with('objectid', 1178284996).with('selfid', -533646533).with('textdescid', -1104515187).with('uniqueparentid', 0)
  1903. .with('uitreeindex', 2)
  1904. .with('classname', 'Switch')
  1905. .with('text', 'OFF')
  1906.  
  1907. $ruiObj.click
  1908.  
  1909. waitsecond(2)
  1910. end
  1911.  
  1912. tcase << TestAction.new(:check_wifi_added) do
  1913. $ruiObj = RUIObject.new.with('objectid', -1789239232).with('selfid', -789618896).with('textdescid', 272817007).with('uniqueparentid', 0).with('classresourceid', 490183159)
  1914. .with('uitreeindex', 15)
  1915. .with('classname', 'TextView')
  1916. .with('resource-id', 'android:id/title')
  1917. .with('text', 'qctcomp')
  1918.  
  1919. $ruiObj.isNotExist
  1920. ifFailJumpTo(:TextView_Title_27_1)
  1921.  
  1922. waitsecond(1)
  1923. end
  1924.  
  1925. tcase << TestAction.new(:ImageButton_More_12) do
  1926. $ruiObj = RUIObject.new.with('objectid', 1634319278).with('selfid', 1290820192).with('textdescid', 371464933).with('uniqueparentid', 0)
  1927. .with('uitreeindex', 3)
  1928. .with('classname', 'ImageButton')
  1929. .with('content-desc', 'More options')
  1930.  
  1931. $ruiObj.click
  1932.  
  1933. waitsecond(1)
  1934. end
  1935.  
  1936. tcase << TestAction.new(:TextView_Title_14) do
  1937. $ruiObj = RUIObject.new.with('objectid', -1984796814).with('selfid', -392058123).with('textdescid', -1929502754).with('uniqueparentid', 0).with('classresourceid', 490183159)
  1938. .with('uitreeindex', 0)
  1939. .with('classname', 'TextView')
  1940. .with('resource-id', 'android:id/title')
  1941. .with('text', 'Add WiFi')
  1942.  
  1943. $ruiObj.click
  1944.  
  1945. waitsecond(1)
  1946. end
  1947.  
  1948. tcase << TestAction.new(:EditText_Ssid_16) do
  1949. $ruiObj = RUIObject.new.with('objectid', 1745689399).with('selfid', 1359933717).with('textdescid', -1718203447).with('uniqueparentid', 0).with('classresourceid', -1413606463)
  1950. .with('uitreeindex', 2)
  1951. .with('classname', 'EditText')
  1952. .with('resource-id', 'com.lge.wifisettings:id/ssid')
  1953.  
  1954. $ruiObj.inputtext('qctcomp')
  1955.  
  1956. waitsecond(1)
  1957. end
  1958.  
  1959. tcase << TestAction.new(:Button_Button1_18) do
  1960. $ruiObj = RUIObject.new.with('objectid', -360890210).with('selfid', -210572094).with('textdescid', 1221395928).with('uniqueparentid', 0)
  1961. .with('uitreeindex', 7)
  1962. .with('classname', 'Button')
  1963. .with('resource-id', 'android:id/button1')
  1964. .with('text', 'CONNECT')
  1965.  
  1966. $ruiObj.click
  1967.  
  1968. waitsecond(4)
  1969. end
  1970.  
  1971. tcase << TestAction.new(:TextView_Title_27_1) do
  1972. $ruiObj = RUIObject.new.with('objectid', -1789239232).with('selfid', -789618896).with('textdescid', 272817007).with('uniqueparentid', 0).with('classresourceid', 490183159)
  1973. .with('uitreeindex', 9)
  1974. .with('classname', 'TextView')
  1975. .with('resource-id', 'android:id/title')
  1976. .with('text', 'qctcomp')
  1977.  
  1978. $ruiObj.click
  1979.  
  1980. waitsecond(1)
  1981. end
  1982.  
  1983. tcase << TestAction.new(:EditText_Password_4) do
  1984. $ruiObj = RUIObject.new.with('objectid', -976316462).with('selfid', -2120332491).with('textdescid', -201039218).with('uniqueparentid', 0).with('classresourceid', -714852383)
  1985. .with('uitreeindex', 2)
  1986. .with('classname', 'EditText')
  1987. .with('resource-id', 'com.lge.wifisettings:id/password')
  1988.  
  1989. $ruiObj.inputtext('12abcdef34')
  1990.  
  1991. waitsecond(1)
  1992. end
  1993.  
  1994. tcase << TestAction.new(:pressBack_7) do
  1995. pressBack
  1996.  
  1997. waitsecond(1)
  1998. end
  1999.  
  2000. tcase << TestAction.new(:Button_Button1_5) do
  2001. $ruiObj = RUIObject.new.with('objectid', -360890210).with('selfid', -210572094).with('textdescid', 1221395928).with('uniqueparentid', 0)
  2002. .with('uitreeindex', 6)
  2003. .with('classname', 'Button')
  2004. .with('resource-id', 'android:id/button1')
  2005. .with('text', 'CONNECT')
  2006.  
  2007. $ruiObj.click
  2008.  
  2009. waitsecond(1)
  2010. end
  2011.  
  2012. tcase << TestAction.new(:pressBack_12) do
  2013. pressBack
  2014. end
  2015.  
  2016. tcase << TestAction.new(:pressBack_13) do
  2017. pressBack
  2018. end
  2019.  
  2020. tcase << TestAction.new(:pressHome_14) do
  2021. pressHome
  2022. end
  2023.  
  2024. tcase.run(loopTime)
  2025.  
  2026. end
  2027.  
  2028. def self.wifiOff(loopTime)
  2029.  
  2030. tcase = TestCase.new("wifiOff")
  2031.  
  2032. tcase << TestAction.new(:gotoApp_1) do
  2033. gotoApp('Settings')
  2034. end
  2035.  
  2036. tcase << TestAction.new(:TextView_Title_21) do
  2037. $ruiObj = RUIObject.new.with('objectid', 773617948).with('selfid', -2078686330).with('textdescid', 405839511).with('uniqueparentid', 0)
  2038. .with('uitreeindex', 3)
  2039. .with('classname', 'TextView')
  2040. .with('resource-id', 'android:id/title')
  2041. .with('text', 'Networks')
  2042.  
  2043. $ruiObj.click
  2044.  
  2045. waitsecond(2)
  2046. end
  2047.  
  2048. tcase << TestAction.new(:TextView_Title_2) do
  2049. $ruiObj = RUIObject.new.with('objectid', 2008023572).with('selfid', -589731018).with('textdescid', 498664031).with('uniqueparentid', 0).with('classresourceid', 490183159)
  2050. .with('uitreeindex', 9)
  2051. .with('classname', 'TextView')
  2052. .with('resource-id', 'android:id/title')
  2053. .with('text', 'WiFi')
  2054.  
  2055. $ruiObj.click
  2056.  
  2057. waitsecond(2)
  2058. end
  2059.  
  2060. tcase << TestAction.new(:Switch_ON_4) do
  2061. $ruiObj = RUIObject.new.with('objectid', 1178284996).with('selfid', 1645353587).with('textdescid', -1975291963).with('uniqueparentid', 0)
  2062. .with('uitreeindex', 2)
  2063. .with('classname', 'Switch')
  2064. .with('text', 'ON')
  2065.  
  2066. $ruiObj.click
  2067.  
  2068. waitsecond(2)
  2069. end
  2070.  
  2071. tcase << TestAction.new(:pressBack_12) do
  2072. pressBack
  2073. end
  2074.  
  2075. tcase << TestAction.new(:pressBack_13) do
  2076. pressBack
  2077. end
  2078.  
  2079. tcase << TestAction.new(:pressHome_14) do
  2080. pressHome
  2081. end
  2082.  
  2083. tcase.run(loopTime)
  2084.  
  2085. end
  2086.  
  2087. def self.startTest(loopTime)
  2088.  
  2089. tcase = TestCase.new("startTest")
  2090.  
  2091. tcase << TestAction.new(:pressBack_1) do
  2092. pressBack
  2093. end
  2094.  
  2095. tcase << TestAction.new(:pressBack_2) do
  2096. pressBack
  2097. end
  2098.  
  2099. tcase << TestAction.new(:pressHome_3) do
  2100. pressHome
  2101. end
  2102.  
  2103. tcase.run(loopTime)
  2104.  
  2105. end
  2106.  
  2107. def self.Emails(loopTime)
  2108.  
  2109. tcase = TestCase.new("Emails")
  2110.  
  2111. tcase << TestAction.new(:gotoApp_1) do
  2112. gotoApp('Gmail')
  2113.  
  2114. waitsecond(2)
  2115. end
  2116.  
  2117. tcase << TestAction.new(:logstart) do
  2118. logStartTest("Emails")
  2119. end
  2120.  
  2121. tcase << TestAction.new(:gotogmail) do
  2122. $ruiObj = RUIObject.new
  2123. .with('classname', 'TextView')
  2124. .with('resource-id', 'com.google.android.gm:id/action_done')
  2125. .with('text', 'TAKE ME TO GMAIL')
  2126.  
  2127. $ruiObj.click
  2128.  
  2129. waitsecond(4)
  2130. end
  2131.  
  2132. tcase << TestAction.new(:click__compose) do
  2133. $ruiObj = RUIObject.new.with('objectid', 2010391035).with('selfid', 1808564263).with('textdescid', -481574643).with('uniqueparentid', 0)
  2134. .with('uitreeindex', 24)
  2135. .with('pretext', 'Primary')
  2136. .with('classname', 'ImageButton')
  2137. .with('resource-id', 'com.google.android.gm:id/compose_button')
  2138. .with('content-desc', 'Compose')
  2139.  
  2140. $ruiObj.click
  2141.  
  2142. waitsecond(2)
  2143. end
  2144.  
  2145. tcase << TestAction.new(:input_email) do
  2146. $ruiObj = RUIObject.new.with('objectid', 1308296701).with('selfid', 678761455).with('textdescid', 1902492099).with('uniqueparentid', 0).with('classresourceid', 1488875515)
  2147. .with('uitreeindex', 9)
  2148. .with('classname', 'MultiAutoCompleteTextView')
  2149. .with('resource-id', 'com.google.android.gm:id/to')
  2150.  
  2151. $ruiObj.inputtext('dvgats1@yahoo.com')
  2152.  
  2153. waitsecond(2)
  2154. end
  2155.  
  2156. tcase << TestAction.new(:pressEnter_2) do
  2157. pressEnter
  2158.  
  2159. waitsecond(2)
  2160. end
  2161.  
  2162. tcase << TestAction.new(:changethesubject) do
  2163. $ruiObj = RUIObject.new.with('objectid', -1492734634).with('selfid', -477614756).with('textdescid', 969866634).with('uniqueparentid', 0).with('classresourceid', 927865352)
  2164. .with('uitreeindex', 10)
  2165. .with('classname', 'EditText')
  2166. .with('resource-id', 'com.google.android.gm:id/subject')
  2167.  
  2168. $ruiObj.inputtext('Concurrency Test')
  2169.  
  2170. waitsecond(2)
  2171. end
  2172.  
  2173. tcase << TestAction.new(:click_compose) do
  2174. $ruiObj = RUIObject.new.with('objectid', -2101420856).with('selfid', -497970335).with('textdescid', 1027339414).with('uniqueparentid', 1227675605).with('classresourceid', 1815484335)
  2175. .with('uitreeindex', 14)
  2176. .with('classname', 'android.view.View')
  2177. .with('content-desc', 'Compose email')
  2178.  
  2179. $ruiObj.click
  2180.  
  2181. waitsecond(1)
  2182. end
  2183.  
  2184. tcase << TestAction.new(:compose_email) do
  2185. RUIObject.new.with('objectid', -2101420856).with('selfid', -497970335).with('textdescid', 1027339414).with('uniqueparentid', 1227675605).with('classresourceid', 1815484335)
  2186. .with('uitreeindex', 14)
  2187. .with('classname', 'android.view.View')
  2188. .with('content-desc', 'Compose email').inputtext("This is concurrency tests sending email during call.")
  2189.  
  2190. waitsecond(2)
  2191. end
  2192.  
  2193. tcase << TestAction.new(:send_email) do
  2194. $ruiObj = RUIObject.new.with('objectid', 1442003251).with('selfid', 2103341243).with('textdescid', -1481441995).with('uniqueparentid', 0)
  2195. .with('uitreeindex', 3)
  2196. .with('classname', 'TextView')
  2197. .with('resource-id', 'com.google.android.gm:id/send')
  2198. .with('content-desc', 'Send')
  2199.  
  2200. $ruiObj.click
  2201.  
  2202. waitsecond(2)
  2203. end
  2204.  
  2205. tcase << TestAction.new(:finishlog) do
  2206. logStopTest("Emails")
  2207. end
  2208.  
  2209. tcase << TestAction.new(:pressBack_7) do
  2210. pressBack
  2211. end
  2212.  
  2213. tcase << TestAction.new(:pressBack_8) do
  2214. pressBack
  2215. end
  2216.  
  2217. tcase << TestAction.new(:pressHome_9) do
  2218. pressHome
  2219. end
  2220.  
  2221. tcase.run(loopTime)
  2222.  
  2223. end
  2224.  
  2225. def self.Camera(loopTime)
  2226.  
  2227. tcase = TestCase.new("Camera")
  2228.  
  2229. tcase << TestAction.new(:gotoApp_1) do
  2230. gotoApp('Camera')
  2231.  
  2232. waitsecond(2)
  2233. end
  2234.  
  2235. tcase << TestAction.new(:logstart) do
  2236. logStartTest("Camera")
  2237. end
  2238.  
  2239. tcase << TestAction.new(:Button_CancelButton_8) do
  2240. $ruiObj = RUIObject.new.with('objectid', 2138780457).with('selfid', 765132311).with('textdescid', -782727157).with('uniqueparentid', 0)
  2241. .with('uitreeindex', 19)
  2242. .with('classname', 'Button')
  2243. .with('resource-id', 'com.lge.camera:id/cancel_button')
  2244. .with('text', 'LATER')
  2245.  
  2246. $ruiObj.click
  2247.  
  2248. waitsecond(1)
  2249. end
  2250.  
  2251. tcase << TestAction.new(:ImageButton_ShutterBottomComp_4) do
  2252. $ruiObj = RUIObject.new.with('objectid', -216722415).with('selfid', -92772729).with('textdescid', 1720830782).with('uniqueparentid', 0)
  2253. .with('uitreeindex', 5)
  2254. .with('classname', 'ImageButton')
  2255. .with('resource-id', 'com.lge.camera:id/shutter_bottom_comp')
  2256. .with('content-desc', 'Shutter')
  2257.  
  2258. $ruiObj.isExist
  2259.  
  2260. waitsecond(1)
  2261. end
  2262.  
  2263. tcase << TestAction.new(:ImageButton_ShutterBottomComp_4_1) do
  2264. $ruiObj = RUIObject.new.with('objectid', -216722415).with('selfid', -92772729).with('textdescid', 1720830782).with('uniqueparentid', 0)
  2265. .with('uitreeindex', 5)
  2266. .with('classname', 'ImageButton')
  2267. .with('resource-id', 'com.lge.camera:id/shutter_bottom_comp')
  2268. .with('content-desc', 'Shutter')
  2269.  
  2270. $ruiObj.click
  2271.  
  2272. waitsecond(1)
  2273. end
  2274.  
  2275. tcase << TestAction.new(:stoplog) do
  2276. $myTestResult = checkLastExistResult
  2277.  
  2278. if $myTestResult == false
  2279. $myFailReason = "End button not found"
  2280. end
  2281.  
  2282. logStopTest("Camera")
  2283. end
  2284.  
  2285. tcase << TestAction.new(:pressBack_5) do
  2286. pressBack
  2287. end
  2288.  
  2289. tcase << TestAction.new(:pressBack_6) do
  2290. pressBack
  2291. end
  2292.  
  2293. tcase << TestAction.new(:pressHome_7) do
  2294. pressHome
  2295. end
  2296.  
  2297. tcase.run(loopTime)
  2298.  
  2299. end
  2300.  
  2301. def self.GPS(loopTime)
  2302.  
  2303. tcase = TestCase.new("GPS")
  2304.  
  2305. tcase << TestAction.new(:gotoApp_1) do
  2306. gotoApp('Maps')
  2307.  
  2308. waitsecond(2)
  2309. end
  2310.  
  2311. tcase << TestAction.new(:logstart) do
  2312. logStartTest("GPS")
  2313. end
  2314.  
  2315. tcase << TestAction.new(:clear_tutorial) do
  2316. $ruiObj = RUIObject.new.with('objectid', 1791083849).with('selfid', -1089246754).with('textdescid', 1043246794).with('uniqueparentid', 0)
  2317. .with('uitreeindex', 3)
  2318. .with('classname', 'Button')
  2319. .with('resource-id', 'com.google.android.apps.maps:id/tutorial_side_menu_got_it')
  2320. .with('text', 'GOT IT')
  2321.  
  2322. $ruiObj.click
  2323.  
  2324. waitsecond(1)
  2325. end
  2326.  
  2327. tcase << TestAction.new(:accept_noti) do
  2328. $ruiObj = RUIObject.new.with('objectid', -2142217036).with('selfid', -411926495).with('textdescid', -336996923).with('uniqueparentid', 0).with('classresourceid', -938935918)
  2329. .with('uitreeindex', 3)
  2330. .with('classname', 'TextView')
  2331. .with('text', 'Accept continue')
  2332.  
  2333. $ruiObj.click
  2334. noFailCheck
  2335.  
  2336. waitsecond(2)
  2337. end
  2338.  
  2339. tcase << TestAction.new(:skip) do
  2340. $ruiObj = RUIObject.new.with('objectid', 1318191317).with('selfid', 343772849).with('textdescid', -671073450).with('uniqueparentid', 0).with('classresourceid', 2001146706)
  2341. .with('uitreeindex', 4)
  2342. .with('classname', 'Button')
  2343. .with('text', 'Skip')
  2344.  
  2345. $ruiObj.click
  2346. noFailCheck
  2347.  
  2348. waitsecond(2)
  2349. end
  2350.  
  2351. tcase << TestAction.new(:clear_noti) do
  2352. $ruiObj = RUIObject.new.with('objectid', 1493645968).with('selfid', 59009363).with('textdescid', -602195619).with('uniqueparentid', 0)
  2353. .with('uitreeindex', 10)
  2354. .with('classname', 'ImageView')
  2355. .with('content-desc', 'Clear')
  2356.  
  2357. $ruiObj.click
  2358. noFailCheck
  2359.  
  2360. waitsecond(2)
  2361. end
  2362.  
  2363. tcase << TestAction.new(:click_search) do
  2364. $ruiObj = RUIObject.new
  2365. .with('classname', 'TextView')
  2366. .with('text', 'Try restaurants coffee')
  2367.  
  2368. $ruiObj.click
  2369.  
  2370. waitsecond(2)
  2371. end
  2372.  
  2373. tcase << TestAction.new(:input_address) do
  2374. $ruiObj = RUIObject.new
  2375. .with('classname', 'EditText')
  2376. .with('resource-id', 'com.google.android.apps.maps:id/search_omnibox_edit_text')
  2377.  
  2378. $ruiObj.inputtext('3225 N Harbor Dr')
  2379.  
  2380. waitsecond(2)
  2381. end
  2382.  
  2383. tcase << TestAction.new(:pressEnter_2) do
  2384. pressEnter
  2385.  
  2386. waitsecond(4)
  2387. end
  2388.  
  2389. tcase << TestAction.new(:click_directions) do
  2390. $ruiObj = RUIObject.new
  2391. .with('classname', 'TextView')
  2392. .with('text', 'DIRECTIONS')
  2393.  
  2394. $ruiObj.click
  2395.  
  2396. waitsecond(2)
  2397. end
  2398.  
  2399. tcase << TestAction.new(:turn_on_gps) do
  2400. $ruiObj = RUIObject.new
  2401. .with('classname', 'Button')
  2402. .with('resource-id', 'android:id/button1')
  2403. .with('text', 'OK')
  2404.  
  2405. $ruiObj.click
  2406.  
  2407. waitsecond(8)
  2408. end
  2409.  
  2410. tcase << TestAction.new(:start_navigate) do
  2411. $ruiObj = RUIObject.new
  2412. .with('classname', 'TextView')
  2413. .with('text', 'START')
  2414.  
  2415. $ruiObj.click
  2416.  
  2417. waitsecond(2)
  2418. end
  2419.  
  2420. tcase << TestAction.new(:gotit_button) do
  2421. $ruiObj = RUIObject.new
  2422. .with('classname', 'Button')
  2423. .with('resource-id', 'android:id/button1')
  2424. .with('text', 'GOT IT')
  2425.  
  2426. $ruiObj.click
  2427.  
  2428. waitsecond(2)
  2429. end
  2430.  
  2431. tcase << TestAction.new(:ifimageexist) do
  2432. $ruiObj = RUIObject.new
  2433. .with('classname', 'ImageView')
  2434.  
  2435. $ruiObj.isExist
  2436.  
  2437. waitsecond(2)
  2438. end
  2439.  
  2440. tcase << TestAction.new(:stoplog) do
  2441. $myTestResult = checkLastExistResult
  2442.  
  2443. if $myTestResult == false
  2444. $myFailReason = "GPS is not working"
  2445. end
  2446.  
  2447. logStopTest("GPS")
  2448. end
  2449.  
  2450. tcase << TestAction.new(:pressBack_10) do
  2451. pressBack
  2452. end
  2453.  
  2454. tcase << TestAction.new(:pressBack_11) do
  2455. pressBack
  2456. end
  2457.  
  2458. tcase << TestAction.new(:pressBack_11_1) do
  2459. pressBack
  2460. end
  2461.  
  2462. tcase << TestAction.new(:pressBack_11_1_1) do
  2463. pressBack
  2464. end
  2465.  
  2466. tcase << TestAction.new(:pressHome_12) do
  2467. pressHome
  2468. end
  2469.  
  2470. tcase.run(loopTime)
  2471.  
  2472. end
  2473.  
  2474. def self.MMS(loopTime)
  2475.  
  2476. tcase = TestCase.new("MMS")
  2477.  
  2478. tcase << TestAction.new(:gotoApp_1) do
  2479. gotoApp('Messaging')
  2480.  
  2481. waitsecond(3)
  2482. end
  2483.  
  2484. tcase << TestAction.new(:allowtomessage) do
  2485. $ruiObj = RUIObject.new.with('objectid', -1492498299).with('selfid', 1443382411).with('textdescid', -1772738030).with('uniqueparentid', 0).with('classresourceid', -227364920)
  2486. .with('uitreeindex', 5)
  2487. .with('classname', 'Button')
  2488. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  2489. .with('text', 'ALLOW')
  2490.  
  2491. $ruiObj.click
  2492.  
  2493. waitsecond(1)
  2494. end
  2495.  
  2496. tcase << TestAction.new(:allow_permission) do
  2497. $ruiObj = RUIObject.new.with('objectid', -1492498299).with('selfid', 1443382411).with('textdescid', -1772738030).with('uniqueparentid', 0).with('classresourceid', -227364920)
  2498. .with('uitreeindex', 3)
  2499. .with('classname', 'Button')
  2500. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  2501. .with('text', 'ALLOW')
  2502.  
  2503. $ruiObj.click
  2504.  
  2505. waitsecond(1)
  2506. end
  2507.  
  2508. tcase << TestAction.new(:logstart) do
  2509. logStartTest("MMS")
  2510. end
  2511.  
  2512. tcase << TestAction.new(:start_newmessage) do
  2513. $ruiObj = RUIObject.new.with('objectid', -820305049).with('selfid', 1638137891).with('textdescid', 1158507182).with('uniqueparentid', 0)
  2514. .with('uitreeindex', 6)
  2515. .with('classname', 'ImageView')
  2516. .with('resource-id', 'com.android.mms:id/fab_img')
  2517. .with('content-desc', 'New message')
  2518.  
  2519. $ruiObj.click
  2520.  
  2521. waitsecond(2)
  2522. end
  2523.  
  2524. tcase << TestAction.new(:Put_A01a01_towhom) do
  2525. $ruiObj = RUIObject.new.with('objectid', 784817492).with('selfid', -1346021293).with('textdescid', -1440461492).with('uniqueparentid', 0).with('classresourceid', -1346021293)
  2526. .with('uitreeindex', 0)
  2527. .with('classname', 'MultiAutoCompleteTextView')
  2528.  
  2529. $ruiObj.inputtext('A01 a01')
  2530.  
  2531. waitsecond(3)
  2532. end
  2533.  
  2534. tcase << TestAction.new(:EditText_Enter_4) do
  2535. $ruiObj = RUIObject.new
  2536. .with('classname', 'EditText')
  2537. .with('content-desc', 'Enter message')
  2538.  
  2539. $ruiObj.inputtext('Testing "Concurrency tests"')
  2540.  
  2541. waitsecond(2)
  2542. end
  2543.  
  2544. tcase << TestAction.new(:click_attach) do
  2545. $ruiObj = RUIObject.new.with('objectid', 874172794).with('selfid', -1211001229).with('textdescid', -704319221).with('uniqueparentid', 0)
  2546. .with('uitreeindex', 13)
  2547. .with('pretext', 'Nov 17 912 PM')
  2548. .with('classname', 'ImageButton')
  2549. .with('resource-id', 'com.android.mms:id/attachButton_right')
  2550. .with('content-desc', 'Attach')
  2551.  
  2552. $ruiObj.click
  2553.  
  2554. waitsecond(2)
  2555. end
  2556.  
  2557. tcase << TestAction.new(:take_photo) do
  2558. $ruiObj = RUIObject.new
  2559. .with('classname', 'ImageView')
  2560. .with('resource-id', 'com.android.mms:id/icon')
  2561.  
  2562. $ruiObj.click
  2563.  
  2564. waitsecond(2)
  2565. end
  2566.  
  2567. tcase << TestAction.new(:Button_PermissionAllowButton_8) do
  2568. $ruiObj = RUIObject.new.with('objectid', -1492498299).with('selfid', 1443382411).with('textdescid', -1772738030).with('uniqueparentid', 0).with('classresourceid', -227364920)
  2569. .with('uitreeindex', 4)
  2570. .with('classname', 'Button')
  2571. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  2572. .with('text', 'ALLOW')
  2573.  
  2574. $ruiObj.click
  2575.  
  2576. waitsecond(1)
  2577. end
  2578.  
  2579. tcase << TestAction.new(:ImageButton_Show_10) do
  2580. $ruiObj = RUIObject.new.with('objectid', 1571666208).with('selfid', -929198491).with('textdescid', 2010273934).with('uniqueparentid', 0)
  2581. .with('uitreeindex', 0)
  2582. .with('classname', 'ImageButton')
  2583. .with('content-desc', 'Show roots')
  2584.  
  2585. $ruiObj.click
  2586.  
  2587. waitsecond(1)
  2588. end
  2589.  
  2590. tcase << TestAction.new(:TextView_Title_12) do
  2591. $ruiObj = RUIObject.new.with('objectid', -1941383373).with('selfid', 4082754).with('textdescid', 50769842).with('uniqueparentid', 0).with('classresourceid', 490183159)
  2592. .with('uitreeindex', 41)
  2593. .with('classname', 'TextView')
  2594. .with('resource-id', 'android:id/title')
  2595. .with('text', 'Photos')
  2596.  
  2597. $ruiObj.click
  2598.  
  2599. waitsecond(1)
  2600. end
  2601.  
  2602. tcase << TestAction.new(:TextView_Title_14) do
  2603. $ruiObj = RUIObject.new.with('objectid', -2074516409).with('selfid', -1484513934).with('textdescid', 889140747).with('uniqueparentid', 0)
  2604. .with('uitreeindex', 10)
  2605. .with('classname', 'TextView')
  2606. .with('resource-id', 'com.google.android.apps.photos:id/title')
  2607. .with('text', '1M')
  2608.  
  2609. $ruiObj.click
  2610.  
  2611. waitsecond(2)
  2612. end
  2613.  
  2614. tcase << TestAction.new(:clickXY_2295_7425_17) do
  2615. click(229.5,742.5)
  2616.  
  2617. waitsecond(1)
  2618. end
  2619.  
  2620. tcase << TestAction.new(:TextView_DoneButton_19) do
  2621. $ruiObj = RUIObject.new.with('objectid', -958387193).with('selfid', -885365197).with('textdescid', 1900114073).with('uniqueparentid', 0)
  2622. .with('uitreeindex', 11)
  2623. .with('classname', 'TextView')
  2624. .with('resource-id', 'com.google.android.apps.photos:id/done_button')
  2625. .with('content-desc', 'Done')
  2626. .with('text', 'DONE')
  2627.  
  2628. $ruiObj.click
  2629.  
  2630. waitsecond(2)
  2631. end
  2632.  
  2633. tcase << TestAction.new(:Button_SendButton_7) do
  2634. $ruiObj = RUIObject.new.with('objectid', -1077299784).with('selfid', -721945045).with('textdescid', 214167495).with('uniqueparentid', 0)
  2635. .with('uitreeindex', 10)
  2636. .with('classname', 'Button')
  2637. .with('resource-id', 'com.android.mms:id/send_button')
  2638. .with('text', 'Send
  2639. MMS')
  2640.  
  2641. $ruiObj.click
  2642.  
  2643. waitsecond(1)
  2644. end
  2645.  
  2646. tcase << TestAction.new(:Button_SendButtonText_21) do
  2647. $ruiObj = RUIObject.new
  2648. .with('classname', 'Button')
  2649. .with('content-desc', 'Send')
  2650. .with('text', 'Send')
  2651.  
  2652. $ruiObj.click
  2653.  
  2654. waitsecond(2)
  2655. end
  2656.  
  2657. tcase << TestAction.new(:scriptAction_8) do
  2658. logStopTest("MMS")
  2659. end
  2660.  
  2661. tcase << TestAction.new(:pressBack_10) do
  2662. pressBack
  2663. end
  2664.  
  2665. tcase << TestAction.new(:pressBack_11) do
  2666. pressBack
  2667. end
  2668.  
  2669. tcase << TestAction.new(:pressHome_12) do
  2670. pressHome
  2671. end
  2672.  
  2673. tcase.run(loopTime)
  2674.  
  2675. end
  2676.  
  2677. def self.exception_handler
  2678. puts "Module Exception Hanlder..."
  2679. if ($lastPackageName == "android")
  2680. android_ExpHandler(1)
  2681. elsif ($lastPackageName == "ltecall")
  2682. ltecall_ExpHandler(1)
  2683. end
  2684. end
  2685.  
  2686. def self.run(loop)
  2687. mainLoop loop
  2688. end
  2689.  
  2690. end
  2691.  
  2692. $exceptionPackageNameList = []
  2693. $exceptionPackageNameList_exclude = []
  2694. $exceptionPackageNameList << "android"
  2695. $exceptionPackageNameList << "ltecall"
  2696.  
  2697. def exception_handler
  2698. JUDY_UIENGINE_CONCURRENCY.exception_handler
  2699. end
  2700.  
  2701. $curProjectLogFile = $useLastLogFile
  2702.  
  2703. $curProjectLogFile = "JUDY_UIENGINE_CONCURRENCY_#{getTimeStamp}.log" if $useLastLogFile.nil?
  2704.  
  2705. $useLastLogFile = nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement