Advertisement
Guest User

Untitled

a guest
Aug 31st, 2017
424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 221.71 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_05(loopTime)
  3520.  
  3521. tcase = TestCase.new("MultiTasking_05_01_08_05")
  3522.  
  3523. tcase << TestAction.new(:scriptAction_StartTestLog) do
  3524. logStartTest("05_01_08_05_MultiTasking")
  3525. end
  3526.  
  3527. tcase << TestAction.new(:gotoApp_1_1) do
  3528. gotoApp('Contacts')
  3529.  
  3530. waitsecond(2)
  3531. end
  3532.  
  3533. tcase << TestAction.new(:gotoApp_1_2) do
  3534. gotoApp('Messaging')
  3535.  
  3536. waitsecond(2)
  3537. end
  3538.  
  3539. tcase << TestAction.new(:gotoApp_1_3) do
  3540. gotoApp('Phone')
  3541.  
  3542. waitsecond(2)
  3543. end
  3544.  
  3545. tcase << TestAction.new(:gotoApp_1_4) do
  3546. gotoApp('Play Store')
  3547.  
  3548. waitsecond(2)
  3549. end
  3550.  
  3551. tcase << TestAction.new(:gotoApp_2) do
  3552. gotoApp('Camera')
  3553.  
  3554. waitsecond(2)
  3555. end
  3556.  
  3557. tcase << TestAction.new(:gotoApp_1_5) do
  3558. gotoApp('Chrome')
  3559.  
  3560. waitsecond(2)
  3561. end
  3562.  
  3563. tcase << TestAction.new(:ImageButton_DocumentMenuButton_2) do
  3564. $ruiObj = RUIObject.new.with('objectid', -1808270022).with('selfid', -336731118).with('textdescid', -1833889831).with('uniqueparentid', 0)
  3565. .with('uitreeindex', 4)
  3566. .with('classname', 'ImageButton')
  3567. .with('resource-id', 'com.android.chrome:id/document_menu_button')
  3568. .with('content-desc', 'More options')
  3569.  
  3570. $ruiObj.isExist
  3571.  
  3572. waitsecond(1)
  3573. end
  3574.  
  3575. tcase << TestAction.new(:scriptAction_LogStopTest) do
  3576. $myTestResult = checkLastExistResult
  3577. if $myTestResult == false
  3578. $myFailReason = "End button not found"
  3579. end
  3580. logStopTest("05_01_08_05_MultiTasking")
  3581. end
  3582.  
  3583. tcase << TestAction.new(:pressBack_3) do
  3584. pressBack
  3585. end
  3586.  
  3587. tcase << TestAction.new(:pressBack_4) do
  3588. pressBack
  3589. end
  3590.  
  3591. tcase.run(loopTime)
  3592.  
  3593. end
  3594.  
  3595. def self.MultiTasking_05_01_08_06(loopTime)
  3596.  
  3597. tcase = TestCase.new("MultiTasking_05_01_08_06")
  3598.  
  3599. tcase << TestAction.new(:scriptAction_StartTestLog) do
  3600. logStartTest("05_01_08_06_MultiTasking")
  3601. end
  3602.  
  3603. tcase << TestAction.new(:gotoApp_1_1) do
  3604. gotoApp('Chrome')
  3605.  
  3606. waitsecond(2)
  3607. end
  3608.  
  3609. tcase << TestAction.new(:ImageButton_MenuButton_2) do
  3610. $ruiObj = RUIObject.new.with('objectid', 554731264).with('selfid', -17041368).with('textdescid', 1097269587).with('uniqueparentid', 0)
  3611. .with('uitreeindex', 84)
  3612. .with('classname', 'ImageButton')
  3613. .with('resource-id', 'com.android.chrome:id/menu_button')
  3614. .with('content-desc', 'More options')
  3615.  
  3616. $ruiObj.isExist
  3617.  
  3618. waitsecond(0)
  3619. end
  3620.  
  3621. tcase << TestAction.new(:scriptAction_LogStopTest) do
  3622. $myTestResult = checkLastExistResult
  3623.  
  3624. if $myTestResult == false
  3625. $myFailReason = "End button not found"
  3626. end
  3627. logStopTest("05_01_08_06_MultiTasking")
  3628. end
  3629.  
  3630. tcase << TestAction.new(:pressHome_1) do
  3631. pressHome
  3632. end
  3633.  
  3634. tcase.run(loopTime)
  3635.  
  3636. end
  3637.  
  3638. def self.NFC_05_01_11_01(loopTime)
  3639.  
  3640. tcase = TestCase.new("NFC_05_01_11_01")
  3641.  
  3642. tcase << TestAction.new(:scriptAction_StartTestLog) do
  3643. logStartTest("05_01_11_01_NFC")
  3644. end
  3645.  
  3646. tcase << TestAction.new(:gotoApp_3) do
  3647. gotoApp('Settings')
  3648.  
  3649. waitsecond(2)
  3650. end
  3651.  
  3652. tcase << TestAction.new(:TextView_Title_2) do
  3653. $ruiObj = RUIObject.new.with('objectid', 674368800).with('selfid', -2078686330).with('textdescid', -957350501).with('uniqueparentid', 0)
  3654. .with('uitreeindex', 2)
  3655. .with('classname', 'TextView')
  3656. .with('resource-id', 'android:id/title')
  3657. .with('text', 'Networks')
  3658.  
  3659. $ruiObj.click
  3660.  
  3661. waitsecond(1)
  3662. end
  3663.  
  3664. tcase << TestAction.new(:swipeDown_6) do
  3665. swipe_vertical 500
  3666.  
  3667. waitsecond(2)
  3668. end
  3669.  
  3670. tcase << TestAction.new(:TextView_Title_4) do
  3671. $ruiObj = RUIObject.new.with('objectid', -487328458).with('selfid', 347833004).with('textdescid', -1018549621).with('uniqueparentid', 0).with('classresourceid', 490183159)
  3672. .with('uitreeindex', 28)
  3673. .with('classname', 'TextView')
  3674. .with('resource-id', 'android:id/title')
  3675. .with('text', 'Share connect')
  3676.  
  3677. $ruiObj.click
  3678.  
  3679. waitsecond(1)
  3680. end
  3681.  
  3682. tcase << TestAction.new(:Switch_Switchwidget_25) do
  3683. $ruiObj = RUIObject.new.with('objectid', 2120363415).with('selfid', 2013927764).with('textdescid', -1882088).with('uniqueparentid', 0).with('classresourceid', -1664951417)
  3684. .with('uitreeindex', 7)
  3685. .with('classname', 'Switch')
  3686. .with('resource-id', 'com.android.settings:id/switchWidget')
  3687.  
  3688. $ruiObj.select('ItemFirst').click
  3689.  
  3690. waitsecond(2)
  3691. end
  3692.  
  3693. tcase << TestAction.new(:Button_Button1_5) do
  3694. $ruiObj = RUIObject.new.with('objectid', -1399075268).with('selfid', -1526282700).with('textdescid', -93090416).with('uniqueparentid', 0).with('classresourceid', 1834539358)
  3695. .with('uitreeindex', 3)
  3696. .with('classname', 'Button')
  3697. .with('resource-id', 'android:id/button1')
  3698. .with('text', 'TURN OFF')
  3699.  
  3700. $ruiObj.click
  3701.  
  3702. waitsecond(2)
  3703. end
  3704.  
  3705. tcase << TestAction.new(:wait8second_12) do
  3706. waitsecond(10)
  3707. end
  3708.  
  3709. tcase << TestAction.new(:Switch_Switchwidget_4) do
  3710. $ruiObj = RUIObject.new.with('objectid', 2120363415).with('selfid', 2013927764).with('textdescid', -1882088).with('uniqueparentid', 0).with('classresourceid', -1664951417)
  3711. .with('uitreeindex', 7)
  3712. .with('classname', 'Switch')
  3713. .with('resource-id', 'com.android.settings:id/switchWidget')
  3714.  
  3715. $ruiObj.select('ItemFirst').click
  3716.  
  3717. waitsecond(2)
  3718. end
  3719.  
  3720. tcase << TestAction.new(:wait8second_12_1) do
  3721. waitsecond(10)
  3722. end
  3723.  
  3724. tcase << TestAction.new(:pressBack_7) do
  3725. pressBack
  3726. end
  3727.  
  3728. tcase << TestAction.new(:pressBack_8) do
  3729. pressBack
  3730. end
  3731.  
  3732. tcase << TestAction.new(:pressBack_18) do
  3733. pressBack
  3734. end
  3735.  
  3736. tcase << TestAction.new(:pressBack_18_1) do
  3737. pressBack
  3738. end
  3739.  
  3740. tcase << TestAction.new(:pressHome_2) do
  3741. pressHome
  3742. end
  3743.  
  3744. tcase << TestAction.new(:scriptAction_LogStopTest) do
  3745. $myTestResult = checkLastExistResult
  3746.  
  3747. if $myTestResult == false
  3748. $myFailReason = "End button not found"
  3749. end
  3750. logStopTest("05_01_11_01_NFC")
  3751. end
  3752.  
  3753. tcase.run(loopTime)
  3754.  
  3755. end
  3756.  
  3757. def self.PIM_05_01_06_01(loopTime)
  3758.  
  3759. tcase = TestCase.new("PIM_05_01_06_01")
  3760.  
  3761. tcase << TestAction.new(:scriptAction_StartTestLog) do
  3762. logStartTest("05_01_06_01_PIM")
  3763. end
  3764.  
  3765. tcase << TestAction.new(:gotoApp_4) do
  3766. gotoApp('Calendar')
  3767.  
  3768. waitsecond(2)
  3769. end
  3770.  
  3771. tcase << TestAction.new(:ImageView_2) do
  3772. $ruiObj = RUIObject.new.with('objectid', 2064139909).with('selfid', 1125864064).with('textdescid', -436172229).with('uniqueparentid', 0)
  3773. .with('uitreeindex', 11)
  3774. .with('pretext', 'Tuesday Jun 13 2017?1')
  3775. .with('classname', 'ImageView')
  3776.  
  3777. $ruiObj.click
  3778.  
  3779. waitsecond(2)
  3780. end
  3781.  
  3782. tcase << TestAction.new(:EditText_Title_7) do
  3783. $ruiObj = RUIObject.new.with('objectid', -308497519).with('selfid', 2023914653).with('textdescid', -973488465).with('uniqueparentid', 0).with('classresourceid', 1943514993)
  3784. .with('uitreeindex', 4)
  3785. .with('classname', 'EditText')
  3786. .with('resource-id', 'com.android.calendar:id/title')
  3787.  
  3788. $ruiObj.inputtext('Event')
  3789.  
  3790. waitsecond(2)
  3791. end
  3792.  
  3793. tcase << TestAction.new(:Button_BtnDone_9) do
  3794. $ruiObj = RUIObject.new.with('objectid', 2099795980).with('selfid', 2133354936).with('textdescid', -644044497).with('uniqueparentid', 0)
  3795. .with('uitreeindex', 32)
  3796. .with('classname', 'Button')
  3797. .with('resource-id', 'com.android.calendar:id/btn_done')
  3798. .with('text', 'SAVE')
  3799.  
  3800. $ruiObj.click
  3801.  
  3802. waitsecond(2)
  3803. end
  3804.  
  3805. tcase << TestAction.new(:scriptAction_LogStopTest) do
  3806. $myTestResult = checkLastExistResult
  3807.  
  3808. if $myTestResult == false
  3809. $myFailReason = "End button not found"
  3810. end
  3811. logStopTest("05_01_06_01_PIM")
  3812. end
  3813.  
  3814. tcase << TestAction.new(:pressBack_14) do
  3815. pressBack
  3816. end
  3817.  
  3818. tcase << TestAction.new(:pressBack_16) do
  3819. pressBack
  3820. end
  3821.  
  3822. tcase << TestAction.new(:pressHome_2) do
  3823. pressHome
  3824. end
  3825.  
  3826. tcase.run(loopTime)
  3827.  
  3828. end
  3829.  
  3830. def self.PIM_05_01_06_02(loopTime)
  3831.  
  3832. tcase = TestCase.new("PIM_05_01_06_02")
  3833.  
  3834. tcase << TestAction.new(:scriptAction_StartTestLog) do
  3835. logStartTest("05_01_06_02_PIM")
  3836. end
  3837.  
  3838. tcase << TestAction.new(:gotoApp_21) do
  3839. gotoApp('Clock')
  3840.  
  3841. waitsecond(2)
  3842. end
  3843.  
  3844. tcase << TestAction.new(:ImageView_Fab_2) do
  3845. $ruiObj = RUIObject.new.with('objectid', -476403250).with('selfid', -466463568).with('textdescid', -1883598830).with('uniqueparentid', 0)
  3846. .with('uitreeindex', 8)
  3847. .with('classname', 'ImageView')
  3848. .with('resource-id', 'com.lge.clock:id/fab')
  3849.  
  3850. $ruiObj.click
  3851.  
  3852. waitsecond(2)
  3853. end
  3854.  
  3855. tcase << TestAction.new(:Button_Savebutton_4) do
  3856. $ruiObj = RUIObject.new.with('objectid', -902674558).with('selfid', -575419535).with('textdescid', -816404443).with('uniqueparentid', 0)
  3857. .with('uitreeindex', 36)
  3858. .with('classname', 'Button')
  3859. .with('resource-id', 'com.lge.clock:id/saveButton')
  3860. .with('text', 'SAVE')
  3861.  
  3862. $ruiObj.click
  3863.  
  3864. waitsecond(2)
  3865. end
  3866.  
  3867. tcase << TestAction.new(:Switch_AlarmListItemButton_16) do
  3868. $ruiObj = RUIObject.new.with('objectid', -104098710).with('selfid', -385149075).with('textdescid', 1204227435).with('uniqueparentid', 0)
  3869. .with('uitreeindex', 10)
  3870. .with('classname', 'Switch')
  3871. .with('resource-id', 'com.lge.clock:id/alarm_list_item_button')
  3872. .with('text', 'ON')
  3873.  
  3874. $ruiObj.isExist
  3875.  
  3876. waitsecond(2)
  3877. end
  3878.  
  3879. tcase << TestAction.new(:scriptAction_LogStopTest) do
  3880. $myTestResult = checkLastExistResult
  3881.  
  3882. if $myTestResult == false
  3883. $myFailReason = "End button not found"
  3884. end
  3885. logStopTest("05_01_06_02_PIM")
  3886. end
  3887.  
  3888. tcase << TestAction.new(:pressBack_7) do
  3889. pressBack
  3890. end
  3891.  
  3892. tcase << TestAction.new(:pressBack_20) do
  3893. pressBack
  3894. end
  3895.  
  3896. tcase << TestAction.new(:pressHome_2) do
  3897. pressHome
  3898. end
  3899.  
  3900. tcase.run(loopTime)
  3901.  
  3902. end
  3903.  
  3904. def self.PIM_05_01_06_03(loopTime)
  3905.  
  3906. tcase = TestCase.new("PIM_05_01_06_03")
  3907.  
  3908. tcase << TestAction.new(:scriptAction_StartTestLog) do
  3909. logStartTest("05_01_06_03_PIM")
  3910.  
  3911. waitsecond(1)
  3912. end
  3913.  
  3914. tcase << TestAction.new(:gotoApp_2) do
  3915. gotoApp('Calendar')
  3916.  
  3917. waitsecond(1)
  3918. end
  3919.  
  3920. tcase << TestAction.new(:ImageButton_Open_2) do
  3921. $ruiObj = RUIObject.new.with('objectid', 1598382174).with('selfid', 1589392844).with('textdescid', -1452260343).with('uniqueparentid', 0)
  3922. .with('uitreeindex', 0)
  3923. .with('classname', 'ImageButton')
  3924. .with('content-desc', 'Open navigation drawer')
  3925.  
  3926. $ruiObj.click
  3927.  
  3928. waitsecond(2)
  3929. end
  3930.  
  3931. tcase << TestAction.new(:TextView_ButtonView_7) do
  3932. $ruiObj = RUIObject.new.with('objectid', 603982191).with('selfid', -270658080).with('textdescid', 1995102261).with('uniqueparentid', 0).with('classresourceid', 1399022470)
  3933. .with('uitreeindex', 25)
  3934. .with('classname', 'TextView')
  3935. .with('resource-id', 'com.android.calendar:id/button_view')
  3936. .with('text', 'Day')
  3937.  
  3938. $ruiObj.click
  3939.  
  3940. waitsecond(2)
  3941. end
  3942.  
  3943. tcase << TestAction.new(:ImageButton_More_9) do
  3944. $ruiObj = RUIObject.new.with('objectid', -612680593).with('selfid', 1290820192).with('textdescid', 366665732).with('uniqueparentid', 0)
  3945. .with('uitreeindex', 6)
  3946. .with('classname', 'ImageButton')
  3947. .with('content-desc', 'More options')
  3948.  
  3949. $ruiObj.click
  3950.  
  3951. waitsecond(2)
  3952. end
  3953.  
  3954. tcase << TestAction.new(:TextView_Title_11) do
  3955. $ruiObj = RUIObject.new.with('objectid', 188068915).with('selfid', -342341268).with('textdescid', 1772893384).with('uniqueparentid', 0).with('classresourceid', 490183159)
  3956. .with('uitreeindex', 0)
  3957. .with('classname', 'TextView')
  3958. .with('resource-id', 'android:id/title')
  3959. .with('text', 'Delete')
  3960.  
  3961. $ruiObj.click
  3962.  
  3963. waitsecond(2)
  3964. end
  3965.  
  3966. tcase << TestAction.new(:CheckBox_ActionSelectallCheckbox_16) do
  3967. $ruiObj = RUIObject.new.with('objectid', -855663087).with('selfid', 1343055516).with('textdescid', 1579914132).with('uniqueparentid', 0)
  3968. .with('uitreeindex', 0)
  3969. .with('classname', 'CheckBox')
  3970. .with('resource-id', 'com.android.calendar:id/action_selectall_checkbox')
  3971. .with('text', 'Select all')
  3972.  
  3973. $ruiObj.click
  3974.  
  3975. waitsecond(2)
  3976. end
  3977.  
  3978. tcase << TestAction.new(:Button_DeleteAgenda_18) do
  3979. $ruiObj = RUIObject.new.with('objectid', 572018530).with('selfid', 1307339797).with('textdescid', -303618793).with('uniqueparentid', 0)
  3980. .with('uitreeindex', 16)
  3981. .with('classname', 'Button')
  3982. .with('resource-id', 'com.android.calendar:id/delete_agenda')
  3983. .with('text', 'DELETE')
  3984.  
  3985. $ruiObj.click
  3986.  
  3987. waitsecond(2)
  3988. end
  3989.  
  3990. tcase << TestAction.new(:Button_Button1_20) do
  3991. $ruiObj = RUIObject.new.with('objectid', -122532739).with('selfid', 982364851).with('textdescid', 1617680178).with('uniqueparentid', 0)
  3992. .with('uitreeindex', 2)
  3993. .with('classname', 'Button')
  3994. .with('resource-id', 'android:id/button1')
  3995. .with('text', 'DELETE')
  3996.  
  3997. $ruiObj.click
  3998.  
  3999. waitsecond(2)
  4000. end
  4001.  
  4002. tcase << TestAction.new(:wait1second_22) do
  4003. waitsecond(1)
  4004. end
  4005.  
  4006. tcase << TestAction.new(:ImageButton_Open_24) do
  4007. $ruiObj = RUIObject.new.with('objectid', 1598382174).with('selfid', 1589392844).with('textdescid', -1452260343).with('uniqueparentid', 0)
  4008. .with('uitreeindex', 0)
  4009. .with('classname', 'ImageButton')
  4010. .with('content-desc', 'Open navigation drawer')
  4011.  
  4012. $ruiObj.click
  4013.  
  4014. waitsecond(2)
  4015. end
  4016.  
  4017. tcase << TestAction.new(:TextView_ButtonView_26) do
  4018. $ruiObj = RUIObject.new.with('objectid', 603982191).with('selfid', 1899312068).with('textdescid', 2008206737).with('uniqueparentid', 0).with('classresourceid', 1399022470)
  4019. .with('uitreeindex', 18)
  4020. .with('classname', 'TextView')
  4021. .with('resource-id', 'com.android.calendar:id/button_view')
  4022. .with('text', 'Month')
  4023.  
  4024. $ruiObj.click
  4025.  
  4026. waitsecond(2)
  4027. end
  4028.  
  4029. tcase << TestAction.new(:scriptAction_LogStopTest) do
  4030. $myTestResult = checkLastExistResult
  4031.  
  4032. if $myTestResult == false
  4033. $myFailReason = "End button not found"
  4034. end
  4035. logStopTest("05_01_06_03_PIM")
  4036. end
  4037.  
  4038. tcase << TestAction.new(:pressBack_9) do
  4039. pressBack
  4040. end
  4041.  
  4042. tcase << TestAction.new(:pressBack_28) do
  4043. pressBack
  4044. end
  4045.  
  4046. tcase << TestAction.new(:pressHome_2) do
  4047. pressHome
  4048. end
  4049.  
  4050. tcase.run(loopTime)
  4051.  
  4052. end
  4053.  
  4054. def self.PIM_05_01_06_04(loopTime)
  4055.  
  4056. tcase = TestCase.new("PIM_05_01_06_04")
  4057.  
  4058. tcase << TestAction.new(:scriptAction_StartTestLog) do
  4059. logStartTest("05_01_06_04_PIM")
  4060. end
  4061.  
  4062. tcase << TestAction.new(:gotoApp_21) do
  4063. gotoApp('Clock')
  4064.  
  4065. waitsecond(2)
  4066. end
  4067.  
  4068. tcase << TestAction.new(:TextView_DeleteAlarmMenu_5) do
  4069. $ruiObj = RUIObject.new.with('objectid', -627640121).with('selfid', 2100473433).with('textdescid', 1981482564).with('uniqueparentid', 0)
  4070. .with('uitreeindex', 1)
  4071. .with('classname', 'TextView')
  4072. .with('resource-id', 'com.lge.clock:id/delete_alarm_menu')
  4073. .with('content-desc', 'Delete')
  4074.  
  4075. $ruiObj.click
  4076.  
  4077. waitsecond(1)
  4078. end
  4079.  
  4080. tcase << TestAction.new(:Button_Button1_4) do
  4081. $ruiObj = RUIObject.new.with('objectid', -242247236).with('selfid', 982364851).with('textdescid', 1048802673).with('uniqueparentid', 0).with('classresourceid', 1834539358)
  4082. .with('uitreeindex', 2)
  4083. .with('classname', 'Button')
  4084. .with('resource-id', 'android:id/button1')
  4085. .with('text', 'DELETE')
  4086.  
  4087. $ruiObj.click
  4088.  
  4089. waitsecond(2)
  4090. end
  4091.  
  4092. tcase << TestAction.new(:TextView_NoContentsText_5) do
  4093. $ruiObj = RUIObject.new.with('objectid', -906561874).with('selfid', 2062356648).with('textdescid', -1982958191).with('uniqueparentid', 0)
  4094. .with('uitreeindex', 6)
  4095. .with('classname', 'TextView')
  4096. .with('resource-id', 'com.lge.clock:id/no_contents_text')
  4097. .with('text', 'No alarms')
  4098.  
  4099. $ruiObj.isExist
  4100.  
  4101. waitsecond(1)
  4102. end
  4103.  
  4104. tcase << TestAction.new(:pressBack_15) do
  4105. pressBack
  4106. end
  4107.  
  4108. tcase << TestAction.new(:pressBack_16) do
  4109. pressBack
  4110. end
  4111.  
  4112. tcase << TestAction.new(:pressHome_2) do
  4113. pressHome
  4114. end
  4115.  
  4116. tcase << TestAction.new(:scriptAction_LogStopTest) do
  4117. $myTestResult = checkLastExistResult
  4118.  
  4119. if $myTestResult == false
  4120. $myFailReason = "End button not found"
  4121. end
  4122. logStopTest("05_01_06_04_PIM")
  4123. end
  4124.  
  4125. tcase.run(loopTime)
  4126.  
  4127. end
  4128.  
  4129. def self.StoreFrontDownload_05_01_05_01(loopTime)
  4130.  
  4131. tcase = TestCase.new("StoreFrontDownload_05_01_05_01")
  4132.  
  4133. tcase << TestAction.new(:scriptAction_1) do
  4134. logStartTest("05_01_05_07_StoreFrontDownload")
  4135. end
  4136.  
  4137. tcase << TestAction.new(:gotoApp_2) do
  4138. gotoApp('Play Store')
  4139.  
  4140. waitsecond(1)
  4141. end
  4142.  
  4143. tcase << TestAction.new(:ImageView_SearchBoxIdleText_5) do
  4144. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
  4145. .with('uitreeindex', 32)
  4146. .with('classname', 'ImageView')
  4147. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  4148. .with('content-desc', 'Search')
  4149.  
  4150. $ruiObj.click
  4151.  
  4152. waitsecond(1)
  4153. end
  4154.  
  4155. tcase << TestAction.new(:EditText_SearchBoxTextInput_6) do
  4156. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
  4157. .with('uitreeindex', 32)
  4158. .with('classname', 'EditText')
  4159. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  4160.  
  4161. $ruiObj.inputtext('ColorNote')
  4162.  
  4163. waitsecond(1)
  4164. end
  4165.  
  4166. tcase << TestAction.new(:TextView_SuggestText_7_Click_ColorNote) do
  4167. $ruiObj = RUIObject.new.with('objectid', 193809363).with('selfid', 208620854).with('textdescid', 1052874934).with('uniqueparentid', 0)
  4168. .with('uitreeindex', 36)
  4169. .with('classname', 'TextView')
  4170. .with('resource-id', 'com.android.vending:id/suggest_text')
  4171. .with('text', 'ColorNote Notepad Notes')
  4172.  
  4173. $ruiObj.click
  4174.  
  4175. waitsecond(1)
  4176. end
  4177.  
  4178. tcase << TestAction.new(:TextView_LiTitle_2) do
  4179. $ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', -1969590474).with('textdescid', 83190698).with('uniqueparentid', 0)
  4180. .with('uitreeindex', 5)
  4181. .with('classname', 'TextView')
  4182. .with('resource-id', 'com.android.vending:id/li_title')
  4183. .with('content-desc', 'App: ColorNote Notepad Notes')
  4184. .with('text', 'ColorNote Notepad Notes')
  4185.  
  4186. $ruiObj.click
  4187.  
  4188. waitsecond(1)
  4189. end
  4190.  
  4191. tcase << TestAction.new(:Button_UninstallButton_15_pressed) do
  4192. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  4193. .with('uitreeindex', 7)
  4194. .with('classname', 'Button')
  4195. .with('resource-id', 'com.android.vending:id/uninstall_button')
  4196. .with('text', 'UNINSTALL')
  4197.  
  4198. $ruiObj.click
  4199.  
  4200. waitsecond(1)
  4201. end
  4202.  
  4203. tcase << TestAction.new(:Button_Button1_16_pressed_OK) do
  4204. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', 0)
  4205. .with('uitreeindex', 2)
  4206. .with('classname', 'Button')
  4207. .with('resource-id', 'android:id/button1')
  4208. .with('text', 'OK')
  4209.  
  4210. $ruiObj.click
  4211.  
  4212. waitsecond(8)
  4213. end
  4214.  
  4215. tcase << TestAction.new(:Button_BuyButton_1_1) do
  4216. $ruiObj = RUIObject.new.with('objectid', -329901969).with('selfid', -652886121).with('textdescid', 992432790).with('uniqueparentid', 0)
  4217. .with('uitreeindex', 7)
  4218. .with('classname', 'Button')
  4219. .with('resource-id', 'com.android.vending:id/buy_button')
  4220. .with('text', 'INSTALL')
  4221.  
  4222. $ruiObj.click
  4223.  
  4224. waitsecond(2)
  4225. end
  4226.  
  4227. tcase << TestAction.new(:Button_PositiveButton_2_1) do
  4228. $ruiObj = RUIObject.new.with('objectid', 1281581194).with('selfid', -1901489946).with('textdescid', -1976674237).with('uniqueparentid', 0)
  4229. .with('uitreeindex', 2)
  4230. .with('classname', 'Button')
  4231. .with('resource-id', 'com.android.vending:id/positive_button')
  4232. .with('text', 'CONTINUE')
  4233.  
  4234. $ruiObj.click
  4235.  
  4236. waitsecond(2)
  4237. end
  4238.  
  4239. tcase << TestAction.new(:scriptAction_CheckPass) do
  4240. $myTestResult = checkLastExistResult
  4241.  
  4242. if $myTestResult == false
  4243. $myFailReason == "Install Failed"
  4244. end
  4245. logStopTest("05_01_05_07_StoreFrontDownload")
  4246. end
  4247.  
  4248. tcase << TestAction.new(:pressBack_16) do
  4249. pressBack
  4250. end
  4251.  
  4252. tcase << TestAction.new(:pressBack_17) do
  4253. pressBack
  4254. end
  4255.  
  4256. tcase << TestAction.new(:pressHome_19) do
  4257. pressHome
  4258. end
  4259.  
  4260. tcase.run(loopTime)
  4261.  
  4262. end
  4263.  
  4264. def self.StoreFrontDownload_05_01_05_02(loopTime)
  4265.  
  4266. tcase = TestCase.new("StoreFrontDownload_05_01_05_02")
  4267.  
  4268. tcase << TestAction.new(:scriptAction_1) do
  4269. logStartTest("05_01_05_02_StoreFrontDownload")
  4270. end
  4271.  
  4272. tcase << TestAction.new(:gotoApp_2) do
  4273. gotoApp('Play Store')
  4274.  
  4275. waitsecond(8)
  4276. end
  4277.  
  4278. tcase << TestAction.new(:ImageView_SearchBoxIdleText_5) do
  4279. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
  4280. .with('uitreeindex', 32)
  4281. .with('classname', 'ImageView')
  4282. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  4283. .with('content-desc', 'Search')
  4284.  
  4285. $ruiObj.click
  4286.  
  4287. waitsecond(1)
  4288. end
  4289.  
  4290. tcase << TestAction.new(:EditText_SearchBoxTextInput_6) do
  4291. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
  4292. .with('uitreeindex', 32)
  4293. .with('classname', 'EditText')
  4294. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  4295.  
  4296. $ruiObj.inputtext('ColorNote')
  4297.  
  4298. waitsecond(1)
  4299. end
  4300.  
  4301. tcase << TestAction.new(:pressEnter_2) do
  4302. pressEnter
  4303.  
  4304. waitsecond(4)
  4305. end
  4306.  
  4307. tcase << TestAction.new(:TextView_LiTitle_4) do
  4308. $ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', -1969590474).with('textdescid', 83190698).with('uniqueparentid', 0)
  4309. .with('uitreeindex', 5)
  4310. .with('classname', 'TextView')
  4311. .with('resource-id', 'com.android.vending:id/li_title')
  4312. .with('content-desc', 'App: ColorNote Notepad Notes')
  4313. .with('text', 'ColorNote Notepad Notes')
  4314.  
  4315. $ruiObj.click
  4316.  
  4317. waitsecond(2)
  4318. end
  4319.  
  4320. tcase << TestAction.new(:Button_UninstallButton_UnInstall_exist) do
  4321. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  4322. .with('uitreeindex', 7)
  4323. .with('classname', 'Button')
  4324. .with('resource-id', 'com.android.vending:id/uninstall_button')
  4325. .with('text', 'UNINSTALL')
  4326.  
  4327. $ruiObj.isExist
  4328. ifFailJumpTo(:Button_BuyButton_1)
  4329.  
  4330. waitsecond(1)
  4331. end
  4332.  
  4333. tcase << TestAction.new(:Button_UninstallButton_UninstallCK_1) do
  4334. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  4335. .with('uitreeindex', 7)
  4336. .with('classname', 'Button')
  4337. .with('resource-id', 'com.android.vending:id/uninstall_button')
  4338. .with('text', 'UNINSTALL')
  4339.  
  4340. $ruiObj.click
  4341.  
  4342. waitsecond(1)
  4343. end
  4344.  
  4345. tcase << TestAction.new(:Button_Button1_Clk_OK) do
  4346. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', 0)
  4347. .with('uitreeindex', 2)
  4348. .with('classname', 'Button')
  4349. .with('resource-id', 'android:id/button1')
  4350. .with('text', 'OK')
  4351.  
  4352. $ruiObj.click
  4353.  
  4354. waitsecond(8)
  4355. end
  4356.  
  4357. tcase << TestAction.new(:Button_BuyButton_1) do
  4358. $ruiObj = RUIObject.new.with('objectid', 1237348910).with('selfid', -652886121).with('textdescid', 538738615).with('uniqueparentid', 0)
  4359. .with('uitreeindex', 7)
  4360. .with('classname', 'Button')
  4361. .with('resource-id', 'com.android.vending:id/buy_button')
  4362. .with('text', 'INSTALL')
  4363.  
  4364. $ruiObj.click
  4365.  
  4366. waitsecond(2)
  4367. end
  4368.  
  4369. tcase << TestAction.new(:Button_ContinueButton_2) do
  4370. $ruiObj = RUIObject.new.with('objectid', -1553570735).with('selfid', 1461394585).with('textdescid', 1663670089).with('uniqueparentid', 0)
  4371. .with('uitreeindex', 7)
  4372. .with('classname', 'Button')
  4373. .with('resource-id', 'com.android.vending:id/continue_button')
  4374. .with('text', 'ACCEPT')
  4375.  
  4376. $ruiObj.click
  4377.  
  4378. waitsecond(8)
  4379. end
  4380.  
  4381. tcase << TestAction.new(:Button_Button1_2) do
  4382. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', 1349887951).with('textdescid', -101886821).with('uniqueparentid', 0)
  4383. .with('uitreeindex', 1)
  4384. .with('classname', 'Button')
  4385. .with('resource-id', 'android:id/button1')
  4386. .with('text', 'Continue')
  4387.  
  4388. $ruiObj.click
  4389.  
  4390. waitsecond(8)
  4391. end
  4392.  
  4393. tcase << TestAction.new(:Button_UninstallButton_4) do
  4394. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  4395. .with('uitreeindex', 7)
  4396. .with('classname', 'Button')
  4397. .with('resource-id', 'com.android.vending:id/uninstall_button')
  4398. .with('text', 'UNINSTALL')
  4399.  
  4400. $ruiObj.isExist
  4401.  
  4402. waitsecond(1)
  4403. end
  4404.  
  4405. tcase << TestAction.new(:scriptAction_CheckPass) do
  4406. $myTestResult = checkLastExistResult
  4407.  
  4408. if $myTestResult == false
  4409. $myFailReason == "Install Failed"
  4410. end
  4411. logStopTest("05_01_05_02_StoreFrontDownload")
  4412. end
  4413.  
  4414. tcase << TestAction.new(:pressBack_16) do
  4415. pressBack
  4416. end
  4417.  
  4418. tcase << TestAction.new(:pressBack_17) do
  4419. pressBack
  4420. end
  4421.  
  4422. tcase << TestAction.new(:pressHome_19) do
  4423. pressHome
  4424. end
  4425.  
  4426. tcase.run(loopTime)
  4427.  
  4428. end
  4429.  
  4430. def self.StoreFrontDownload_05_01_05_04(loopTime)
  4431.  
  4432. tcase = TestCase.new("StoreFrontDownload_05_01_05_04")
  4433.  
  4434. tcase << TestAction.new(:scriptAction_1) do
  4435. logStartTest("05_01_05_07_StoreFrontDownload")
  4436. end
  4437.  
  4438. tcase << TestAction.new(:gotoApp_2) do
  4439. gotoApp('Play Store')
  4440.  
  4441. waitsecond(1)
  4442. end
  4443.  
  4444. tcase << TestAction.new(:ImageView_SearchBoxIdleText_5) do
  4445. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
  4446. .with('uitreeindex', 32)
  4447. .with('classname', 'ImageView')
  4448. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  4449. .with('content-desc', 'Search')
  4450.  
  4451. $ruiObj.click
  4452.  
  4453. waitsecond(1)
  4454. end
  4455.  
  4456. tcase << TestAction.new(:EditText_SearchBoxTextInput_6) do
  4457. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
  4458. .with('uitreeindex', 32)
  4459. .with('classname', 'EditText')
  4460. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  4461.  
  4462. $ruiObj.inputtext('ColorNote')
  4463.  
  4464. waitsecond(1)
  4465. end
  4466.  
  4467. tcase << TestAction.new(:TextView_SuggestText_7_Click_ColorNote) do
  4468. $ruiObj = RUIObject.new.with('objectid', 193809363).with('selfid', 208620854).with('textdescid', 1052874934).with('uniqueparentid', 0)
  4469. .with('uitreeindex', 36)
  4470. .with('classname', 'TextView')
  4471. .with('resource-id', 'com.android.vending:id/suggest_text')
  4472. .with('text', 'ColorNote Notepad Notes')
  4473.  
  4474. $ruiObj.click
  4475.  
  4476. waitsecond(1)
  4477. end
  4478.  
  4479. tcase << TestAction.new(:TextView_LiTitle_2) do
  4480. $ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', -1969590474).with('textdescid', 83190698).with('uniqueparentid', 0)
  4481. .with('uitreeindex', 5)
  4482. .with('classname', 'TextView')
  4483. .with('resource-id', 'com.android.vending:id/li_title')
  4484. .with('content-desc', 'App: ColorNote Notepad Notes')
  4485. .with('text', 'ColorNote Notepad Notes')
  4486.  
  4487. $ruiObj.click
  4488.  
  4489. waitsecond(1)
  4490. end
  4491.  
  4492. tcase << TestAction.new(:Button_UninstallButton_15_pressed) do
  4493. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  4494. .with('uitreeindex', 7)
  4495. .with('classname', 'Button')
  4496. .with('resource-id', 'com.android.vending:id/uninstall_button')
  4497. .with('text', 'UNINSTALL')
  4498.  
  4499. $ruiObj.click
  4500.  
  4501. waitsecond(1)
  4502. end
  4503.  
  4504. tcase << TestAction.new(:Button_Button1_16_pressed_OK) do
  4505. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', 0)
  4506. .with('uitreeindex', 2)
  4507. .with('classname', 'Button')
  4508. .with('resource-id', 'android:id/button1')
  4509. .with('text', 'OK')
  4510.  
  4511. $ruiObj.click
  4512.  
  4513. waitsecond(8)
  4514. end
  4515.  
  4516. tcase << TestAction.new(:Button_BuyButton_1_1) do
  4517. $ruiObj = RUIObject.new.with('objectid', -329901969).with('selfid', -652886121).with('textdescid', 992432790).with('uniqueparentid', 0)
  4518. .with('uitreeindex', 7)
  4519. .with('classname', 'Button')
  4520. .with('resource-id', 'com.android.vending:id/buy_button')
  4521. .with('text', 'INSTALL')
  4522.  
  4523. $ruiObj.click
  4524.  
  4525. waitsecond(2)
  4526. end
  4527.  
  4528. tcase << TestAction.new(:scriptAction_CheckPass) do
  4529. $myTestResult = checkLastExistResult
  4530.  
  4531. if $myTestResult == false
  4532. $myFailReason == "Install Failed"
  4533. end
  4534. logStopTest("05_01_05_07_StoreFrontDownload")
  4535. end
  4536.  
  4537. tcase << TestAction.new(:pressBack_16) do
  4538. pressBack
  4539. end
  4540.  
  4541. tcase << TestAction.new(:pressBack_17) do
  4542. pressBack
  4543. end
  4544.  
  4545. tcase << TestAction.new(:pressHome_19) do
  4546. pressHome
  4547. end
  4548.  
  4549. tcase.run(loopTime)
  4550.  
  4551. end
  4552.  
  4553. def self.StoreFrontDownload_05_01_05_05(loopTime)
  4554.  
  4555. tcase = TestCase.new("StoreFrontDownload_05_01_05_05")
  4556.  
  4557. tcase << TestAction.new(:scriptAction_1) do
  4558. logStartTest("05_01_05_05_StoreFrontDownload")
  4559. end
  4560.  
  4561. tcase << TestAction.new(:gotoApp_2) do
  4562. gotoApp('ColorNote')
  4563.  
  4564. waitsecond(2)
  4565. end
  4566.  
  4567. tcase << TestAction.new(:Button_PermissionAllowButton_2) do
  4568. $ruiObj = RUIObject.new.with('objectid', -886457929).with('selfid', 1443382411).with('textdescid', 270556320).with('uniqueparentid', 0)
  4569. .with('uitreeindex', 3)
  4570. .with('classname', 'Button')
  4571. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  4572. .with('text', 'ALLOW')
  4573.  
  4574. $ruiObj.click
  4575.  
  4576. waitsecond(1)
  4577. end
  4578.  
  4579. tcase << TestAction.new(:TextView_EmptyText_AddNoteCK) do
  4580. $ruiObj = RUIObject.new.with('objectid', -1225710509).with('selfid', -126164144).with('textdescid', -1803056542).with('uniqueparentid', 0)
  4581. .with('uitreeindex', 6)
  4582. .with('classname', 'TextView')
  4583. .with('resource-id', 'com.socialnmobile.dictapps.notepad.color.note:id/empty_text')
  4584. .with('text', 'Add Note')
  4585.  
  4586. $ruiObj.isExist
  4587.  
  4588. waitsecond(1)
  4589. end
  4590.  
  4591. tcase << TestAction.new(:pressBack_4) do
  4592. pressBack
  4593. end
  4594.  
  4595. tcase << TestAction.new(:scriptAction_True_False) do
  4596. $myTestResult = checkLastExistResult
  4597.  
  4598. if $myTestResult == false
  4599. $myFailReason == "Store Front is not loaded"
  4600. end
  4601. logStopTest("05_01_05_05_StoreFrontDownload")
  4602. end
  4603.  
  4604. tcase << TestAction.new(:pressHome_1) do
  4605. pressHome
  4606. end
  4607.  
  4608. tcase.run(loopTime)
  4609.  
  4610. end
  4611.  
  4612. def self.StoreFrontDownload_05_01_05_06(loopTime)
  4613.  
  4614. tcase = TestCase.new("StoreFrontDownload_05_01_05_06")
  4615.  
  4616. tcase << TestAction.new(:scriptAction_1) do
  4617. logStartTest("05_01_05_06_StoreFrontDownload")
  4618. end
  4619.  
  4620. tcase << TestAction.new(:gotoApp_2) do
  4621. gotoApp('Play Store')
  4622.  
  4623. waitsecond(1)
  4624. end
  4625.  
  4626. tcase << TestAction.new(:ImageView_SearchBoxIdleText_12) do
  4627. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
  4628. .with('uitreeindex', 28)
  4629. .with('classname', 'ImageView')
  4630. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  4631. .with('content-desc', 'Search')
  4632.  
  4633. $ruiObj.click
  4634.  
  4635. waitsecond(1)
  4636. end
  4637.  
  4638. tcase << TestAction.new(:EditText_SearchBoxTextInput_13) do
  4639. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
  4640. .with('uitreeindex', 28)
  4641. .with('classname', 'EditText')
  4642. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  4643.  
  4644. $ruiObj.inputtext('ColorNote')
  4645.  
  4646. waitsecond(1)
  4647. end
  4648.  
  4649. tcase << TestAction.new(:TextView_SuggestText_16) do
  4650. $ruiObj = RUIObject.new.with('objectid', 193809363).with('selfid', 208620854).with('textdescid', 1052874934).with('uniqueparentid', 0)
  4651. .with('uitreeindex', 32)
  4652. .with('classname', 'TextView')
  4653. .with('resource-id', 'com.android.vending:id/suggest_text')
  4654. .with('text', 'ColorNote Notepad Notes')
  4655.  
  4656. $ruiObj.click
  4657.  
  4658. waitsecond(1)
  4659. end
  4660.  
  4661. tcase << TestAction.new(:TextView_LiTitle_2) do
  4662. $ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', -1969590474).with('textdescid', 83190698).with('uniqueparentid', 0)
  4663. .with('uitreeindex', 5)
  4664. .with('classname', 'TextView')
  4665. .with('resource-id', 'com.android.vending:id/li_title')
  4666. .with('content-desc', 'App: ColorNote Notepad Notes')
  4667. .with('text', 'ColorNote Notepad Notes')
  4668.  
  4669. $ruiObj.click
  4670.  
  4671. waitsecond(1)
  4672. end
  4673.  
  4674. tcase << TestAction.new(:Button_LaunchButton_18) do
  4675. $ruiObj = RUIObject.new.with('objectid', 515078971).with('selfid', 328139855).with('textdescid', 387228145).with('uniqueparentid', 0)
  4676. .with('uitreeindex', 8)
  4677. .with('classname', 'Button')
  4678. .with('resource-id', 'com.android.vending:id/launch_button')
  4679. .with('text', 'OPEN')
  4680.  
  4681. $ruiObj.click
  4682.  
  4683. waitsecond(1)
  4684. end
  4685.  
  4686. tcase << TestAction.new(:TextView_EmptyText_AddNoteCK) do
  4687. $ruiObj = RUIObject.new.with('objectid', -1225710509).with('selfid', -126164144).with('textdescid', -1803056542).with('uniqueparentid', 0)
  4688. .with('uitreeindex', 6)
  4689. .with('classname', 'TextView')
  4690. .with('resource-id', 'com.socialnmobile.dictapps.notepad.color.note:id/empty_text')
  4691. .with('text', 'Add Note')
  4692.  
  4693. $ruiObj.isExist
  4694.  
  4695. waitsecond(1)
  4696. end
  4697.  
  4698. tcase << TestAction.new(:Button_PermissionAllowButton_1_1) do
  4699. $ruiObj = RUIObject.new.with('objectid', -886457929).with('selfid', 1443382411).with('textdescid', 270556320).with('uniqueparentid', 0)
  4700. .with('uitreeindex', 3)
  4701. .with('classname', 'Button')
  4702. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  4703. .with('text', 'ALLOW')
  4704.  
  4705. $ruiObj.click
  4706.  
  4707. waitsecond(2)
  4708. end
  4709.  
  4710. tcase << TestAction.new(:pressBack_20) do
  4711. pressBack
  4712. end
  4713.  
  4714. tcase << TestAction.new(:scriptAction_22) do
  4715. $myTestResult = checkLastExistResult
  4716.  
  4717. if $myTestResult == false
  4718. $myFailReason == "Open DL app from Store Front Fail"
  4719. end
  4720. logStopTest("05_01_05_06_StoreFrontDownload")
  4721. end
  4722.  
  4723. tcase << TestAction.new(:pressBack_23) do
  4724. pressBack
  4725. end
  4726.  
  4727. tcase << TestAction.new(:pressBack_2) do
  4728. pressBack
  4729. end
  4730.  
  4731. tcase << TestAction.new(:pressHome_2) do
  4732. pressHome
  4733. end
  4734.  
  4735. tcase.run(loopTime)
  4736.  
  4737. end
  4738.  
  4739. def self.StoreFrontDownload_05_01_05_07(loopTime)
  4740.  
  4741. tcase = TestCase.new("StoreFrontDownload_05_01_05_07")
  4742.  
  4743. tcase << TestAction.new(:scriptAction_1) do
  4744. logStartTest("05_01_05_07_StoreFrontDownload")
  4745. end
  4746.  
  4747. tcase << TestAction.new(:gotoApp_2) do
  4748. gotoApp('Play Store')
  4749.  
  4750. waitsecond(1)
  4751. end
  4752.  
  4753. tcase << TestAction.new(:ImageView_SearchBoxIdleText_5) do
  4754. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
  4755. .with('uitreeindex', 32)
  4756. .with('classname', 'ImageView')
  4757. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  4758. .with('content-desc', 'Search')
  4759.  
  4760. $ruiObj.click
  4761.  
  4762. waitsecond(1)
  4763. end
  4764.  
  4765. tcase << TestAction.new(:EditText_SearchBoxTextInput_6) do
  4766. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
  4767. .with('uitreeindex', 32)
  4768. .with('classname', 'EditText')
  4769. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  4770.  
  4771. $ruiObj.inputtext('ColorNote')
  4772.  
  4773. waitsecond(1)
  4774. end
  4775.  
  4776. tcase << TestAction.new(:TextView_SuggestText_7_Click_ColorNote) do
  4777. $ruiObj = RUIObject.new.with('objectid', 193809363).with('selfid', 208620854).with('textdescid', 1052874934).with('uniqueparentid', 0)
  4778. .with('uitreeindex', 36)
  4779. .with('classname', 'TextView')
  4780. .with('resource-id', 'com.android.vending:id/suggest_text')
  4781. .with('text', 'ColorNote Notepad Notes')
  4782.  
  4783. $ruiObj.click
  4784.  
  4785. waitsecond(1)
  4786. end
  4787.  
  4788. tcase << TestAction.new(:TextView_LiTitle_2) do
  4789. $ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', -1969590474).with('textdescid', 83190698).with('uniqueparentid', 0)
  4790. .with('uitreeindex', 5)
  4791. .with('classname', 'TextView')
  4792. .with('resource-id', 'com.android.vending:id/li_title')
  4793. .with('content-desc', 'App: ColorNote Notepad Notes')
  4794. .with('text', 'ColorNote Notepad Notes')
  4795.  
  4796. $ruiObj.click
  4797.  
  4798. waitsecond(1)
  4799. end
  4800.  
  4801. tcase << TestAction.new(:Button_UninstallButton_15_pressed) do
  4802. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  4803. .with('uitreeindex', 7)
  4804. .with('classname', 'Button')
  4805. .with('resource-id', 'com.android.vending:id/uninstall_button')
  4806. .with('text', 'UNINSTALL')
  4807.  
  4808. $ruiObj.click
  4809.  
  4810. waitsecond(1)
  4811. end
  4812.  
  4813. tcase << TestAction.new(:Button_Button1_16_pressed_OK) do
  4814. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', 0)
  4815. .with('uitreeindex', 2)
  4816. .with('classname', 'Button')
  4817. .with('resource-id', 'android:id/button1')
  4818. .with('text', 'OK')
  4819.  
  4820. $ruiObj.click
  4821.  
  4822. waitsecond(8)
  4823. end
  4824.  
  4825. tcase << TestAction.new(:Button_BuyButton_18_Install) do
  4826. $ruiObj = RUIObject.new.with('objectid', 1237348910).with('selfid', -652886121).with('textdescid', 538738615).with('uniqueparentid', 0)
  4827. .with('uitreeindex', 7)
  4828. .with('classname', 'Button')
  4829. .with('resource-id', 'com.android.vending:id/buy_button')
  4830. .with('text', 'INSTALL')
  4831.  
  4832. $ruiObj.isExist
  4833.  
  4834. waitsecond(1)
  4835. end
  4836.  
  4837. tcase << TestAction.new(:scriptAction_CheckPass) do
  4838. $myTestResult = checkLastExistResult
  4839.  
  4840. if $myTestResult == false
  4841. $myFailReason == "Install Failed"
  4842. end
  4843. logStopTest("05_01_05_07_StoreFrontDownload")
  4844. end
  4845.  
  4846. tcase << TestAction.new(:pressBack_16) do
  4847. pressBack
  4848. end
  4849.  
  4850. tcase << TestAction.new(:pressBack_17) do
  4851. pressBack
  4852. end
  4853.  
  4854. tcase << TestAction.new(:pressHome_19) do
  4855. pressHome
  4856. end
  4857.  
  4858. tcase.run(loopTime)
  4859.  
  4860. end
  4861.  
  4862. def self.StoreFrontDownload_05_01_05_08(loopTime)
  4863.  
  4864. tcase = TestCase.new("StoreFrontDownload_05_01_05_08")
  4865.  
  4866. tcase << TestAction.new(:scriptAction_1) do
  4867. logStartTest("05_01_05_02_StoreFrontDownload")
  4868. end
  4869.  
  4870. tcase << TestAction.new(:gotoApp_2) do
  4871. gotoApp('Play Store')
  4872.  
  4873. waitsecond(8)
  4874. end
  4875.  
  4876. tcase << TestAction.new(:ImageView_SearchBoxIdleText_5) do
  4877. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
  4878. .with('uitreeindex', 32)
  4879. .with('classname', 'ImageView')
  4880. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  4881. .with('content-desc', 'Search')
  4882.  
  4883. $ruiObj.click
  4884.  
  4885. waitsecond(1)
  4886. end
  4887.  
  4888. tcase << TestAction.new(:EditText_SearchBoxTextInput_6) do
  4889. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
  4890. .with('uitreeindex', 32)
  4891. .with('classname', 'EditText')
  4892. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  4893.  
  4894. $ruiObj.inputtext('ColorNote')
  4895.  
  4896. waitsecond(1)
  4897. end
  4898.  
  4899. tcase << TestAction.new(:pressEnter_2) do
  4900. pressEnter
  4901.  
  4902. waitsecond(4)
  4903. end
  4904.  
  4905. tcase << TestAction.new(:TextView_LiTitle_2) do
  4906. $ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', -1969590474).with('textdescid', 83190698).with('uniqueparentid', 0)
  4907. .with('uitreeindex', 1)
  4908. .with('classname', 'TextView')
  4909. .with('resource-id', 'com.android.vending:id/li_title')
  4910. .with('content-desc', 'App: ColorNote Notepad Notes')
  4911. .with('text', 'ColorNote Notepad Notes')
  4912.  
  4913. $ruiObj.click
  4914.  
  4915. waitsecond(2)
  4916. end
  4917.  
  4918. tcase << TestAction.new(:Button_UninstallButton_UnInstall_exist) do
  4919. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  4920. .with('uitreeindex', 7)
  4921. .with('classname', 'Button')
  4922. .with('resource-id', 'com.android.vending:id/uninstall_button')
  4923. .with('text', 'UNINSTALL')
  4924.  
  4925. $ruiObj.isExist
  4926. ifFailJumpTo(:Button_BuyButton_1)
  4927.  
  4928. waitsecond(1)
  4929. end
  4930.  
  4931. tcase << TestAction.new(:Button_UninstallButton_UninstallCK_1) do
  4932. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  4933. .with('uitreeindex', 7)
  4934. .with('classname', 'Button')
  4935. .with('resource-id', 'com.android.vending:id/uninstall_button')
  4936. .with('text', 'UNINSTALL')
  4937.  
  4938. $ruiObj.click
  4939.  
  4940. waitsecond(1)
  4941. end
  4942.  
  4943. tcase << TestAction.new(:Button_Button1_Clk_OK) do
  4944. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', 0)
  4945. .with('uitreeindex', 2)
  4946. .with('classname', 'Button')
  4947. .with('resource-id', 'android:id/button1')
  4948. .with('text', 'OK')
  4949.  
  4950. $ruiObj.click
  4951.  
  4952. waitsecond(8)
  4953. end
  4954.  
  4955. tcase << TestAction.new(:Button_BuyButton_1) do
  4956. $ruiObj = RUIObject.new.with('objectid', 1237348910).with('selfid', -652886121).with('textdescid', 538738615).with('uniqueparentid', 0)
  4957. .with('uitreeindex', 7)
  4958. .with('classname', 'Button')
  4959. .with('resource-id', 'com.android.vending:id/buy_button')
  4960. .with('text', 'INSTALL')
  4961.  
  4962. $ruiObj.click
  4963.  
  4964. waitsecond(2)
  4965. end
  4966.  
  4967. tcase << TestAction.new(:Button_PositiveButton_4) do
  4968. $ruiObj = RUIObject.new.with('objectid', 1281581194).with('selfid', -1901489946).with('textdescid', -1976674237).with('uniqueparentid', 0)
  4969. .with('uitreeindex', 2)
  4970. .with('classname', 'Button')
  4971. .with('resource-id', 'com.android.vending:id/positive_button')
  4972. .with('text', 'CONTINUE')
  4973.  
  4974. $ruiObj.click
  4975.  
  4976. waitsecond(2)
  4977. end
  4978.  
  4979. tcase << TestAction.new(:wait1second_6) do
  4980. waitsecond(1)
  4981. end
  4982.  
  4983. tcase << TestAction.new(:Button_UninstallButton_4) do
  4984. $ruiObj = RUIObject.new.with('objectid', -1388871150).with('selfid', -895718918).with('textdescid', -1334831508).with('uniqueparentid', 0)
  4985. .with('uitreeindex', 7)
  4986. .with('classname', 'Button')
  4987. .with('resource-id', 'com.android.vending:id/uninstall_button')
  4988. .with('text', 'UNINSTALL')
  4989.  
  4990. $ruiObj.isExist
  4991.  
  4992. waitsecond(1)
  4993. end
  4994.  
  4995. tcase << TestAction.new(:scriptAction_CheckPass) do
  4996. $myTestResult = checkLastExistResult
  4997.  
  4998. if $myTestResult == false
  4999. $myFailReason == "Install Failed"
  5000. end
  5001. logStopTest("05_01_05_02_StoreFrontDownload")
  5002. end
  5003.  
  5004. tcase << TestAction.new(:pressBack_16) do
  5005. pressBack
  5006. end
  5007.  
  5008. tcase << TestAction.new(:pressBack_17) do
  5009. pressBack
  5010. end
  5011.  
  5012. tcase << TestAction.new(:pressHome_19) do
  5013. pressHome
  5014. end
  5015.  
  5016. tcase.run(loopTime)
  5017.  
  5018. end
  5019.  
  5020. def self.Telephony_05_01_01_01(loopTime)
  5021.  
  5022. tcase = TestCase.new("Telephony_05_01_01_01")
  5023.  
  5024. tcase << TestAction.new(:scriptAction_StartTest_1) do
  5025. logStartTest("05_01_01_01_Telephony")
  5026. end
  5027.  
  5028. tcase << TestAction.new(:pressHome_4) do
  5029. pressHome
  5030. end
  5031.  
  5032. tcase << TestAction.new(:TextView_Phone_2) do
  5033. $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
  5034. .with('uitreeindex', 9)
  5035. .with('classname', 'TextView')
  5036. .with('content-desc', 'Phone')
  5037. .with('text', 'Phone')
  5038.  
  5039. $ruiObj.click
  5040.  
  5041. waitsecond(1)
  5042. end
  5043.  
  5044. tcase << TestAction.new(:TextView_Tabtext_2) do
  5045. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
  5046. .with('uitreeindex', 4)
  5047. .with('classname', 'TextView')
  5048. .with('resource-id', 'com.android.contacts:id/tabText')
  5049. .with('text', 'Contacts')
  5050.  
  5051. $ruiObj.click
  5052.  
  5053. waitsecond(1)
  5054. end
  5055.  
  5056. tcase << TestAction.new(:TextView_MenuUnifiedSearch_2) do
  5057. $ruiObj = RUIObject.new.with('objectid', 706565921).with('selfid', 1315899886).with('textdescid', 449577447).with('uniqueparentid', 0)
  5058. .with('uitreeindex', 1)
  5059. .with('classname', 'TextView')
  5060. .with('resource-id', 'com.android.contacts:id/menu_unified_search')
  5061. .with('content-desc', 'Search')
  5062.  
  5063. $ruiObj.click
  5064.  
  5065. waitsecond(2)
  5066. end
  5067.  
  5068. tcase << TestAction.new(:EditText_SearchSrcText_4) do
  5069. $ruiObj = RUIObject.new.with('objectid', 588070375).with('selfid', -959326622).with('textdescid', -497243406).with('uniqueparentid', 0)
  5070. .with('uitreeindex', 6)
  5071. .with('classname', 'EditText')
  5072. .with('resource-id', 'android:id/search_src_text')
  5073. .with('content-desc', 'Search contacts')
  5074.  
  5075. $ruiObj.inputtext('A01')
  5076.  
  5077. waitsecond(1)
  5078. end
  5079.  
  5080. tcase << TestAction.new(:scriptAction_10_1) do
  5081. sendBTCmd('pressHome')
  5082. end
  5083.  
  5084. tcase << TestAction.new(:ImageView_Button1_2) do
  5085. $ruiObj = RUIObject.new.with('objectid', 527611238).with('selfid', 642784552).with('textdescid', -1695256388).with('uniqueparentid', 0).with('classresourceid', -1143292048)
  5086. .with('uitreeindex', 7)
  5087. .with('classname', 'ImageView')
  5088. .with('resource-id', 'android:id/button1')
  5089. .with('content-desc', 'Call A01 A01')
  5090.  
  5091. $ruiObj.click
  5092.  
  5093. waitsecond(12)
  5094. end
  5095.  
  5096. tcase << TestAction.new(:scriptAction_10) do
  5097. sendBTCmd('answerCall')
  5098.  
  5099. waitsecond(8)
  5100. end
  5101.  
  5102. tcase << TestAction.new(:scriptAction_10_1) do
  5103. sendBTCmd('endCall')
  5104.  
  5105. waitsecond(1)
  5106. end
  5107.  
  5108. tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
  5109. $myTestResult = checkLastBTCmdResult
  5110. if $myTestResult == false
  5111. $myFailReason = "Call not come to other dev"
  5112. end
  5113. logStopTest("05_01_01_01_Telephony")
  5114.  
  5115. end
  5116.  
  5117. tcase << TestAction.new(:Button_Endbutton_2) do
  5118. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  5119. .with('uitreeindex', 8)
  5120. .with('classname', 'Button')
  5121. .with('resource-id', 'com.android.incallui:id/endButton')
  5122. .with('text', 'End')
  5123.  
  5124. $ruiObj.click
  5125.  
  5126. waitsecond(1)
  5127. end
  5128.  
  5129. tcase << TestAction.new(:pressBack_3) do
  5130. pressBack
  5131. end
  5132.  
  5133. tcase << TestAction.new(:pressBack_4) do
  5134. pressBack
  5135. end
  5136.  
  5137. tcase.run(loopTime)
  5138.  
  5139. end
  5140.  
  5141. def self.Telephony_05_01_01_03(loopTime)
  5142.  
  5143. tcase = TestCase.new("Telephony_05_01_01_03")
  5144.  
  5145. tcase << TestAction.new(:scriptAction_StartTest_1) do
  5146. logStartTest("05_01_01_03_Telephony")
  5147. end
  5148.  
  5149. tcase << TestAction.new(:gotoApp_1_1) do
  5150. gotoApp('Phone')
  5151. end
  5152.  
  5153. tcase << TestAction.new(:TextView_Tabtext_2) do
  5154. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 715664122).with('textdescid', 24268628).with('uniqueparentid', 0)
  5155. .with('uitreeindex', 3)
  5156. .with('classname', 'TextView')
  5157. .with('resource-id', 'com.android.contacts:id/tabText')
  5158. .with('text', 'Call logs')
  5159.  
  5160. $ruiObj.click
  5161.  
  5162. waitsecond(2)
  5163. end
  5164.  
  5165. tcase << TestAction.new(:ImageView_SecondaryActionIcon_2) do
  5166. $ruiObj = RUIObject.new.with('objectid', 1053896352).with('selfid', -1241359936).with('textdescid', 579079266).with('uniqueparentid', 0).with('classresourceid', -550590844)
  5167. .with('uitreeindex', 10)
  5168. .with('pretext', 'Groups?0')
  5169. .with('classname', 'ImageView')
  5170. .with('resource-id', 'com.android.contacts:id/secondary_action_icon')
  5171. .with('content-desc', 'Call A01 a01')
  5172.  
  5173. $ruiObj.click
  5174.  
  5175. waitsecond(2)
  5176. end
  5177.  
  5178. tcase << TestAction.new(:wait8second_31) do
  5179. waitsecond(8)
  5180. end
  5181.  
  5182. tcase << TestAction.new(:scriptAction_10_1) do
  5183. sendBTCmd('answerCall')
  5184.  
  5185. waitsecond(8)
  5186. end
  5187.  
  5188. tcase << TestAction.new(:scriptAction_10_1_1) do
  5189. sendBTCmd('endCall')
  5190.  
  5191. waitsecond(1)
  5192. end
  5193.  
  5194. tcase << TestAction.new(:scriptAction_LogStopTest) do
  5195. $myTestResult = checkLastBTCmdResult
  5196. if $myTestResult == false
  5197. $myFailReason = "Call not come to other dev"
  5198. end
  5199. logStopTest("05_01_01_03_Telephony")
  5200.  
  5201. end
  5202.  
  5203. tcase << TestAction.new(:Button_Endbutton_6) do
  5204. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  5205. .with('uitreeindex', 8)
  5206. .with('classname', 'Button')
  5207. .with('resource-id', 'com.android.incallui:id/endButton')
  5208. .with('text', 'End')
  5209.  
  5210. $ruiObj.click
  5211.  
  5212. waitsecond(1)
  5213. end
  5214.  
  5215. tcase << TestAction.new(:pressBack_1) do
  5216. pressBack
  5217. end
  5218.  
  5219. tcase << TestAction.new(:pressBack_2) do
  5220. pressBack
  5221. end
  5222.  
  5223. tcase << TestAction.new(:pressHome_6) do
  5224. pressHome
  5225. end
  5226.  
  5227. tcase.run(loopTime)
  5228.  
  5229. end
  5230.  
  5231. def self.Telephony_05_01_01_05(loopTime)
  5232.  
  5233. tcase = TestCase.new("Telephony_05_01_01_05")
  5234.  
  5235. tcase << TestAction.new(:pressHome_2) do
  5236. pressHome
  5237. end
  5238.  
  5239. tcase << TestAction.new(:scriptAction_StartTestLog_1) do
  5240. logStartTest("05_01_01_05_Telephony")
  5241. end
  5242.  
  5243. tcase << TestAction.new(:scriptAction_BTMakeCall) do
  5244. sendBTCmd("makeCall(#{db('CallNumber')[0]}.to_s)")
  5245.  
  5246. waitsecond(8)
  5247. end
  5248.  
  5249. tcase << TestAction.new(:wait8second_12) do
  5250. waitsecond(18)
  5251. end
  5252.  
  5253. tcase << TestAction.new(:wait8second_14) do
  5254. waitsecond(8)
  5255. end
  5256.  
  5257. tcase << TestAction.new(:Button_Endbutton_2) do
  5258. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  5259. .with('uitreeindex', 10)
  5260. .with('classname', 'Button')
  5261. .with('resource-id', 'com.android.incallui:id/endButton')
  5262. .with('text', 'End')
  5263.  
  5264. $ruiObj.isNotExist
  5265. ifFailJumpTo(:Button_Endbutton_2_1)
  5266. end
  5267.  
  5268. tcase << TestAction.new(:answerSwipe_1) do
  5269. $UIDev.swipe(288,2083.5,828,1192.5,10)
  5270.  
  5271.  
  5272. waitsecond(8)
  5273. end
  5274.  
  5275. tcase << TestAction.new(:Button_Endbutton_2_1) do
  5276. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  5277. .with('uitreeindex', 10)
  5278. .with('classname', 'Button')
  5279. .with('resource-id', 'com.android.incallui:id/endButton')
  5280. .with('text', 'End')
  5281.  
  5282. $ruiObj.isExist
  5283.  
  5284. waitsecond(1)
  5285. end
  5286.  
  5287. tcase << TestAction.new(:scriptAction_LogStopTest_1) do
  5288. $myTestResult = checkLastExistResult
  5289. if $myTestResult == false
  5290. $myFailReason = "End button not found"
  5291. end
  5292. logStopTest("05_01_01_05_Telephony")
  5293.  
  5294. end
  5295.  
  5296. tcase << TestAction.new(:scriptAction_BTEndCall) do
  5297. sendBTCmd('endCall')
  5298. end
  5299.  
  5300. tcase << TestAction.new(:Button_Endbutton_2_1_1) do
  5301. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  5302. .with('uitreeindex', 10)
  5303. .with('classname', 'Button')
  5304. .with('resource-id', 'com.android.incallui:id/endButton')
  5305. .with('text', 'End')
  5306.  
  5307. $ruiObj.click
  5308.  
  5309. waitsecond(1)
  5310. end
  5311.  
  5312. tcase << TestAction.new(:pressBack_1) do
  5313. pressBack
  5314. end
  5315.  
  5316. tcase << TestAction.new(:pressBack_2) do
  5317. pressBack
  5318. end
  5319.  
  5320. tcase << TestAction.new(:pressHome_24) do
  5321. pressHome
  5322.  
  5323. waitsecond(2)
  5324. end
  5325.  
  5326. tcase.run(loopTime)
  5327.  
  5328. end
  5329.  
  5330. def self.Telephony_05_01_01_06(loopTime)
  5331.  
  5332. tcase = TestCase.new("Telephony_05_01_01_06")
  5333.  
  5334. tcase << TestAction.new(:scriptAction_StartTestLog) do
  5335. logStartTest("05_01_01_06_Telephony")
  5336. end
  5337.  
  5338. tcase << TestAction.new(:gotoApp_3) do
  5339. gotoApp('Phone')
  5340. end
  5341.  
  5342. tcase << TestAction.new(:TextView_Tabtext_2) do
  5343. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
  5344. .with('uitreeindex', 4)
  5345. .with('classname', 'TextView')
  5346. .with('resource-id', 'com.android.contacts:id/tabText')
  5347. .with('text', 'Contacts')
  5348.  
  5349. $ruiObj.click
  5350.  
  5351. waitsecond(2)
  5352. end
  5353.  
  5354. tcase << TestAction.new(:TextView_MenuUnifiedSearch_2) do
  5355. $ruiObj = RUIObject.new.with('objectid', 706565921).with('selfid', 1315899886).with('textdescid', 449577447).with('uniqueparentid', 0)
  5356. .with('uitreeindex', 1)
  5357. .with('classname', 'TextView')
  5358. .with('resource-id', 'com.android.contacts:id/menu_unified_search')
  5359. .with('content-desc', 'Search')
  5360.  
  5361. $ruiObj.click
  5362.  
  5363. waitsecond(2)
  5364. end
  5365.  
  5366. tcase << TestAction.new(:EditText_SearchSrcText_2) do
  5367. $ruiObj = RUIObject.new.with('objectid', 588070375).with('selfid', -959326622).with('textdescid', -497243406).with('uniqueparentid', 0)
  5368. .with('uitreeindex', 6)
  5369. .with('classname', 'EditText')
  5370. .with('resource-id', 'android:id/search_src_text')
  5371. .with('content-desc', 'Search contacts')
  5372.  
  5373. $ruiObj.inputtext('tn tn')
  5374.  
  5375. waitsecond(2)
  5376. end
  5377.  
  5378. tcase << TestAction.new(:TextView_tn_6) do
  5379. $ruiObj = RUIObject.new.with('objectid', 1836583107).with('selfid', -71120562).with('textdescid', 984860861).with('uniqueparentid', 0).with('classresourceid', -938935918)
  5380. .with('uitreeindex', 13)
  5381. .with('classname', 'TextView')
  5382. .with('content-desc', 'tn tn')
  5383. .with('text', 'tn tn')
  5384.  
  5385. $ruiObj.select('ItemFirst').click
  5386.  
  5387. waitsecond(1)
  5388. end
  5389.  
  5390. tcase << TestAction.new(:TextView_MenuDelete_2) do
  5391. $ruiObj = RUIObject.new.with('objectid', -1318735913).with('selfid', 1219450656).with('textdescid', 2068859689).with('uniqueparentid', 0)
  5392. .with('uitreeindex', 23)
  5393. .with('pretext', 'NOTIFICATION SOUND')
  5394. .with('classname', 'TextView')
  5395. .with('resource-id', 'com.android.contacts:id/menu_delete')
  5396.  
  5397. $ruiObj.click
  5398.  
  5399. waitsecond(1)
  5400. end
  5401.  
  5402. tcase << TestAction.new(:Button_Button1_4) do
  5403. $ruiObj = RUIObject.new.with('objectid', -2101738758).with('selfid', 982364851).with('textdescid', -3686225).with('uniqueparentid', 0).with('classresourceid', 1834539358)
  5404. .with('uitreeindex', 2)
  5405. .with('classname', 'Button')
  5406. .with('resource-id', 'android:id/button1')
  5407. .with('text', 'DELETE')
  5408.  
  5409. $ruiObj.isExist
  5410.  
  5411. waitsecond(0)
  5412. end
  5413.  
  5414. tcase << TestAction.new(:Button_Button1_6) do
  5415. $ruiObj = RUIObject.new.with('objectid', -2101738758).with('selfid', 982364851).with('textdescid', -3686225).with('uniqueparentid', 0).with('classresourceid', 1834539358)
  5416. .with('uitreeindex', 2)
  5417. .with('classname', 'Button')
  5418. .with('resource-id', 'android:id/button1')
  5419. .with('text', 'DELETE')
  5420.  
  5421. $ruiObj.click
  5422.  
  5423. waitsecond(0)
  5424. end
  5425.  
  5426. tcase << TestAction.new(:scriptAction_LogStopTest) do
  5427. $myTestResult = checkLastExistResult
  5428. if $myTestResult == false
  5429. $myFailReason = "End button not found"
  5430. end
  5431. logStopTest("05_01_01_06_Telephony")
  5432. end
  5433.  
  5434. tcase << TestAction.new(:pressBack_2) do
  5435. pressBack
  5436. end
  5437.  
  5438. tcase << TestAction.new(:pressBack_3) do
  5439. pressBack
  5440. end
  5441.  
  5442. tcase.run(loopTime)
  5443.  
  5444. end
  5445.  
  5446. def self.Telephony_05_01_01_07(loopTime)
  5447.  
  5448. tcase = TestCase.new("Telephony_05_01_01_07")
  5449.  
  5450. tcase << TestAction.new(:scriptAction_StartTestLog) do
  5451. logStartTest("05_01_01_07_Telephony")
  5452. end
  5453.  
  5454. tcase << TestAction.new(:gotoApp_3) do
  5455. gotoApp('Phone')
  5456.  
  5457. waitsecond(1)
  5458. end
  5459.  
  5460. tcase << TestAction.new(:TextView_Tabtext_2) do
  5461. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
  5462. .with('uitreeindex', 4)
  5463. .with('classname', 'TextView')
  5464. .with('resource-id', 'com.android.contacts:id/tabText')
  5465. .with('text', 'Contacts')
  5466.  
  5467. $ruiObj.click
  5468.  
  5469. waitsecond(1)
  5470. end
  5471.  
  5472. tcase << TestAction.new(:FrameLayout_FloatingActionButtonContainer_2) do
  5473. $ruiObj = RUIObject.new.with('objectid', 565383936).with('selfid', 1632442836).with('textdescid', -1928520608).with('uniqueparentid', 0)
  5474. .with('classname', 'FrameLayout')
  5475. .with('resource-id', 'com.android.contacts:id/floating_action_button_container')
  5476. .with('content-desc', 'New contact')
  5477.  
  5478. $ruiObj.click
  5479.  
  5480. waitsecond(2)
  5481. end
  5482.  
  5483. tcase << TestAction.new(:scriptAction_4) do
  5484. if RUIObject.new.with('text', 'PHONE').isExist
  5485. RUIObject.new.with('text', 'PHONE').click
  5486. pressRecentApps
  5487. waitsecond(2)
  5488. RUIObject.new.with('text', 'Contacts').click
  5489. end
  5490.  
  5491. waitsecond(2)
  5492. end
  5493.  
  5494. tcase << TestAction.new(:EditText_14) do
  5495. $ruiObj = RUIObject.new.with('objectid', -2023645967).with('selfid', 1666676343).with('textdescid', 1691484495).with('uniqueparentid', 0).with('classresourceid', 1666676343)
  5496. .with('uitreeindex', 6)
  5497. .with('pretext', 'Phone?0')
  5498. .with('classname', 'EditText')
  5499.  
  5500. $ruiObj.inputtext('tn tn')
  5501.  
  5502. waitsecond(1)
  5503. end
  5504.  
  5505. tcase << TestAction.new(:pressEnter_2) do
  5506. pressEnter
  5507.  
  5508. waitsecond(2)
  5509. end
  5510.  
  5511. tcase << TestAction.new(:EditText_4) do
  5512. $ruiObj = RUIObject.new.with('objectid', 1622197326).with('selfid', 1666676343).with('textdescid', -1251490414).with('uniqueparentid', 0).with('classresourceid', 1666676343)
  5513. .with('uitreeindex', 10)
  5514. .with('pretext', 'Phone?1')
  5515. .with('classname', 'EditText')
  5516.  
  5517. $ruiObj.inputtext('00000000')
  5518.  
  5519. waitsecond(1)
  5520. end
  5521.  
  5522. tcase << TestAction.new(:Button_BtnSave_4) do
  5523. $ruiObj = RUIObject.new.with('objectid', 344009592).with('selfid', -1684371128).with('textdescid', -1561576549).with('uniqueparentid', 0)
  5524. .with('uitreeindex', 19)
  5525. .with('classname', 'Button')
  5526. .with('resource-id', 'com.android.contacts:id/btn_save')
  5527. .with('text', 'SAVE')
  5528.  
  5529. $ruiObj.isExist
  5530.  
  5531. waitsecond(1)
  5532. end
  5533.  
  5534. tcase << TestAction.new(:Button_BtnSave_20) do
  5535. $ruiObj = RUIObject.new.with('objectid', 344009592).with('selfid', -1684339352).with('textdescid', -1560591493).with('uniqueparentid', 0)
  5536. .with('uitreeindex', 16)
  5537. .with('classname', 'Button')
  5538. .with('resource-id', 'com.android.contacts:id/btn_save')
  5539. .with('text', 'Save')
  5540.  
  5541. $ruiObj.click
  5542.  
  5543. waitsecond(1)
  5544. end
  5545.  
  5546. tcase << TestAction.new(:Button_Button1_4) do
  5547. $ruiObj = RUIObject.new.with('objectid', -2101738758).with('selfid', 2077686463).with('textdescid', 935279519).with('uniqueparentid', 0).with('classresourceid', 1834539358)
  5548. .with('uitreeindex', 3)
  5549. .with('classname', 'Button')
  5550. .with('resource-id', 'android:id/button1')
  5551. .with('text', 'YES')
  5552.  
  5553. $ruiObj.click
  5554.  
  5555. waitsecond(2)
  5556. end
  5557.  
  5558. tcase << TestAction.new(:scriptAction_LogStopTest) do
  5559. $myTestResult = checkLastExistResult
  5560. if $myTestResult == false
  5561. $myFailReason = "Contact is not saved"
  5562. end
  5563. logStopTest("05_01_01_07_Telephony")
  5564. end
  5565.  
  5566. tcase << TestAction.new(:pressBack_5) do
  5567. pressBack
  5568. end
  5569.  
  5570. tcase << TestAction.new(:pressBack_6) do
  5571. pressBack
  5572. end
  5573.  
  5574. tcase.run(loopTime)
  5575.  
  5576. end
  5577.  
  5578. def self.VideoCall_01(loopTime)
  5579.  
  5580. tcase = TestCase.new("VideoCall_01")
  5581.  
  5582. tcase << TestAction.new(:scriptAction_StartTest_1) do
  5583. logStartTest("VideoCall_01")
  5584. end
  5585.  
  5586. tcase << TestAction.new(:pressHome_4) do
  5587. pressHome
  5588. end
  5589.  
  5590. tcase << TestAction.new(:TextView_Phone_2) do
  5591. $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
  5592. .with('uitreeindex', 9)
  5593. .with('classname', 'TextView')
  5594. .with('content-desc', 'Phone')
  5595. .with('text', 'Phone')
  5596.  
  5597. $ruiObj.click
  5598.  
  5599. waitsecond(1)
  5600. end
  5601.  
  5602. tcase << TestAction.new(:TextView_Tabtext_2) do
  5603. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
  5604. .with('uitreeindex', 4)
  5605. .with('classname', 'TextView')
  5606. .with('resource-id', 'com.android.contacts:id/tabText')
  5607. .with('text', 'Contacts')
  5608.  
  5609. $ruiObj.click
  5610.  
  5611. waitsecond(1)
  5612. end
  5613.  
  5614. tcase << TestAction.new(:EditText_SearchSrcText_2) do
  5615. $ruiObj = RUIObject.new.with('objectid', 588070375).with('selfid', -959326622).with('textdescid', -497243406).with('uniqueparentid', 0)
  5616. .with('uitreeindex', 6)
  5617. .with('classname', 'EditText')
  5618. .with('resource-id', 'android:id/search_src_text')
  5619. .with('content-desc', 'Search contacts')
  5620.  
  5621. $ruiObj.inputtext('A01 a01')
  5622.  
  5623. waitsecond(1)
  5624. end
  5625.  
  5626. tcase << TestAction.new(:TextView_A01_4) do
  5627. $ruiObj = RUIObject.new.with('objectid', -728261803).with('selfid', -2094016618).with('textdescid', -1517178717).with('uniqueparentid', 0).with('classresourceid', -938935918)
  5628. .with('uitreeindex', 12)
  5629. .with('classname', 'TextView')
  5630. .with('content-desc', 'A01 a01')
  5631. .with('text', 'A01 a01')
  5632.  
  5633. $ruiObj.click
  5634.  
  5635. waitsecond(1)
  5636. end
  5637.  
  5638. tcase << TestAction.new(:ImageView_EabActionButton_2) do
  5639. $ruiObj = RUIObject.new.with('objectid', -209436562).with('selfid', 14418249).with('textdescid', 2097401202).with('uniqueparentid', 0).with('classresourceid', -1382351217)
  5640. .with('uitreeindex', 9)
  5641. .with('classname', 'ImageView')
  5642. .with('resource-id', 'com.android.contacts:id/eab_action_button')
  5643.  
  5644. $ruiObj.click
  5645.  
  5646. waitsecond(1)
  5647. end
  5648.  
  5649. tcase << TestAction.new(:wait8second_31) do
  5650. waitsecond(8)
  5651. end
  5652.  
  5653. tcase << TestAction.new(:scriptAction_18_1) do
  5654. sendBTCmd('answerCall')
  5655.  
  5656. waitsecond(8)
  5657. end
  5658.  
  5659. tcase << TestAction.new(:scriptAction_18_1_1) do
  5660. sendBTCmd('endCall')
  5661.  
  5662. waitsecond(2)
  5663. end
  5664.  
  5665. tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
  5666. $myTestResult = checkLastBTCmdResult
  5667. if $myTestResult == false
  5668. $myFailReason = "Call not come to other dev"
  5669. end
  5670. logStopTest("VideoCall_01")
  5671.  
  5672. end
  5673.  
  5674. tcase << TestAction.new(:Button_ButtonEndCall_4) do
  5675. $ruiObj = RUIObject.new.with('objectid', 449066258).with('selfid', 2024460923).with('textdescid', -1859117805).with('uniqueparentid', 0)
  5676. .with('uitreeindex', 8)
  5677. .with('classname', 'Button')
  5678. .with('resource-id', 'com.android.incallui:id/button_end_call')
  5679. .with('text', 'End')
  5680.  
  5681. $ruiObj.click
  5682.  
  5683. waitsecond(1)
  5684. end
  5685.  
  5686. tcase << TestAction.new(:pressBack_3) do
  5687. pressBack
  5688. end
  5689.  
  5690. tcase << TestAction.new(:pressBack_4) do
  5691. pressBack
  5692. end
  5693.  
  5694. tcase.run(loopTime)
  5695.  
  5696. end
  5697.  
  5698. def self.VideoTelephony_05_01_14_01(loopTime)
  5699.  
  5700. tcase = TestCase.new("VideoTelephony_05_01_14_01")
  5701.  
  5702. tcase << TestAction.new(:scriptAction_StartTest_1) do
  5703. logStartTest("VideoCall_01")
  5704. end
  5705.  
  5706. tcase << TestAction.new(:pressHome_1_1) do
  5707. pressHome
  5708.  
  5709. waitsecond(2)
  5710. end
  5711.  
  5712. tcase << TestAction.new(:TextView_Phone_2) do
  5713. $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
  5714. .with('uitreeindex', 9)
  5715. .with('classname', 'TextView')
  5716. .with('content-desc', 'Phone')
  5717. .with('text', 'Phone')
  5718.  
  5719. $ruiObj.click
  5720.  
  5721. waitsecond(1)
  5722. end
  5723.  
  5724. tcase << TestAction.new(:TextView_Tabtext_2) do
  5725. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
  5726. .with('uitreeindex', 4)
  5727. .with('classname', 'TextView')
  5728. .with('resource-id', 'com.android.contacts:id/tabText')
  5729. .with('text', 'Contacts')
  5730.  
  5731. $ruiObj.click
  5732.  
  5733. waitsecond(1)
  5734. end
  5735.  
  5736. tcase << TestAction.new(:EditText_SearchSrcText_2) do
  5737. $ruiObj = RUIObject.new.with('objectid', 588070375).with('selfid', -959326622).with('textdescid', -497243406).with('uniqueparentid', 0)
  5738. .with('uitreeindex', 6)
  5739. .with('classname', 'EditText')
  5740. .with('resource-id', 'android:id/search_src_text')
  5741. .with('content-desc', 'Search contacts')
  5742.  
  5743. $ruiObj.inputtext('A01 a01')
  5744.  
  5745. waitsecond(1)
  5746. end
  5747.  
  5748. tcase << TestAction.new(:TextView_A01_4) do
  5749. $ruiObj = RUIObject.new.with('objectid', -728261803).with('selfid', -2094016618).with('textdescid', -1517178717).with('uniqueparentid', 0).with('classresourceid', -938935918)
  5750. .with('uitreeindex', 12)
  5751. .with('classname', 'TextView')
  5752. .with('content-desc', 'A01 a01')
  5753. .with('text', 'A01 a01')
  5754.  
  5755. $ruiObj.click
  5756.  
  5757. waitsecond(1)
  5758. end
  5759.  
  5760. tcase << TestAction.new(:VideoCallButton) do
  5761. $attVideoCallButton = RUIObject.new.with('objectid', -209436562).with('selfid', 14418249).with('textdescid', 2097401202).with('uniqueparentid', 0).with('classresourceid', -1382351217)
  5762. .with('uitreeindex', 9)
  5763. .with('classname', 'ImageView')
  5764. .with('resource-id', 'com.android.contacts:id/eab_action_button')
  5765.  
  5766. $uplusVideoCallButton = RUIObject.new.with('objectid', -284633982).with('selfid', -1819582550).with('textdescid', -721488607).with('uniqueparentid', 0).with('classresourceid', 745414969)
  5767. .with('uitreeindex', 12)
  5768. .with('classname', 'ImageView')
  5769. .with('resource-id', 'com.android.contacts:id/first_action_button')
  5770. .with('content-desc', 'Video call')
  5771.  
  5772. if $attVideoCallButton.isExist
  5773. $attVideoCallButton.click
  5774. elsif $uplusVideoCallButton.isExist
  5775. $uplusVideoCallButton.click
  5776. end
  5777.  
  5778. waitsecond(2)
  5779. end
  5780.  
  5781. tcase << TestAction.new(:ImageView_FirstActionButton_4) do
  5782. $ruiObj = RUIObject.new.with('objectid', -284633982).with('selfid', -1819582550).with('textdescid', -721488607).with('uniqueparentid', 0).with('classresourceid', 745414969)
  5783. .with('uitreeindex', 12)
  5784. .with('classname', 'ImageView')
  5785. .with('resource-id', 'com.android.contacts:id/first_action_button')
  5786. .with('content-desc', 'Video call')
  5787.  
  5788. $ruiObj.click
  5789.  
  5790. waitsecond(2)
  5791. end
  5792.  
  5793. tcase << TestAction.new(:wait8second_31) do
  5794. waitsecond(8)
  5795. end
  5796.  
  5797. tcase << TestAction.new(:scriptAction_18_1) do
  5798. sendBTCmd('answerCall')
  5799.  
  5800. waitsecond(8)
  5801. end
  5802.  
  5803. tcase << TestAction.new(:TextView_Callstatelabel_1_1) do
  5804. $ruiObj = RUIObject.new.with('objectid', -611515845).with('selfid', -821184504).with('textdescid', -1124622931).with('uniqueparentid', 0)
  5805. .with('uitreeindex', 5)
  5806. .with('classname', 'TextView')
  5807. .with('resource-id', 'com.android.incallui:id/callStateLabel')
  5808. .with('text', 'Incoming call')
  5809.  
  5810. $ruiObj.isNotExist
  5811. end
  5812.  
  5813. tcase << TestAction.new(:scriptAction_18_1_1) do
  5814. endCall
  5815.  
  5816. waitsecond(2)
  5817. end
  5818.  
  5819. tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
  5820. $myTestResult = checkLastBTCmdResult
  5821. if $myTestResult == false
  5822. $myFailReason = "Call not come to other dev"
  5823. end
  5824. logStopTest("VideoCall_01")
  5825.  
  5826. end
  5827.  
  5828. tcase << TestAction.new(:Button_ButtonEndCall_4) do
  5829. $ruiObj = RUIObject.new.with('objectid', 449066258).with('selfid', 2024460923).with('textdescid', -1859117805).with('uniqueparentid', 0)
  5830. .with('uitreeindex', 8)
  5831. .with('classname', 'Button')
  5832. .with('resource-id', 'com.android.incallui:id/button_end_call')
  5833. .with('text', 'End')
  5834.  
  5835. $ruiObj.click
  5836.  
  5837. waitsecond(1)
  5838. end
  5839.  
  5840. tcase << TestAction.new(:pressBack_3) do
  5841. pressBack
  5842. end
  5843.  
  5844. tcase << TestAction.new(:pressBack_4) do
  5845. pressBack
  5846. end
  5847.  
  5848. tcase << TestAction.new(:pressHome_1) do
  5849. pressHome
  5850.  
  5851. waitsecond(2)
  5852. end
  5853.  
  5854. tcase.run(loopTime)
  5855.  
  5856. end
  5857.  
  5858. def self.VideoTelephony_05_01_14_02(loopTime)
  5859.  
  5860. tcase = TestCase.new("VideoTelephony_05_01_14_02")
  5861.  
  5862. tcase << TestAction.new(:scriptAction_StartTest_1) do
  5863. logStartTest("VideoCall_02")
  5864. end
  5865.  
  5866. tcase << TestAction.new(:pressHome_2) do
  5867. pressHome
  5868.  
  5869. waitsecond(2)
  5870. end
  5871.  
  5872. tcase << TestAction.new(:TextView_Phone_2) do
  5873. $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
  5874. .with('uitreeindex', 9)
  5875. .with('classname', 'TextView')
  5876. .with('content-desc', 'Phone')
  5877. .with('text', 'Phone')
  5878.  
  5879. $ruiObj.click
  5880.  
  5881. waitsecond(1)
  5882. end
  5883.  
  5884. tcase << TestAction.new(:TextView_Tabtext_4) do
  5885. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
  5886. .with('uitreeindex', 4)
  5887. .with('classname', 'TextView')
  5888. .with('resource-id', 'com.android.contacts:id/tabText')
  5889. .with('text', 'Contacts')
  5890.  
  5891. $ruiObj.click
  5892.  
  5893. waitsecond(2)
  5894. end
  5895.  
  5896. tcase << TestAction.new(:EditText_SearchSrcText_6) do
  5897. $ruiObj = RUIObject.new.with('objectid', 588070375).with('selfid', -959326622).with('textdescid', -497243406).with('uniqueparentid', 0)
  5898. .with('uitreeindex', 6)
  5899. .with('classname', 'EditText')
  5900. .with('resource-id', 'android:id/search_src_text')
  5901. .with('content-desc', 'Search contacts')
  5902.  
  5903. $ruiObj.inputtext('A01 a01')
  5904.  
  5905. waitsecond(2)
  5906. end
  5907.  
  5908. tcase << TestAction.new(:TextView_A01_8) do
  5909. $ruiObj = RUIObject.new.with('objectid', -728261803).with('selfid', -2094016618).with('textdescid', -1517178717).with('uniqueparentid', 0).with('classresourceid', -938935918)
  5910. .with('uitreeindex', 12)
  5911. .with('classname', 'TextView')
  5912. .with('content-desc', 'A01 a01')
  5913. .with('text', 'A01 a01')
  5914.  
  5915. $ruiObj.click
  5916.  
  5917. waitsecond(2)
  5918. end
  5919.  
  5920. tcase << TestAction.new(:ImageView_FirstActionButton_10) do
  5921. $ruiObj = RUIObject.new.with('objectid', -284633982).with('selfid', -1819582550).with('textdescid', -721488607).with('uniqueparentid', 0).with('classresourceid', 745414969)
  5922. .with('uitreeindex', 10)
  5923. .with('classname', 'ImageView')
  5924. .with('resource-id', 'com.android.contacts:id/first_action_button')
  5925. .with('content-desc', 'Video call')
  5926.  
  5927. $ruiObj.click
  5928.  
  5929. waitsecond(2)
  5930. end
  5931.  
  5932. tcase << TestAction.new(:wait8second_2) do
  5933. waitsecond(8)
  5934. end
  5935.  
  5936. tcase << TestAction.new(:scriptAction_18_1) do
  5937. sendBTCmd('answerCall')
  5938.  
  5939. waitsecond(8)
  5940. end
  5941.  
  5942. tcase << TestAction.new(:TextView_Callstatelabel_1_1_1) do
  5943. $ruiObj = RUIObject.new.with('objectid', -611515845).with('selfid', -821184504).with('textdescid', -1124622931).with('uniqueparentid', 0)
  5944. .with('uitreeindex', 5)
  5945. .with('classname', 'TextView')
  5946. .with('resource-id', 'com.android.incallui:id/callStateLabel')
  5947. .with('text', 'Incoming call')
  5948.  
  5949. $ruiObj.isNotExist
  5950. end
  5951.  
  5952. tcase << TestAction.new(:scriptAction_18_1_1) do
  5953. sendBTCmd('endCall')
  5954.  
  5955. waitsecond(2)
  5956. end
  5957.  
  5958. tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
  5959. $myTestResult = checkLastBTCmdResult
  5960. if $myTestResult == false
  5961. $myFailReason = "Call not come to other dev"
  5962. end
  5963. logStopTest("VideoCall_02")
  5964. end
  5965.  
  5966. tcase << TestAction.new(:Button_ButtonEndCall_4) do
  5967. $ruiObj = RUIObject.new.with('objectid', 449066258).with('selfid', 2024460923).with('textdescid', -1859117805).with('uniqueparentid', 0)
  5968. .with('uitreeindex', 8)
  5969. .with('classname', 'Button')
  5970. .with('resource-id', 'com.android.incallui:id/button_end_call')
  5971. .with('text', 'End')
  5972.  
  5973. $ruiObj.click
  5974.  
  5975. waitsecond(1)
  5976. end
  5977.  
  5978. tcase << TestAction.new(:pressBack_3) do
  5979. pressBack
  5980. end
  5981.  
  5982. tcase << TestAction.new(:pressBack_4) do
  5983. pressBack
  5984. end
  5985.  
  5986. tcase << TestAction.new(:pressHome_12) do
  5987. pressHome
  5988.  
  5989. waitsecond(2)
  5990. end
  5991.  
  5992. tcase.run(loopTime)
  5993.  
  5994. end
  5995.  
  5996. def self.VideoTelephony_05_01_14_03(loopTime)
  5997.  
  5998. tcase = TestCase.new("VideoTelephony_05_01_14_03")
  5999.  
  6000. tcase << TestAction.new(:scriptAction_StartTest_1) do
  6001. logStartTest("VideoCall_03")
  6002. end
  6003.  
  6004. tcase << TestAction.new(:scriptAction_18_1_1) do
  6005. sendBTCmd("makeVideoCall('#{db('CallNumber')[0]}')")
  6006.  
  6007. waitsecond(32)
  6008. end
  6009.  
  6010. tcase << TestAction.new(:scriptAction_26) do
  6011. $UIDev.swipe(288,2083.5,828,1192.5,10)
  6012.  
  6013.  
  6014. waitsecond(8)
  6015. end
  6016.  
  6017. tcase << TestAction.new(:TextView_Callstatelabel_1_1_1_1) do
  6018. $ruiObj = RUIObject.new.with('objectid', -611515845).with('selfid', -821184504).with('textdescid', -1124622931).with('uniqueparentid', 0)
  6019. .with('uitreeindex', 5)
  6020. .with('classname', 'TextView')
  6021. .with('resource-id', 'com.android.incallui:id/callStateLabel')
  6022. .with('text', 'Incoming call')
  6023.  
  6024. $ruiObj.isNotExist
  6025. end
  6026.  
  6027. tcase << TestAction.new(:scriptAction_2) do
  6028. endCall
  6029.  
  6030. waitsecond(2)
  6031. end
  6032.  
  6033. tcase << TestAction.new(:scriptAction_LogStopTest_1_1_1) do
  6034. $myTestResult = checkLastBTCmdResult
  6035. if $myTestResult == false
  6036. $myFailReason = "Call not come to other dev"
  6037. end
  6038. logStopTest("VideoCall_03")
  6039. end
  6040.  
  6041. tcase.run(loopTime)
  6042.  
  6043. end
  6044.  
  6045. def self.VideoTelephony_05_01_14_04(loopTime)
  6046.  
  6047. tcase = TestCase.new("VideoTelephony_05_01_14_04")
  6048.  
  6049. tcase << TestAction.new(:scriptAction_StartTest_1) do
  6050. logStartTest("VideoCall_04")
  6051. end
  6052.  
  6053. tcase << TestAction.new(:scriptAction_18_1_1) do
  6054. sendBTCmd("makeVideoCall('#{db('CallNumber')[0]}')")
  6055.  
  6056. waitsecond(32)
  6057. end
  6058.  
  6059. tcase << TestAction.new(:scriptAction_26) do
  6060. answerCall
  6061.  
  6062. waitsecond(8)
  6063. end
  6064.  
  6065. tcase << TestAction.new(:TextView_Callstatelabel_1_1_1_1_1) do
  6066. $ruiObj = RUIObject.new.with('objectid', -611515845).with('selfid', -821184504).with('textdescid', -1124622931).with('uniqueparentid', 0)
  6067. .with('uitreeindex', 5)
  6068. .with('classname', 'TextView')
  6069. .with('resource-id', 'com.android.incallui:id/callStateLabel')
  6070. .with('text', 'Incoming call')
  6071.  
  6072. $ruiObj.isNotExist
  6073. end
  6074.  
  6075. tcase << TestAction.new(:scriptAction_2) do
  6076. endCall
  6077.  
  6078. waitsecond(2)
  6079. end
  6080.  
  6081. tcase << TestAction.new(:scriptAction_LogStopTest_1_1_1) do
  6082. $myTestResult = checkLastBTCmdResult
  6083. if $myTestResult == false
  6084. $myFailReason = "Call not come to other dev"
  6085. end
  6086. logStopTest("VideoCall_04")
  6087. end
  6088.  
  6089. tcase.run(loopTime)
  6090.  
  6091. end
  6092.  
  6093. def self.VideoTelephony_05_01_14_05(loopTime)
  6094.  
  6095. tcase = TestCase.new("VideoTelephony_05_01_14_05")
  6096.  
  6097. tcase << TestAction.new(:scriptAction_StartTest_1) do
  6098. logStartTest("VideoCall_05")
  6099. end
  6100.  
  6101. tcase << TestAction.new(:TextView_Phone_2) do
  6102. $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
  6103. .with('uitreeindex', 9)
  6104. .with('classname', 'TextView')
  6105. .with('content-desc', 'Phone')
  6106. .with('text', 'Phone')
  6107.  
  6108. $ruiObj.click
  6109.  
  6110. waitsecond(1)
  6111. end
  6112.  
  6113. tcase << TestAction.new(:TextView_Tabtext_23) do
  6114. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 566119687).with('textdescid', 1861262411).with('uniqueparentid', 0)
  6115. .with('uitreeindex', 2)
  6116. .with('classname', 'TextView')
  6117. .with('resource-id', 'com.android.contacts:id/tabText')
  6118. .with('text', 'Dial')
  6119.  
  6120. $ruiObj.click
  6121.  
  6122. waitsecond(2)
  6123. end
  6124.  
  6125. tcase << TestAction.new(:scriptAction_2) do
  6126. $ruiObj = RUIObject.new.with('objectid', 477485968).with('selfid', -1326421482).with('textdescid', 1917163152).with('uniqueparentid', 0)
  6127. .with('uitreeindex', 7)
  6128. .with('classname', 'EditText')
  6129. .with('resource-id', 'com.android.contacts:id/digits')
  6130.  
  6131. $ruiObj.inputtext("#{db('CallNumber')[1]}")
  6132.  
  6133. waitsecond(2)
  6134. end
  6135.  
  6136. tcase << TestAction.new(:ImageButton_Btnvt_6) do
  6137. $ruiObj = RUIObject.new.with('objectid', -999718621).with('selfid', -1888469943).with('textdescid', -1795784128).with('uniqueparentid', 0)
  6138. .with('uitreeindex', 61)
  6139. .with('classname', 'ImageButton')
  6140. .with('resource-id', 'com.android.contacts:id/btnVT')
  6141. .with('content-desc', 'Video Call')
  6142.  
  6143. $ruiObj.click
  6144.  
  6145. waitsecond(2)
  6146. end
  6147.  
  6148. tcase << TestAction.new(:wait8second_2) do
  6149. waitsecond(8)
  6150. end
  6151.  
  6152. tcase << TestAction.new(:scriptAction_18_1) do
  6153. sendBTCmd('answerCall')
  6154.  
  6155. waitsecond(8)
  6156. end
  6157.  
  6158. tcase << TestAction.new(:TextView_Callstatelabel_1_1_1_1_1_1) do
  6159. $ruiObj = RUIObject.new.with('objectid', -611515845).with('selfid', -821184504).with('textdescid', -1124622931).with('uniqueparentid', 0)
  6160. .with('uitreeindex', 5)
  6161. .with('classname', 'TextView')
  6162. .with('resource-id', 'com.android.incallui:id/callStateLabel')
  6163. .with('text', 'Incoming call')
  6164.  
  6165. $ruiObj.isNotExist
  6166. end
  6167.  
  6168. tcase << TestAction.new(:scriptAction_18_1_1) do
  6169. sendBTCmd('endCall')
  6170.  
  6171. waitsecond(2)
  6172. end
  6173.  
  6174. tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
  6175. $myTestResult = checkLastBTCmdResult
  6176. if $myTestResult == false
  6177. $myFailReason = "Call not come to other dev"
  6178. end
  6179. logStopTest("VideoCall_05")
  6180. end
  6181.  
  6182. tcase << TestAction.new(:Button_ButtonEndCall_4) do
  6183. $ruiObj = RUIObject.new.with('objectid', 449066258).with('selfid', 2024460923).with('textdescid', -1859117805).with('uniqueparentid', 0)
  6184. .with('uitreeindex', 8)
  6185. .with('classname', 'Button')
  6186. .with('resource-id', 'com.android.incallui:id/button_end_call')
  6187. .with('text', 'End')
  6188.  
  6189. $ruiObj.click
  6190.  
  6191. waitsecond(1)
  6192. end
  6193.  
  6194. tcase << TestAction.new(:pressBack_3) do
  6195. pressBack
  6196. end
  6197.  
  6198. tcase << TestAction.new(:pressBack_4) do
  6199. pressBack
  6200. end
  6201.  
  6202. tcase.run(loopTime)
  6203.  
  6204. end
  6205.  
  6206. def self.WiFi_05_01_10_01(loopTime)
  6207.  
  6208. tcase = TestCase.new("WiFi_05_01_10_01")
  6209.  
  6210. tcase << TestAction.new(:scriptAction_2) do
  6211. logStartTest("05_01_10_01_WiFi")
  6212. end
  6213.  
  6214. tcase << TestAction.new(:gotoApp_5) do
  6215. gotoApp('Settings')
  6216.  
  6217. waitsecond(1)
  6218. end
  6219.  
  6220. tcase << TestAction.new(:FrameLayout_SettingsButtonContainer_4) do
  6221. $ruiObj = RUIObject.new.with('objectid', -994030416).with('selfid', 1322766864).with('textdescid', 417942116).with('uniqueparentid', 0)
  6222. .with('classname', 'FrameLayout')
  6223. .with('resource-id', 'com.android.systemui:id/settings_button_container')
  6224.  
  6225. $ruiObj.click
  6226.  
  6227. waitsecond(1)
  6228. end
  6229.  
  6230. tcase << TestAction.new(:TextView_Title_2) do
  6231. $ruiObj = RUIObject.new.with('objectid', 674368800).with('selfid', -2078686330).with('textdescid', -957350501).with('uniqueparentid', 0)
  6232. .with('uitreeindex', 2)
  6233. .with('classname', 'TextView')
  6234. .with('resource-id', 'android:id/title')
  6235. .with('text', 'Networks')
  6236.  
  6237. $ruiObj.click
  6238. end
  6239.  
  6240. tcase << TestAction.new(:swipeUp_1) do
  6241. swipe_vertical_back 500
  6242. end
  6243.  
  6244. tcase << TestAction.new(:TextView_Title_25) do
  6245. $ruiObj = RUIObject.new.with('objectid', -1417852313).with('selfid', -589731018).with('textdescid', 1796571250).with('uniqueparentid', 0).with('classresourceid', 490183159)
  6246. .with('uitreeindex', 23)
  6247. .with('classname', 'TextView')
  6248. .with('resource-id', 'android:id/title')
  6249. .with('text', 'WiFi')
  6250.  
  6251. $ruiObj.click
  6252.  
  6253. waitsecond(2)
  6254. end
  6255.  
  6256. tcase << TestAction.new(:Button_Button2_4) do
  6257. $ruiObj = RUIObject.new.with('objectid', -1696842927).with('selfid', 1219598511).with('textdescid', -1934961417).with('uniqueparentid', 0).with('classresourceid', 1834539359)
  6258. .with('uitreeindex', 2)
  6259. .with('classname', 'Button')
  6260. .with('resource-id', 'android:id/button2')
  6261. .with('text', 'CLOSE')
  6262.  
  6263. $ruiObj.click
  6264.  
  6265. waitsecond(2)
  6266. end
  6267.  
  6268. tcase << TestAction.new(:Switch_ON_2_1) do
  6269. $ruiObj = RUIObject.new.with('objectid', 1178284996).with('selfid', 1645353587).with('textdescid', -1975291963).with('uniqueparentid', 0)
  6270. .with('uitreeindex', 2)
  6271. .with('classname', 'Switch')
  6272. .with('text', 'ON')
  6273.  
  6274. $ruiObj.click
  6275.  
  6276. waitsecond(2)
  6277. end
  6278.  
  6279. tcase << TestAction.new(:wait8second_6) do
  6280. waitsecond(8)
  6281. end
  6282.  
  6283. tcase << TestAction.new(:Switch_OFF_3_1) do
  6284. $ruiObj = RUIObject.new.with('objectid', 1178284996).with('selfid', -533646533).with('textdescid', -1104515187).with('uniqueparentid', 0)
  6285. .with('uitreeindex', 2)
  6286. .with('classname', 'Switch')
  6287. .with('text', 'OFF')
  6288.  
  6289. $ruiObj.click
  6290.  
  6291. waitsecond(2)
  6292. end
  6293.  
  6294. tcase << TestAction.new(:Switch_OFF_8) do
  6295. $ruiObj = RUIObject.new.with('objectid', 1178284996).with('selfid', -533646533).with('textdescid', -1104515187).with('uniqueparentid', 0)
  6296. .with('uitreeindex', 2)
  6297. .with('classname', 'Switch')
  6298. .with('text', 'OFF')
  6299.  
  6300. $ruiObj.isExist
  6301.  
  6302. waitsecond(0)
  6303. end
  6304.  
  6305. tcase << TestAction.new(:scriptAction_10_TrueFalse) do
  6306. $myTestResult = checkLastExistResult
  6307.  
  6308. if $myTestResult == false
  6309. $myFailReason = "WiFi cannot turn ON"
  6310. end
  6311. logStopTest("05_01_10_01_WiFi")
  6312.  
  6313. waitsecond(1)
  6314. end
  6315.  
  6316. tcase << TestAction.new(:pressBack_20) do
  6317. pressBack
  6318. end
  6319.  
  6320. tcase << TestAction.new(:pressBack_21) do
  6321. pressBack
  6322. end
  6323.  
  6324. tcase << TestAction.new(:pressHome_22) do
  6325. pressHome
  6326. end
  6327.  
  6328. tcase.run(loopTime)
  6329.  
  6330. end
  6331.  
  6332. def self.WiFi_05_01_10_02(loopTime)
  6333.  
  6334. tcase = TestCase.new("WiFi_05_01_10_02")
  6335.  
  6336. tcase << TestAction.new(:scriptAction_2) do
  6337. logStartTest("05_01_10_02_WiFi")
  6338. end
  6339.  
  6340. tcase << TestAction.new(:gotoApp_2) do
  6341. gotoApp('Settings')
  6342.  
  6343. waitsecond(1)
  6344. end
  6345.  
  6346. tcase << TestAction.new(:TextView_Title_2) do
  6347. $ruiObj = RUIObject.new.with('objectid', 674368800).with('selfid', -2078686330).with('textdescid', -957350501).with('uniqueparentid', 0)
  6348. .with('uitreeindex', 2)
  6349. .with('classname', 'TextView')
  6350. .with('resource-id', 'android:id/title')
  6351. .with('text', 'Networks')
  6352.  
  6353. $ruiObj.click
  6354. end
  6355.  
  6356. tcase << TestAction.new(:swipeUp_2) do
  6357. swipe_vertical_back 500
  6358. end
  6359.  
  6360. tcase << TestAction.new(:TextView_Title_4) do
  6361. $ruiObj = RUIObject.new.with('objectid', 2008023572).with('selfid', -589731018).with('textdescid', 498664031).with('uniqueparentid', 0).with('classresourceid', 490183159)
  6362. .with('uitreeindex', 8)
  6363. .with('classname', 'TextView')
  6364. .with('resource-id', 'android:id/title')
  6365. .with('text', 'WiFi')
  6366.  
  6367. $ruiObj.click
  6368.  
  6369. waitsecond(1)
  6370. end
  6371.  
  6372. tcase << TestAction.new(:TextView_Empty_25) do
  6373. $ruiObj = RUIObject.new.with('objectid', 1333259948).with('selfid', -886975434).with('textdescid', 1201392520).with('uniqueparentid', 0)
  6374. .with('uitreeindex', 4)
  6375. .with('classname', 'TextView')
  6376. .with('resource-id', 'android:id/empty')
  6377. .with('text', 'Turn WiFi on in the upper right corner to see available networks')
  6378.  
  6379. $ruiObj.isExist
  6380. ifFailJumpTo(:wait1second_21)
  6381. end
  6382.  
  6383. tcase << TestAction.new(:Switch_ON_2_1_1) do
  6384. $ruiObj = RUIObject.new.with('objectid', 1178284996).with('selfid', 1645353587).with('textdescid', -1975291963).with('uniqueparentid', 0)
  6385. .with('uitreeindex', 2)
  6386. .with('classname', 'Switch')
  6387. .with('text', 'ON')
  6388.  
  6389. $ruiObj.click
  6390. end
  6391.  
  6392. tcase << TestAction.new(:wait1second_21) do
  6393. waitsecond(1)
  6394. end
  6395.  
  6396. tcase << TestAction.new(:check_if_wifi_is_added) do
  6397. $ruiObj = RUIObject.new.with('objectid', -1789239232).with('selfid', -789618896).with('textdescid', 272817007).with('uniqueparentid', 0).with('classresourceid', 490183159)
  6398. .with('uitreeindex', 11)
  6399. .with('classname', 'TextView')
  6400. .with('resource-id', 'android:id/title')
  6401. .with('text', 'qctcomp')
  6402.  
  6403. $ruiObj.isNotExist
  6404. ifFailJumpTo(:check_connection)
  6405.  
  6406. waitsecond(1)
  6407. end
  6408.  
  6409. tcase << TestAction.new(:Add_wifi) do
  6410. $ruiObj = RUIObject.new.with('objectid', 1634319278).with('selfid', 1290820192).with('textdescid', 371464933).with('uniqueparentid', 0)
  6411. .with('uitreeindex', 3)
  6412. .with('classname', 'ImageButton')
  6413. .with('content-desc', 'More options')
  6414.  
  6415. $ruiObj.click
  6416.  
  6417. waitsecond(1)
  6418. end
  6419.  
  6420. tcase << TestAction.new(:TextView_Title_6) do
  6421. $ruiObj = RUIObject.new.with('objectid', -1984796814).with('selfid', -392058123).with('textdescid', -1929502754).with('uniqueparentid', 0).with('classresourceid', 490183159)
  6422. .with('uitreeindex', 0)
  6423. .with('classname', 'TextView')
  6424. .with('resource-id', 'android:id/title')
  6425. .with('text', 'Add WiFi')
  6426.  
  6427. $ruiObj.click
  6428.  
  6429. waitsecond(1)
  6430. end
  6431.  
  6432. tcase << TestAction.new(:EditText_Ssid_8) do
  6433. $ruiObj = RUIObject.new.with('objectid', 1745689399).with('selfid', 1359933717).with('textdescid', -1718203447).with('uniqueparentid', 0).with('classresourceid', -1413606463)
  6434. .with('uitreeindex', 2)
  6435. .with('classname', 'EditText')
  6436. .with('resource-id', 'com.lge.wifisettings:id/ssid')
  6437.  
  6438. $ruiObj.inputtext('qctcomp')
  6439.  
  6440. waitsecond(1)
  6441. end
  6442.  
  6443. tcase << TestAction.new(:Button_Button1_10) do
  6444. $ruiObj = RUIObject.new.with('objectid', -360890210).with('selfid', -210572094).with('textdescid', 1221395928).with('uniqueparentid', 0)
  6445. .with('uitreeindex', 7)
  6446. .with('classname', 'Button')
  6447. .with('resource-id', 'android:id/button1')
  6448. .with('text', 'CONNECT')
  6449.  
  6450. $ruiObj.click
  6451.  
  6452. waitsecond(1)
  6453. end
  6454.  
  6455. tcase << TestAction.new(:check_connection) do
  6456. $ruiObj = RUIObject.new.with('objectid', 1399891586).with('selfid', -404041766).with('textdescid', 623785653).with('uniqueparentid', 0).with('classresourceid', -1930775675)
  6457. .with('uitreeindex', 10)
  6458. .with('classname', 'TextView')
  6459. .with('resource-id', 'android:id/summary')
  6460. .with('text', 'Connected')
  6461.  
  6462. $ruiObj.click
  6463.  
  6464. waitsecond(1)
  6465. end
  6466.  
  6467. tcase << TestAction.new(:Button_Button3_15) do
  6468. $ruiObj = RUIObject.new.with('objectid', -360890208).with('selfid', 1759634711).with('textdescid', 452800563).with('uniqueparentid', 0)
  6469. .with('uitreeindex', 12)
  6470. .with('classname', 'Button')
  6471. .with('resource-id', 'android:id/button3')
  6472. .with('text', 'Forget')
  6473.  
  6474. $ruiObj.click
  6475.  
  6476. waitsecond(1)
  6477. end
  6478.  
  6479. tcase << TestAction.new(:TextView_Title_14) do
  6480. $ruiObj = RUIObject.new.with('objectid', -1789239232).with('selfid', -789618896).with('textdescid', 272817007).with('uniqueparentid', 0).with('classresourceid', 490183159)
  6481. .with('uitreeindex', 15)
  6482. .with('classname', 'TextView')
  6483. .with('resource-id', 'android:id/title')
  6484. .with('text', 'qctcomp')
  6485.  
  6486. $ruiObj.click
  6487.  
  6488. waitsecond(1)
  6489. end
  6490.  
  6491. tcase << TestAction.new(:EditText_Password_17) do
  6492. $ruiObj = RUIObject.new.with('objectid', -976316462).with('selfid', -2120332491).with('textdescid', -201039218).with('uniqueparentid', 0).with('classresourceid', -714852383)
  6493. .with('uitreeindex', 2)
  6494. .with('classname', 'EditText')
  6495. .with('resource-id', 'com.lge.wifisettings:id/password')
  6496.  
  6497. $ruiObj.inputtext('12abcdef34')
  6498.  
  6499. waitsecond(1)
  6500. end
  6501.  
  6502. tcase << TestAction.new(:pressBack_20) do
  6503. pressBack
  6504. end
  6505.  
  6506. tcase << TestAction.new(:Button_Button1_18) do
  6507. $ruiObj = RUIObject.new.with('objectid', -360890210).with('selfid', -210572094).with('textdescid', 1221395928).with('uniqueparentid', 0)
  6508. .with('uitreeindex', 6)
  6509. .with('classname', 'Button')
  6510. .with('resource-id', 'android:id/button1')
  6511. .with('text', 'CONNECT')
  6512.  
  6513. $ruiObj.click
  6514.  
  6515. waitsecond(4)
  6516. end
  6517.  
  6518. tcase << TestAction.new(:TextView_Summary_2) do
  6519. $ruiObj = RUIObject.new.with('objectid', 1704199271).with('selfid', -404041766).with('textdescid', -634935376).with('uniqueparentid', 0).with('classresourceid', -1930775675)
  6520. .with('uitreeindex', 7)
  6521. .with('classname', 'TextView')
  6522. .with('resource-id', 'android:id/summary')
  6523. .with('text', 'Connected')
  6524.  
  6525. $ruiObj.isExist
  6526.  
  6527. waitsecond(1)
  6528. end
  6529.  
  6530. tcase << TestAction.new(:scriptAction_23_TrueFalse) do
  6531. $myTestResult = checkLastExistResult
  6532.  
  6533. if $myTestResult == false
  6534. $myFailReason == "WiFi cannot connected"
  6535. end
  6536. logStopTest("05_01_10_02_WiFi")
  6537. end
  6538.  
  6539. tcase << TestAction.new(:Switch_OFF_19_1) do
  6540. $ruiObj = RUIObject.new.with('objectid', 1178284996).with('selfid', -533646533).with('textdescid', -1104515187).with('uniqueparentid', 0)
  6541. .with('uitreeindex', 2)
  6542. .with('classname', 'Switch')
  6543. .with('text', 'OFF')
  6544.  
  6545. $ruiObj.click
  6546.  
  6547. waitsecond(2)
  6548. end
  6549.  
  6550. tcase << TestAction.new(:pressBack_15) do
  6551. pressBack
  6552. end
  6553.  
  6554. tcase << TestAction.new(:pressBack_16) do
  6555. pressBack
  6556. end
  6557.  
  6558. tcase << TestAction.new(:pressHome_17) do
  6559. pressHome
  6560. end
  6561.  
  6562. tcase.run(loopTime)
  6563.  
  6564. end
  6565.  
  6566. def self.WiFi_Calling_05_01_16_01(loopTime)
  6567.  
  6568. tcase = TestCase.new("WiFi_Calling_05_01_16_01")
  6569.  
  6570. tcase << TestAction.new(:scriptAction_StartTest_1) do
  6571. logStartTest("05_01_16_01_WiFI_Calling")
  6572. end
  6573.  
  6574. tcase << TestAction.new(:pressHome_4) do
  6575. pressHome
  6576. end
  6577.  
  6578. tcase << TestAction.new(:TextView_Phone_2) do
  6579. $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
  6580. .with('uitreeindex', 9)
  6581. .with('classname', 'TextView')
  6582. .with('content-desc', 'Phone')
  6583. .with('text', 'Phone')
  6584.  
  6585. $ruiObj.click
  6586.  
  6587. waitsecond(1)
  6588. end
  6589.  
  6590. tcase << TestAction.new(:TextView_Tabtext_2) do
  6591. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 1015283306).with('textdescid', -1384079800).with('uniqueparentid', 0)
  6592. .with('uitreeindex', 4)
  6593. .with('classname', 'TextView')
  6594. .with('resource-id', 'com.android.contacts:id/tabText')
  6595. .with('text', 'Contacts')
  6596.  
  6597. $ruiObj.click
  6598.  
  6599. waitsecond(1)
  6600. end
  6601.  
  6602. tcase << TestAction.new(:EditText_SearchSrcText_4) do
  6603. $ruiObj = RUIObject.new.with('objectid', 588070375).with('selfid', -959326622).with('textdescid', -497243406).with('uniqueparentid', 0)
  6604. .with('uitreeindex', 6)
  6605. .with('classname', 'EditText')
  6606. .with('resource-id', 'android:id/search_src_text')
  6607. .with('content-desc', 'Search contacts')
  6608.  
  6609. $ruiObj.inputtext('A01')
  6610.  
  6611. waitsecond(1)
  6612. end
  6613.  
  6614. tcase << TestAction.new(:scriptAction_10_1) do
  6615. sendBTCmd('pressHome')
  6616. end
  6617.  
  6618. tcase << TestAction.new(:ImageView_Button1_8) do
  6619. $ruiObj = RUIObject.new.with('objectid', -1827607533).with('selfid', 643737864).with('textdescid', -306619761).with('uniqueparentid', 0).with('classresourceid', -1143292048)
  6620. .with('uitreeindex', 13)
  6621. .with('classname', 'ImageView')
  6622. .with('resource-id', 'android:id/button1')
  6623. .with('content-desc', 'Call A01 a01')
  6624.  
  6625. $ruiObj.click
  6626.  
  6627. waitsecond(4)
  6628. end
  6629.  
  6630. tcase << TestAction.new(:wait8second_31) do
  6631. waitsecond(8)
  6632. end
  6633.  
  6634. tcase << TestAction.new(:scriptAction_10) do
  6635. sendBTCmd('answerCall')
  6636.  
  6637. waitsecond(8)
  6638. end
  6639.  
  6640. tcase << TestAction.new(:scriptAction_10_1) do
  6641.  
  6642. if rand(100) < 0
  6643.  
  6644. sendBTCmd('endCall')
  6645.  
  6646. waitsecond(1)
  6647.  
  6648. end
  6649.  
  6650. end
  6651.  
  6652. tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
  6653. $myTestResult = checkLastBTCmdResult
  6654. if $myTestResult == false
  6655. $myFailReason = "Call not come to other dev"
  6656. end
  6657. logStopTest("05_01_16_01_WiFI_Calling")
  6658.  
  6659. end
  6660.  
  6661. tcase << TestAction.new(:Button_Endbutton_2) do
  6662. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  6663. .with('uitreeindex', 8)
  6664. .with('classname', 'Button')
  6665. .with('resource-id', 'com.android.incallui:id/endButton')
  6666. .with('text', 'End')
  6667.  
  6668. $ruiObj.click
  6669.  
  6670. waitsecond(1)
  6671. end
  6672.  
  6673. tcase << TestAction.new(:pressBack_3) do
  6674. pressBack
  6675. end
  6676.  
  6677. tcase << TestAction.new(:pressBack_4) do
  6678. pressBack
  6679. end
  6680.  
  6681. tcase.run(loopTime)
  6682.  
  6683. end
  6684.  
  6685. def self.WiFi_Calling_05_01_16_02(loopTime)
  6686.  
  6687. tcase = TestCase.new("WiFi_Calling_05_01_16_02")
  6688.  
  6689. tcase << TestAction.new(:scriptAction_StartTest_1) do
  6690. logStartTest("05_01_16_02_WiFI_Calling")
  6691. end
  6692.  
  6693. tcase << TestAction.new(:pressHome_4) do
  6694. pressHome
  6695. end
  6696.  
  6697. tcase << TestAction.new(:TextView_Phone_2) do
  6698. $ruiObj = RUIObject.new.with('objectid', -479243074).with('selfid', 1134672426).with('textdescid', 1322329030).with('uniqueparentid', 0)
  6699. .with('uitreeindex', 9)
  6700. .with('classname', 'TextView')
  6701. .with('content-desc', 'Phone')
  6702. .with('text', 'Phone')
  6703.  
  6704. $ruiObj.click
  6705.  
  6706. waitsecond(1)
  6707. end
  6708.  
  6709. tcase << TestAction.new(:TextView_Tabtext_21) do
  6710. $ruiObj = RUIObject.new.with('objectid', 683038235).with('selfid', 566119687).with('textdescid', 1861262411).with('uniqueparentid', 0)
  6711. .with('uitreeindex', 2)
  6712. .with('classname', 'TextView')
  6713. .with('resource-id', 'com.android.contacts:id/tabText')
  6714. .with('text', 'Dial')
  6715.  
  6716. $ruiObj.click
  6717.  
  6718. waitsecond(2)
  6719. end
  6720.  
  6721. tcase << TestAction.new(:EditText_Digits_4) do
  6722. $ruiObj = RUIObject.new.with('objectid', 477485968).with('selfid', -1326421482).with('textdescid', 1917163152).with('uniqueparentid', 0)
  6723. .with('uitreeindex', 7)
  6724. .with('classname', 'EditText')
  6725. .with('resource-id', 'com.android.contacts:id/digits')
  6726.  
  6727. $ruiObj.inputtext('18003310500')
  6728.  
  6729. waitsecond(2)
  6730. end
  6731.  
  6732. tcase << TestAction.new(:ImageButton_Btnwificall_6) do
  6733. $ruiObj = RUIObject.new.with('objectid', -1011300904).with('selfid', 328499424).with('textdescid', -1103889439).with('uniqueparentid', 0)
  6734. .with('uitreeindex', 58)
  6735. .with('classname', 'ImageButton')
  6736. .with('resource-id', 'com.android.contacts:id/btnWifiCall')
  6737. .with('content-desc', 'Wifi call')
  6738.  
  6739. $ruiObj.click
  6740.  
  6741. waitsecond(2)
  6742. end
  6743.  
  6744. tcase << TestAction.new(:wait8second_31) do
  6745. waitsecond(8)
  6746. end
  6747.  
  6748. tcase << TestAction.new(:ImageButton_Endcallbutton_10) do
  6749. $ruiObj = RUIObject.new.with('objectid', 1089223879).with('selfid', -2049926087).with('textdescid', -593798087).with('uniqueparentid', 0)
  6750. .with('uitreeindex', 30)
  6751. .with('classname', 'ImageButton')
  6752. .with('resource-id', 'com.callapp.contacts:id/endCallButton')
  6753.  
  6754. $ruiObj.click
  6755.  
  6756. waitsecond(2)
  6757. end
  6758.  
  6759. tcase << TestAction.new(:scriptAction_LogStopTest_1_1) do
  6760. $myTestResult = checkLastBTCmdResult
  6761. if $myTestResult == false
  6762. $myFailReason = "Call not come to other dev"
  6763. end
  6764. logStopTest("05_01_16_01_WiFI_Calling")
  6765.  
  6766. end
  6767.  
  6768. tcase << TestAction.new(:pressBack_3) do
  6769. pressBack
  6770. end
  6771.  
  6772. tcase << TestAction.new(:pressBack_4) do
  6773. pressBack
  6774. end
  6775.  
  6776. tcase.run(loopTime)
  6777.  
  6778. end
  6779.  
  6780. def self.WiFi_Calling_05_01_16_03(loopTime)
  6781.  
  6782. tcase = TestCase.new("WiFi_Calling_05_01_16_03")
  6783.  
  6784. tcase << TestAction.new(:pressHome_2) do
  6785. pressHome
  6786. end
  6787.  
  6788. tcase << TestAction.new(:scriptAction_StartTestLog_1) do
  6789. logStartTest("05_01_16_03_WiFI_Calling")
  6790. end
  6791.  
  6792. tcase << TestAction.new(:scriptAction_BTMakeCall) do
  6793. sendBTCmd("makeCall('#{db('CallNumber')[0]}')")
  6794.  
  6795. waitsecond(8)
  6796. end
  6797.  
  6798. tcase << TestAction.new(:wait8second_12) do
  6799. waitsecond(8)
  6800. end
  6801.  
  6802. tcase << TestAction.new(:wait8second_14) do
  6803. waitsecond(8)
  6804. end
  6805.  
  6806. tcase << TestAction.new(:answerSwipe) do
  6807. $UIDev.swipe(288,1860,288,1400,10)
  6808.  
  6809.  
  6810. waitsecond(8)
  6811. end
  6812.  
  6813. tcase << TestAction.new(:Button_Endbutton_2) do
  6814. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  6815. .with('uitreeindex', 10)
  6816. .with('classname', 'Button')
  6817. .with('resource-id', 'com.android.incallui:id/endButton')
  6818. .with('text', 'End')
  6819.  
  6820. $ruiObj.isNotExist
  6821. ifFailJumpTo(:Button_Endbutton_2_1)
  6822.  
  6823. waitsecond(1)
  6824. end
  6825.  
  6826. tcase << TestAction.new(:answerSwipe_1) do
  6827. $UIDev.swipe(288,1860,288,1400,10)
  6828.  
  6829.  
  6830. waitsecond(2)
  6831. end
  6832.  
  6833. tcase << TestAction.new(:Button_Endbutton_2_1) do
  6834. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  6835. .with('uitreeindex', 10)
  6836. .with('classname', 'Button')
  6837. .with('resource-id', 'com.android.incallui:id/endButton')
  6838. .with('text', 'End')
  6839.  
  6840. $ruiObj.isExist
  6841.  
  6842. waitsecond(1)
  6843. end
  6844.  
  6845. tcase << TestAction.new(:scriptAction_LogStopTest_1) do
  6846. $myTestResult = checkLastExistResult
  6847. if $myTestResult == false
  6848. $myFailReason = "End button not found"
  6849. end
  6850. logStopTest("05_01_16_03_WiFI_Calling")
  6851.  
  6852. end
  6853.  
  6854. tcase << TestAction.new(:scriptAction_BTEndCall) do
  6855. sendBTCmd('endCall')
  6856. end
  6857.  
  6858. tcase << TestAction.new(:Button_Endbutton_2_1_1) do
  6859. $ruiObj = RUIObject.new.with('objectid', -1046212790).with('selfid', 1277076029).with('textdescid', -1112021541).with('uniqueparentid', 0)
  6860. .with('uitreeindex', 10)
  6861. .with('classname', 'Button')
  6862. .with('resource-id', 'com.android.incallui:id/endButton')
  6863. .with('text', 'End')
  6864.  
  6865. $ruiObj.click
  6866.  
  6867. waitsecond(1)
  6868. end
  6869.  
  6870. tcase << TestAction.new(:pressBack_1) do
  6871. pressBack
  6872. end
  6873.  
  6874. tcase << TestAction.new(:pressBack_2) do
  6875. pressBack
  6876. end
  6877.  
  6878. tcase.run(loopTime)
  6879.  
  6880. end
  6881.  
  6882. def self.WiFi_Calling_Disabled(loopTime)
  6883.  
  6884. tcase = TestCase.new("WiFi_Calling_Disabled")
  6885.  
  6886. tcase << TestAction.new(:pressHome_1) do
  6887. pressHome
  6888.  
  6889. waitsecond(2)
  6890. end
  6891.  
  6892. tcase << TestAction.new(:scriptAction_1) do
  6893. UiDevice.getInstance.openNotification()
  6894.  
  6895. waitsecond(2)
  6896. end
  6897.  
  6898. tcase << TestAction.new(:Switch_WiFi_3) do
  6899. $ruiObj = RUIObject.new.with('objectid', -1467580294).with('selfid', -34376116).with('textdescid', -624940890).with('uniqueparentid', 0)
  6900. .with('classname', 'Switch')
  6901. .with('content-desc', 'Wi-Fi Calling on.')
  6902. .with('text', 'Off')
  6903.  
  6904. $ruiObj.click
  6905.  
  6906. waitsecond(1)
  6907. end
  6908.  
  6909. tcase << TestAction.new(:Switch_Airplane_8) do
  6910. $ruiObj = RUIObject.new.with('objectid', -1467580294).with('selfid', -1117553413).with('textdescid', -521334761).with('uniqueparentid', 0)
  6911. .with('classname', 'Switch')
  6912. .with('content-desc', 'Airplane mode on.')
  6913. .with('text', 'Off')
  6914.  
  6915. $ruiObj.click
  6916.  
  6917. waitsecond(1)
  6918. end
  6919.  
  6920. tcase << TestAction.new(:Switch_qctcomp_11) do
  6921. $ruiObj = RUIObject.new.with('objectid', -1467580294).with('selfid', 1792588571).with('textdescid', -2004855945).with('uniqueparentid', 0)
  6922. .with('classname', 'Switch')
  6923. .with('text', 'Off')
  6924.  
  6925. $ruiObj.click
  6926.  
  6927. waitsecond(1)
  6928. end
  6929.  
  6930. tcase << TestAction.new(:pressHome_15) do
  6931. pressHome
  6932.  
  6933. waitsecond(2)
  6934. end
  6935.  
  6936. tcase.run(loopTime)
  6937.  
  6938. end
  6939.  
  6940. def self.WiFi_Calling_Enabled(loopTime)
  6941.  
  6942. tcase = TestCase.new("WiFi_Calling_Enabled")
  6943.  
  6944. tcase << TestAction.new(:pressHome_1) do
  6945. pressHome
  6946.  
  6947. waitsecond(2)
  6948. end
  6949.  
  6950. tcase << TestAction.new(:scriptAction_1) do
  6951. UiDevice.getInstance.openNotification()
  6952.  
  6953. waitsecond(2)
  6954. end
  6955.  
  6956. tcase << TestAction.new(:Switch_WiFi_2) do
  6957. $ruiObj = RUIObject.new.with('objectid', -1467580294).with('selfid', 1740384654).with('textdescid', -1815263324).with('uniqueparentid', 0)
  6958. .with('classname', 'Switch')
  6959. .with('content-desc', 'Wi-Fi Calling off.')
  6960. .with('text', 'On')
  6961.  
  6962. $ruiObj.click
  6963.  
  6964. waitsecond(2)
  6965. end
  6966.  
  6967. tcase << TestAction.new(:Button_Button1_3) do
  6968. $ruiObj = RUIObject.new.with('objectid', 467706165).with('selfid', -1318451484).with('textdescid', 195214425).with('uniqueparentid', 0)
  6969. .with('uitreeindex', 4)
  6970. .with('classname', 'Button')
  6971. .with('resource-id', 'android:id/button1')
  6972. .with('text', 'OK')
  6973.  
  6974. $ruiObj.click
  6975.  
  6976. waitsecond(2)
  6977. end
  6978.  
  6979. tcase << TestAction.new(:scriptAction_5) do
  6980. UiDevice.getInstance.openNotification()
  6981.  
  6982. waitsecond(2)
  6983. end
  6984.  
  6985. tcase << TestAction.new(:Switch_Airplane_7) do
  6986. $ruiObj = RUIObject.new.with('objectid', -1467580294).with('selfid', 657207357).with('textdescid', -1711657195).with('uniqueparentid', 0)
  6987. .with('classname', 'Switch')
  6988. .with('content-desc', 'Airplane mode off.')
  6989. .with('text', 'On')
  6990.  
  6991. $ruiObj.click
  6992.  
  6993. waitsecond(2)
  6994. end
  6995.  
  6996. tcase << TestAction.new(:Button_Button1_8) do
  6997. $ruiObj = RUIObject.new.with('objectid', -1349637992).with('selfid', -1318451484).with('textdescid', 1957157436).with('uniqueparentid', 0)
  6998. .with('uitreeindex', 3)
  6999. .with('classname', 'Button')
  7000. .with('resource-id', 'android:id/button1')
  7001. .with('text', 'OK')
  7002.  
  7003. $ruiObj.click
  7004.  
  7005. waitsecond(2)
  7006. end
  7007.  
  7008. tcase << TestAction.new(:scriptAction_9) do
  7009. UiDevice.getInstance.openNotification()
  7010.  
  7011. waitsecond(2)
  7012. end
  7013.  
  7014. tcase << TestAction.new(:Switch_WiFi_12) do
  7015. $ruiObj = RUIObject.new.with('objectid', -1467580294).with('selfid', 1570561034).with('textdescid', 1428965288).with('uniqueparentid', 0)
  7016. .with('classname', 'Switch')
  7017. .with('content-desc', 'Wi-Fi off.')
  7018. .with('text', 'On')
  7019.  
  7020. $ruiObj.click
  7021.  
  7022. waitsecond(2)
  7023. end
  7024.  
  7025. tcase << TestAction.new(:pressHome_13) do
  7026. pressHome
  7027.  
  7028. waitsecond(2)
  7029. end
  7030.  
  7031. tcase.run(loopTime)
  7032.  
  7033. end
  7034.  
  7035. def self.android_ExpHandler(loopTime)
  7036.  
  7037. tcase = TestCase.new("android_ExpHandler")
  7038.  
  7039. tcase << TestAction.new(:scriptAction_check) do
  7040. $err = "system popup detected::#{takeScreenShot}::screenshot saved"
  7041. $myTestResult = false
  7042. puts $err
  7043. logcat($err)
  7044. writelog($err)
  7045. uiObj("Button").click if uiObj("Button").exists
  7046.  
  7047. waitsecond(2)
  7048. end
  7049.  
  7050. tcase.run(loopTime)
  7051.  
  7052. end
  7053.  
  7054. def self.change_3G(loopTime)
  7055.  
  7056. tcase = TestCase.new("change_3G")
  7057.  
  7058. tcase << TestAction.new(:gotoApp_16) do
  7059. gotoApp('HiddenMenuCall')
  7060. end
  7061.  
  7062. tcase << TestAction.new(:TextView_Title_2) do
  7063. $ruiObj = RUIObject.new.with('objectid', 1100751325).with('selfid', -167282287).with('textdescid', -350417171).with('uniqueparentid', 0).with('classresourceid', 490183159)
  7064. .with('uitreeindex', 1)
  7065. .with('classname', 'TextView')
  7066. .with('resource-id', 'android:id/title')
  7067. .with('text', 'LG Hidden Menu')
  7068.  
  7069. $ruiObj.click
  7070.  
  7071. waitsecond(1)
  7072. end
  7073.  
  7074. tcase << TestAction.new(:TextView_Title_87) do
  7075. $ruiObj = RUIObject.new.with('objectid', 684902757).with('selfid', 538152793).with('textdescid', -1915478867).with('uniqueparentid', 0).with('classresourceid', 490183159)
  7076. .with('uitreeindex', 4)
  7077. .with('classname', 'TextView')
  7078. .with('resource-id', 'android:id/title')
  7079. .with('text', 'Field Test')
  7080.  
  7081. $ruiObj.click
  7082.  
  7083. waitsecond(1)
  7084. end
  7085.  
  7086. tcase << TestAction.new(:TextView_Text1_10) do
  7087. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', -141259386).with('textdescid', -734720867).with('uniqueparentid', 0).with('classresourceid', 490068035)
  7088. .with('uitreeindex', 1)
  7089. .with('classname', 'TextView')
  7090. .with('resource-id', 'android:id/text1')
  7091. .with('text', 'Modem Settings')
  7092.  
  7093. $ruiObj.click
  7094.  
  7095. waitsecond(1)
  7096. end
  7097.  
  7098. tcase << TestAction.new(:swipeDown_12) do
  7099. swipe_vertical 500
  7100.  
  7101. waitsecond(1)
  7102. end
  7103.  
  7104. tcase << TestAction.new(:TextView_Text1_14) do
  7105. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', 12767364).with('textdescid', 1760273017).with('uniqueparentid', 0).with('classresourceid', 490068035)
  7106. .with('uitreeindex', 6)
  7107. .with('classname', 'TextView')
  7108. .with('resource-id', 'android:id/text1')
  7109. .with('text', 'RAT Selection')
  7110.  
  7111. $ruiObj.click
  7112.  
  7113. waitsecond(1)
  7114. end
  7115.  
  7116. tcase << TestAction.new(:TextView_Text1_2) do
  7117. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', -244179464).with('textdescid', 496935915).with('uniqueparentid', 0).with('classresourceid', 490068035)
  7118. .with('uitreeindex', 5)
  7119. .with('classname', 'TextView')
  7120. .with('resource-id', 'android:id/text1')
  7121. .with('text', 'GSM WCDMA')
  7122.  
  7123. $ruiObj.click
  7124.  
  7125. waitsecond(1)
  7126. end
  7127.  
  7128. tcase << TestAction.new(:Button_Button1_18) do
  7129. $ruiObj = RUIObject.new.with('objectid', 2089308220).with('selfid', -1318451484).with('textdescid', 1664978912).with('uniqueparentid', 0)
  7130. .with('uitreeindex', 1)
  7131. .with('classname', 'Button')
  7132. .with('resource-id', 'android:id/button1')
  7133. .with('text', 'OK')
  7134.  
  7135. $ruiObj.click
  7136.  
  7137. waitsecond(1)
  7138. end
  7139.  
  7140. tcase << TestAction.new(:pressBack_7) do
  7141. pressBack
  7142. end
  7143.  
  7144. tcase << TestAction.new(:pressBack_8) do
  7145. pressBack
  7146. end
  7147.  
  7148. tcase << TestAction.new(:pressBack_20) do
  7149. pressBack
  7150. end
  7151.  
  7152. tcase << TestAction.new(:pressBack_20_1) do
  7153. pressBack
  7154. end
  7155.  
  7156. tcase << TestAction.new(:pressHome_9) do
  7157. pressHome
  7158. end
  7159.  
  7160. tcase.run(loopTime)
  7161.  
  7162. end
  7163.  
  7164. def self.change_LTE(loopTime)
  7165.  
  7166. tcase = TestCase.new("change_LTE")
  7167.  
  7168. tcase << TestAction.new(:gotoApp_16_1) do
  7169. gotoApp('HiddenMenuCall')
  7170. end
  7171.  
  7172. tcase << TestAction.new(:TextView_Title_3) do
  7173. $ruiObj = RUIObject.new.with('objectid', 1100751325).with('selfid', -167282287).with('textdescid', -350417171).with('uniqueparentid', 0).with('classresourceid', 490183159)
  7174. .with('uitreeindex', 1)
  7175. .with('classname', 'TextView')
  7176. .with('resource-id', 'android:id/title')
  7177. .with('text', 'LG Hidden Menu')
  7178.  
  7179. $ruiObj.click
  7180.  
  7181. waitsecond(1)
  7182. end
  7183.  
  7184. tcase << TestAction.new(:TextView_Title_87) do
  7185. $ruiObj = RUIObject.new.with('objectid', 684902757).with('selfid', 538152793).with('textdescid', -1915478867).with('uniqueparentid', 0).with('classresourceid', 490183159)
  7186. .with('uitreeindex', 4)
  7187. .with('classname', 'TextView')
  7188. .with('resource-id', 'android:id/title')
  7189. .with('text', 'Field Test')
  7190.  
  7191. $ruiObj.click
  7192.  
  7193. waitsecond(1)
  7194. end
  7195.  
  7196. tcase << TestAction.new(:TextView_Text1_10) do
  7197. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', -141259386).with('textdescid', -734720867).with('uniqueparentid', 0).with('classresourceid', 490068035)
  7198. .with('uitreeindex', 1)
  7199. .with('classname', 'TextView')
  7200. .with('resource-id', 'android:id/text1')
  7201. .with('text', 'Modem Settings')
  7202.  
  7203. $ruiObj.click
  7204.  
  7205. waitsecond(1)
  7206. end
  7207.  
  7208. tcase << TestAction.new(:swipeDown_12) do
  7209. swipe_vertical 500
  7210.  
  7211. waitsecond(1)
  7212. end
  7213.  
  7214. tcase << TestAction.new(:TextView_Text1_14) do
  7215. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', 12767364).with('textdescid', 1760273017).with('uniqueparentid', 0).with('classresourceid', 490068035)
  7216. .with('uitreeindex', 6)
  7217. .with('classname', 'TextView')
  7218. .with('resource-id', 'android:id/text1')
  7219. .with('text', 'RAT Selection')
  7220.  
  7221. $ruiObj.click
  7222.  
  7223. waitsecond(1)
  7224. end
  7225.  
  7226. tcase << TestAction.new(:TextView_Text1_2) do
  7227. $ruiObj = RUIObject.new.with('objectid', -483333610).with('selfid', 747569194).with('textdescid', -1653100487).with('uniqueparentid', 0).with('classresourceid', 490068035)
  7228. .with('uitreeindex', 1)
  7229. .with('classname', 'TextView')
  7230. .with('resource-id', 'android:id/text1')
  7231. .with('text', 'GSM WCDMA LTE auto')
  7232.  
  7233. $ruiObj.click
  7234.  
  7235. waitsecond(1)
  7236. end
  7237.  
  7238. tcase << TestAction.new(:Button_Button1_18) do
  7239. $ruiObj = RUIObject.new.with('objectid', 2089308220).with('selfid', -1318451484).with('textdescid', 1664978912).with('uniqueparentid', 0)
  7240. .with('uitreeindex', 1)
  7241. .with('classname', 'Button')
  7242. .with('resource-id', 'android:id/button1')
  7243. .with('text', 'OK')
  7244.  
  7245. $ruiObj.click
  7246.  
  7247. waitsecond(1)
  7248. end
  7249.  
  7250. tcase << TestAction.new(:pressBack_7) do
  7251. pressBack
  7252. end
  7253.  
  7254. tcase << TestAction.new(:pressBack_8) do
  7255. pressBack
  7256. end
  7257.  
  7258. tcase << TestAction.new(:pressBack_20) do
  7259. pressBack
  7260. end
  7261.  
  7262. tcase << TestAction.new(:pressBack_20_1) do
  7263. pressBack
  7264. end
  7265.  
  7266. tcase << TestAction.new(:pressHome_9) do
  7267. pressHome
  7268. end
  7269.  
  7270. tcase.run(loopTime)
  7271.  
  7272. end
  7273.  
  7274. def self.connectWifi(loopTime)
  7275.  
  7276. tcase = TestCase.new("connectWifi")
  7277.  
  7278. tcase << TestAction.new(:scriptAction_2) do
  7279. logStartTest("Connect_to_wifi")
  7280. end
  7281.  
  7282. tcase << TestAction.new(:scriptAction_4) do
  7283. gotoSettings
  7284.  
  7285. waitsecond(2)
  7286. end
  7287.  
  7288. tcase << TestAction.new(:TextView_Title_27) do
  7289. $ruiObj = RUIObject.new.with('objectid', 674368800).with('selfid', -2078686330).with('textdescid', -957350501).with('uniqueparentid', 0)
  7290. .with('uitreeindex', 3)
  7291. .with('classname', 'TextView')
  7292. .with('resource-id', 'android:id/title')
  7293. .with('text', 'Networks')
  7294.  
  7295. $ruiObj.click
  7296.  
  7297. waitsecond(1)
  7298. end
  7299.  
  7300. tcase << TestAction.new(:swipeUp_8) do
  7301. swipe_vertical_back 500
  7302. end
  7303.  
  7304. tcase << TestAction.new(:TextView_Title_4) do
  7305. $ruiObj = RUIObject.new.with('objectid', 2008023572).with('selfid', -589731018).with('textdescid', 498664031).with('uniqueparentid', 0).with('classresourceid', 490183159)
  7306. .with('uitreeindex', 9)
  7307. .with('classname', 'TextView')
  7308. .with('resource-id', 'android:id/title')
  7309. .with('text', 'WiFi')
  7310.  
  7311. $ruiObj.click
  7312.  
  7313. waitsecond(1)
  7314. end
  7315.  
  7316. tcase << TestAction.new(:Button_Button2_2) do
  7317. $ruiObj = RUIObject.new.with('objectid', -360890209).with('selfid', 1219598511).with('textdescid', -1570382871).with('uniqueparentid', 0)
  7318. .with('uitreeindex', 2)
  7319. .with('classname', 'Button')
  7320. .with('resource-id', 'android:id/button2')
  7321. .with('text', 'CLOSE')
  7322.  
  7323. $ruiObj.click
  7324.  
  7325. waitsecond(2)
  7326. end
  7327.  
  7328. tcase << TestAction.new(:scriptAction_6) do
  7329. switchOff = RUIObject.new.with('objectid', 1178284996).with('selfid', -533646533).with('textdescid', -1104515187).with('uniqueparentid', 0)
  7330. .with('uitreeindex', 2)
  7331. .with('classname', 'Switch')
  7332. .with('text', 'OFF')
  7333.  
  7334. if switchOff.isExist
  7335. switchOff.click
  7336. end
  7337.  
  7338. waitsecond(2)
  7339. end
  7340.  
  7341. tcase << TestAction.new(:ImageButton_More_8) do
  7342. $ruiObj = RUIObject.new.with('objectid', 1634319278).with('selfid', 1290820192).with('textdescid', 371464933).with('uniqueparentid', 0)
  7343. .with('uitreeindex', 3)
  7344. .with('classname', 'ImageButton')
  7345. .with('content-desc', 'More options')
  7346.  
  7347. $ruiObj.click
  7348.  
  7349. waitsecond(2)
  7350. end
  7351.  
  7352. tcase << TestAction.new(:TextView_Title_105) do
  7353. $ruiObj = RUIObject.new.with('objectid', -1984796814).with('selfid', -392058123).with('textdescid', -1929502754).with('uniqueparentid', 0).with('classresourceid', 490183159)
  7354. .with('uitreeindex', 0)
  7355. .with('classname', 'TextView')
  7356. .with('resource-id', 'android:id/title')
  7357. .with('text', 'Add WiFi')
  7358.  
  7359. $ruiObj.click
  7360.  
  7361. waitsecond(2)
  7362. end
  7363.  
  7364. tcase << TestAction.new(:EditText_Ssid_12) do
  7365. $ruiObj = RUIObject.new.with('objectid', 1745689399).with('selfid', 1359933717).with('textdescid', -1718203447).with('uniqueparentid', 0).with('classresourceid', -1413606463)
  7366. .with('uitreeindex', 2)
  7367. .with('classname', 'EditText')
  7368. .with('resource-id', 'com.lge.wifisettings:id/ssid')
  7369.  
  7370. $ruiObj.inputtext('qctcomp')
  7371.  
  7372. waitsecond(2)
  7373. end
  7374.  
  7375. tcase << TestAction.new(:TextView_Text1_14) do
  7376. $ruiObj = RUIObject.new.with('objectid', 189805031).with('selfid', -586759035).with('textdescid', 1468089423).with('uniqueparentid', 0).with('classresourceid', 490068035)
  7377. .with('uitreeindex', 4)
  7378. .with('classname', 'TextView')
  7379. .with('resource-id', 'android:id/text1')
  7380. .with('text', 'None')
  7381.  
  7382. $ruiObj.click
  7383.  
  7384. waitsecond(2)
  7385. end
  7386.  
  7387. tcase << TestAction.new(:CheckedTextView_Text1_16) do
  7388. $ruiObj = RUIObject.new.with('objectid', -540328984).with('selfid', 1449740166).with('textdescid', -877093410).with('uniqueparentid', 0).with('classresourceid', 2074814108)
  7389. .with('uitreeindex', 2)
  7390. .with('classname', 'CheckedTextView')
  7391. .with('resource-id', 'android:id/text1')
  7392. .with('text', 'WPAWPA2 PSK')
  7393.  
  7394. $ruiObj.click
  7395.  
  7396. waitsecond(2)
  7397. end
  7398.  
  7399. tcase << TestAction.new(:EditText_Password_12) do
  7400. $ruiObj = RUIObject.new.with('objectid', -976316462).with('selfid', -2120332491).with('textdescid', -201039218).with('uniqueparentid', 0).with('classresourceid', -714852383)
  7401. .with('uitreeindex', 2)
  7402. .with('classname', 'EditText')
  7403. .with('resource-id', 'com.lge.wifisettings:id/password')
  7404.  
  7405. $ruiObj.inputtext('12abcdef34')
  7406.  
  7407. waitsecond(1)
  7408. end
  7409.  
  7410. tcase << TestAction.new(:Button_Button1_2) do
  7411. $ruiObj = RUIObject.new.with('objectid', -1696842928).with('selfid', -210572094).with('textdescid', -1246235802).with('uniqueparentid', 0).with('classresourceid', 1834539358)
  7412. .with('uitreeindex', 10)
  7413. .with('classname', 'Button')
  7414. .with('resource-id', 'android:id/button1')
  7415. .with('text', 'CONNECT')
  7416.  
  7417. $ruiObj.click
  7418.  
  7419. waitsecond(4)
  7420. end
  7421.  
  7422. tcase << TestAction.new(:Button_Button2_18) do
  7423. $ruiObj = RUIObject.new.with('objectid', 435325163).with('selfid', 871101384).with('textdescid', 1989464844).with('uniqueparentid', 0)
  7424. .with('uitreeindex', 4)
  7425. .with('classname', 'Button')
  7426. .with('resource-id', 'android:id/button2')
  7427. .with('text', 'SKIP')
  7428.  
  7429. $ruiObj.click
  7430.  
  7431. waitsecond(2)
  7432. end
  7433.  
  7434. tcase << TestAction.new(:TextView_Summary_16) do
  7435. $ruiObj = RUIObject.new.with('objectid', 1399891586).with('selfid', -404041766).with('textdescid', 623785653).with('uniqueparentid', 0).with('classresourceid', -1930775675)
  7436. .with('uitreeindex', 10)
  7437. .with('classname', 'TextView')
  7438. .with('resource-id', 'android:id/summary')
  7439. .with('text', 'Connected')
  7440.  
  7441. $ruiObj.isExist
  7442. end
  7443.  
  7444. tcase << TestAction.new(:scriptAction_23_TrueFalse) do
  7445. $myTestResult = checkLastExistResult
  7446.  
  7447. if $myTestResult == false
  7448. $myFailReason == "WiFi cannot connected"
  7449. end
  7450. logStopTest("Connect_to_wifi")
  7451. end
  7452.  
  7453. tcase << TestAction.new(:pressBack_15) do
  7454. pressBack
  7455. end
  7456.  
  7457. tcase << TestAction.new(:pressBack_16) do
  7458. pressBack
  7459. end
  7460.  
  7461. tcase << TestAction.new(:pressHome_17) do
  7462. pressHome
  7463. end
  7464.  
  7465. tcase.run(loopTime)
  7466.  
  7467. end
  7468.  
  7469. def self.disconnectWifi(loopTime)
  7470.  
  7471. tcase = TestCase.new("disconnectWifi")
  7472.  
  7473. tcase << TestAction.new(:scriptAction_2) do
  7474. gotoSettings
  7475.  
  7476. waitsecond(2)
  7477. end
  7478.  
  7479. tcase << TestAction.new(:TextView_Title_3) do
  7480. $ruiObj = RUIObject.new.with('objectid', 10212784).with('selfid', -2078686330).with('textdescid', 1550078507).with('uniqueparentid', 0)
  7481. .with('uitreeindex', 5)
  7482. .with('classname', 'TextView')
  7483. .with('resource-id', 'android:id/title')
  7484. .with('text', 'Networks')
  7485.  
  7486. $ruiObj.click
  7487.  
  7488. waitsecond(2)
  7489. end
  7490.  
  7491. tcase << TestAction.new(:swipeUp_8_1) do
  7492. swipe_vertical_back 500
  7493. end
  7494.  
  7495. tcase << TestAction.new(:TextView_Title_7) do
  7496. $ruiObj = RUIObject.new.with('objectid', 67205646).with('selfid', -589731018).with('textdescid', 397088473).with('uniqueparentid', 0).with('classresourceid', 490183159)
  7497. .with('uitreeindex', 16)
  7498. .with('classname', 'TextView')
  7499. .with('resource-id', 'android:id/title')
  7500. .with('text', 'WiFi')
  7501.  
  7502. $ruiObj.click
  7503.  
  7504. waitsecond(2)
  7505. end
  7506.  
  7507. tcase << TestAction.new(:scriptAction_9) do
  7508. $ruiObj = RUIObject.new.with('objectid', 1178284996).with('selfid', 1645353587).with('textdescid', -1975291963).with('uniqueparentid', 0)
  7509. .with('uitreeindex', 2)
  7510. .with('classname', 'Switch')
  7511. .with('text', 'ON')
  7512.  
  7513. if $ruiObj.isExist
  7514. $ruiObj.click
  7515. end
  7516.  
  7517. waitsecond(2)
  7518. end
  7519.  
  7520. tcase << TestAction.new(:pressBack_2) do
  7521. pressBack
  7522.  
  7523. waitsecond(2)
  7524. end
  7525.  
  7526. tcase << TestAction.new(:pressBack_3) do
  7527. pressBack
  7528.  
  7529. waitsecond(2)
  7530. end
  7531.  
  7532. tcase << TestAction.new(:pressBack_4) do
  7533. pressBack
  7534.  
  7535. waitsecond(2)
  7536. end
  7537.  
  7538. tcase.run(loopTime)
  7539.  
  7540. end
  7541.  
  7542. def self.enhanced_LTE_service(loopTime)
  7543.  
  7544. tcase = TestCase.new("enhanced_LTE_service")
  7545.  
  7546. tcase << TestAction.new(:pressHome_1) do
  7547. pressHome
  7548.  
  7549. waitsecond(2)
  7550. end
  7551.  
  7552. tcase << TestAction.new(:gotoApp_5_1) do
  7553. gotoApp('Settings')
  7554.  
  7555. waitsecond(1)
  7556. end
  7557.  
  7558. tcase << TestAction.new(:TextView_Title_2) do
  7559. $ruiObj = RUIObject.new.with('objectid', 10212784).with('selfid', -2078686330).with('textdescid', 1550078507).with('uniqueparentid', 0)
  7560. .with('uitreeindex', 5)
  7561. .with('classname', 'TextView')
  7562. .with('resource-id', 'android:id/title')
  7563. .with('text', 'Networks')
  7564.  
  7565. $ruiObj.click
  7566.  
  7567. waitsecond(2)
  7568. end
  7569.  
  7570. tcase << TestAction.new(:swipeDown_3) do
  7571. swipe_vertical 500
  7572.  
  7573. waitsecond(2)
  7574. end
  7575.  
  7576. tcase << TestAction.new(:TextView_Title_5) do
  7577. $ruiObj = RUIObject.new.with('objectid', -2099539841).with('selfid', -590021802).with('textdescid', -1389148054).with('uniqueparentid', 0).with('classresourceid', 490183159)
  7578. .with('uitreeindex', 34)
  7579. .with('classname', 'TextView')
  7580. .with('resource-id', 'android:id/title')
  7581. .with('text', 'More')
  7582.  
  7583. $ruiObj.click
  7584.  
  7585. waitsecond(2)
  7586. end
  7587.  
  7588. tcase << TestAction.new(:Switch_SwitchWidget_7) do
  7589. $ruiObj = RUIObject.new.with('objectid', -1128160036).with('selfid', -1798770950).with('textdescid', -613222716).with('uniqueparentid', 0).with('classresourceid', -205276468)
  7590. .with('uitreeindex', 4)
  7591. .with('classname', 'Switch')
  7592. .with('resource-id', 'android:id/switch_widget')
  7593.  
  7594. $ruiObj.click
  7595.  
  7596. waitsecond(2)
  7597. end
  7598.  
  7599. tcase.run(loopTime)
  7600.  
  7601. end
  7602.  
  7603. def self.startTest(loopTime)
  7604.  
  7605. tcase = TestCase.new("startTest")
  7606.  
  7607. tcase << TestAction.new(:pressBack_1) do
  7608. pressBack
  7609. end
  7610.  
  7611. tcase << TestAction.new(:pressBack_2) do
  7612. pressBack
  7613. end
  7614.  
  7615. tcase << TestAction.new(:pressHome_3) do
  7616. pressHome
  7617. end
  7618.  
  7619. tcase.run(loopTime)
  7620.  
  7621. end
  7622.  
  7623. def self.StoreFrontDownload_05_01_05_03(loopTime)
  7624.  
  7625. tcase = TestCase.new("StoreFrontDownload_05_01_05_03")
  7626.  
  7627. tcase << TestAction.new(:scriptAction_1) do
  7628. logStartTest("05_01_05_02_StoreFrontDownload")
  7629. end
  7630.  
  7631. tcase << TestAction.new(:gotoApp_2) do
  7632. gotoApp('Play Store')
  7633.  
  7634. waitsecond(8)
  7635. end
  7636.  
  7637. tcase << TestAction.new(:ImageView_SearchBoxIdleText_5) do
  7638. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 0)
  7639. .with('uitreeindex', 32)
  7640. .with('classname', 'ImageView')
  7641. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  7642. .with('content-desc', 'Search')
  7643.  
  7644. $ruiObj.click
  7645.  
  7646. waitsecond(1)
  7647. end
  7648.  
  7649. tcase << TestAction.new(:EditText_SearchBoxTextInput_6) do
  7650. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 0)
  7651. .with('uitreeindex', 32)
  7652. .with('classname', 'EditText')
  7653. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  7654.  
  7655. $ruiObj.inputtext('ColorNote')
  7656.  
  7657. waitsecond(1)
  7658. end
  7659.  
  7660. tcase << TestAction.new(:pressEnter_2) do
  7661. pressEnter
  7662.  
  7663. waitsecond(4)
  7664. end
  7665.  
  7666. tcase << TestAction.new(:TextView_LiTitle_2) do
  7667. $ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', -1969590474).with('textdescid', 83190698).with('uniqueparentid', 0)
  7668. .with('uitreeindex', 1)
  7669. .with('classname', 'TextView')
  7670. .with('resource-id', 'com.android.vending:id/li_title')
  7671. .with('content-desc', 'App: ColorNote Notepad Notes')
  7672. .with('text', 'ColorNote Notepad Notes')
  7673.  
  7674. $ruiObj.click
  7675.  
  7676. waitsecond(2)
  7677. end
  7678.  
  7679. tcase << TestAction.new(:Button_UninstallButton_UnInstall_exist) do
  7680. $ruiObj = RUIObject.new.with('classname', 'Button').with('text', 'UNINSTALL')
  7681.  
  7682. $ruiObj.isExist
  7683. ifFailJumpTo(:Button_BuyButton_1)
  7684.  
  7685. waitsecond(1)
  7686. end
  7687.  
  7688. tcase << TestAction.new(:Button_UninstallButton_UninstallCK_1) do
  7689. $ruiObj = RUIObject.new.with('classname', 'Button').with('text', 'UNINSTALL')
  7690.  
  7691. $ruiObj.click
  7692.  
  7693. waitsecond(1)
  7694. end
  7695.  
  7696. tcase << TestAction.new(:Button_Button1_Clk_OK) do
  7697. $ruiObj = RUIObject.new.with('classname', 'Button').with('text', 'OK')
  7698.  
  7699. $ruiObj.click
  7700.  
  7701. waitsecond(8)
  7702. end
  7703.  
  7704. tcase << TestAction.new(:Button_BuyButton_1) do
  7705. $ruiObj = RUIObject.new.with('classname', 'Button')
  7706. .with('text', 'INSTALL')
  7707.  
  7708. $ruiObj.click
  7709.  
  7710. waitsecond(2)
  7711. end
  7712.  
  7713. tcase << TestAction.new(:Button_PositiveButton_4) do
  7714. $ruiObj = RUIObject.new.with('classname', 'Button')
  7715. .with('text', 'CONTINUE')
  7716.  
  7717. $ruiObj.click
  7718.  
  7719. waitsecond(2)
  7720. end
  7721.  
  7722. tcase << TestAction.new(:wait1second_6) do
  7723. waitsecond(1)
  7724. end
  7725.  
  7726. tcase << TestAction.new(:Button_UninstallButton_4) do
  7727. $ruiObj = RUIObject.new.with('classname', 'Button').with('text', 'UNINSTALL')
  7728.  
  7729. $ruiObj.isExist
  7730.  
  7731. waitsecond(1)
  7732. end
  7733.  
  7734. tcase << TestAction.new(:scriptAction_CheckPass) do
  7735. $myTestResult = checkLastExistResult
  7736.  
  7737. if $myTestResult == false
  7738. $myFailReason == "Install Failed"
  7739. end
  7740. logStopTest("05_01_05_02_StoreFrontDownload")
  7741. end
  7742.  
  7743. tcase << TestAction.new(:pressBack_16) do
  7744. pressBack
  7745. end
  7746.  
  7747. tcase << TestAction.new(:pressBack_17) do
  7748. pressBack
  7749. end
  7750.  
  7751. tcase << TestAction.new(:pressHome_19) do
  7752. pressHome
  7753. end
  7754.  
  7755. tcase.run(loopTime)
  7756.  
  7757. end
  7758.  
  7759. def self.MultiMedia_05_01_07_06(loopTime)
  7760.  
  7761. tcase = TestCase.new("MultiMedia_05_01_07_06")
  7762.  
  7763. tcase << TestAction.new(:scriptAction_1) do
  7764. logStartTest("05_01_07_06_MultiMedia")
  7765. end
  7766.  
  7767. tcase << TestAction.new(:gotoApp_1) do
  7768. gotoApp('Camera')
  7769.  
  7770. waitsecond(4)
  7771. end
  7772.  
  7773. tcase << TestAction.new(:ImageView_Thumbnail_2) do
  7774. $ruiObj = RUIObject.new.with('objectid', -2123601541).with('selfid', -135259702).with('textdescid', 357252685).with('uniqueparentid', 0)
  7775. .with('uitreeindex', 14)
  7776. .with('classname', 'ImageView')
  7777. .with('resource-id', 'com.lge.camera:id/thumbnail')
  7778. .with('content-desc', 'Gallery')
  7779.  
  7780. $ruiObj.click
  7781.  
  7782. waitsecond(2)
  7783. end
  7784.  
  7785. tcase << TestAction.new(:TextView_ResolverText_2) do
  7786. $ruiObj = RUIObject.new.with('objectid', 1736845148).with('selfid', 1695477105).with('textdescid', -880470158).with('uniqueparentid', 0).with('classresourceid', -472389065)
  7787. .with('uitreeindex', 4)
  7788. .with('classname', 'TextView')
  7789. .with('resource-id', 'com.lge:id/resolver_text')
  7790. .with('text', 'Gallery')
  7791.  
  7792. $ruiObj.click
  7793.  
  7794. waitsecond(2)
  7795. end
  7796.  
  7797. tcase << TestAction.new(:Button_AllowButton_4) do
  7798. $ruiObj = RUIObject.new.with('objectid', -1049422851).with('selfid', -808516471).with('textdescid', -374437087).with('uniqueparentid', 0).with('classresourceid', 771022871)
  7799. .with('uitreeindex', 10)
  7800. .with('classname', 'Button')
  7801. .with('resource-id', 'com.lge:id/allow_button')
  7802. .with('text', 'OK')
  7803.  
  7804. $ruiObj.click
  7805.  
  7806. waitsecond(2)
  7807. end
  7808.  
  7809. tcase << TestAction.new(:Button_BottomMenuLayerItem5_2) do
  7810. $ruiObj = RUIObject.new
  7811. .with('classname', 'Button')
  7812. .with('content-desc', 'Delete')
  7813. .with('text', 'Delete')
  7814.  
  7815. $ruiObj.isExist
  7816.  
  7817. waitsecond(0)
  7818. end
  7819.  
  7820. tcase << TestAction.new(:Button_BottomMenuLayerItem5_4) do
  7821. $ruiObj = RUIObject.new.with('classname', 'Button')
  7822. .with('content-desc', 'Delete')
  7823. .with('text', 'Delete')
  7824.  
  7825. $ruiObj.click
  7826.  
  7827. waitsecond(2)
  7828. end
  7829.  
  7830. tcase << TestAction.new(:scriptAction_5) do
  7831. $myTestResult = checkLastExistResult
  7832.  
  7833. if $myTestResult == false
  7834. $myFailReason == "Picture is not found"
  7835. end
  7836. logStopTest("05_01_07_06_MultiMedia")
  7837. end
  7838.  
  7839. tcase << TestAction.new(:pressBack_6) do
  7840. pressBack
  7841. end
  7842.  
  7843. tcase << TestAction.new(:pressBack_7) do
  7844. pressBack
  7845. end
  7846.  
  7847. tcase << TestAction.new(:pressHome_8) do
  7848. pressHome
  7849. end
  7850.  
  7851. tcase.run(loopTime)
  7852.  
  7853. end
  7854.  
  7855. def self.exception_handler
  7856. puts "Module Exception Hanlder..."
  7857. if ($lastPackageName == "android")
  7858. android_ExpHandler(1)
  7859. end
  7860. end
  7861.  
  7862. def self.run(loop)
  7863. mainLoop loop
  7864. end
  7865.  
  7866. end
  7867.  
  7868. $exceptionPackageNameList = []
  7869. $exceptionPackageNameList_exclude = []
  7870. $exceptionPackageNameList << "android"
  7871.  
  7872. def exception_handler
  7873. JOAN_MTBF_Sprint.exception_handler
  7874. end
  7875.  
  7876. $curProjectLogFile = $useLastLogFile
  7877.  
  7878. $curProjectLogFile = "JOAN_MTBF_Sprint_#{getTimeStamp}.log" if $useLastLogFile.nil?
  7879.  
  7880. $useLastLogFile = nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement