Advertisement
Guest User

Untitled

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