Advertisement
Guest User

Untitled

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