Advertisement
Guest User

Untitled

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