Advertisement
Guest User

Untitled

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