Advertisement
Guest User

Untitled

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