Advertisement
Guest User

Untitled

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