Advertisement
Guest User

Untitled

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