Advertisement
Guest User

Untitled

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