Advertisement
Guest User

Untitled

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