Advertisement
Guest User

Untitled

a guest
May 22nd, 2017
570
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 247.06 KB | None | 0 0
  1. loadTestDB
  2.  
  3. module SNOWBIRD_MTBF
  4.  
  5. def self.Browser_5_1_4_1(loopTime)
  6.  
  7. tcase = TestCase.new("Browser_5_1_4_1")
  8.  
  9. tcase << TestAction.new(:Home) do
  10. pressHome
  11.  
  12. waitsecond(2)
  13. end
  14.  
  15. tcase << TestAction.new(:logStart) do
  16. logStartTest("Browser_5_1_4_1")
  17.  
  18. waitsecond(0)
  19. end
  20.  
  21. tcase << TestAction.new(:gotoChrome) do
  22. gotoAppPixel("Chrome")
  23.  
  24. waitsecond(2)
  25. end
  26.  
  27. tcase << TestAction.new(:OpenTabs) do
  28. $ruiObj = RUIObject.new.with('objectid', 1733100788).with('selfid', 1714812761).with('textdescid', 885754).with('uniqueparentid', 753086758)
  29. .with('uitreeindex', 31)
  30. .with('classname', 'ImageButton')
  31. .with('resource-id', 'com.android.chrome:id/tab_switcher_button')
  32. .with('content-desc', '1 open tab')
  33.  
  34. $ruiObj.click
  35.  
  36. waitsecond(2)
  37. end
  38.  
  39. tcase << TestAction.new(:NewTab) do
  40. $ruiObj = RUIObject.new.with('objectid', -1772071808).with('selfid', 820590808).with('textdescid', 561000469).with('uniqueparentid', -857215705)
  41. .with('uitreeindex', 1)
  42. .with('classname', 'Button')
  43. .with('resource-id', 'com.android.chrome:id/new_tab_button')
  44. .with('content-desc', 'New tab')
  45.  
  46. $ruiObj.click
  47.  
  48. waitsecond(2)
  49. end
  50.  
  51. tcase << TestAction.new(:Att1) do
  52. $ruiObj = RUIObject.new.with('objectid', -740560065).with('selfid', 1023920737).with('textdescid', -1482525503).with('uniqueparentid', -1010905038)
  53. .with('uitreeindex', 1)
  54. .with('classname', 'EditText')
  55. .with('resource-id', 'com.android.chrome:id/search_box_text')
  56.  
  57. $ruiObj.inputtext('www.att.com')
  58.  
  59. waitsecond(2)
  60. end
  61.  
  62. tcase << TestAction.new(:Enter) do
  63. pressEnter
  64.  
  65. waitsecond(2)
  66. end
  67.  
  68. tcase << TestAction.new(:Loading) do
  69. waitsecond(2)
  70.  
  71. $attWait = RUIObject.new.with('objectid', 1040592064).with('selfid', 1955905798).with('textdescid', -1063252184).with('uniqueparentid', 107476858)
  72. .with('uitreeindex', 2)
  73. .with('classname', 'Button')
  74. .with('content-desc', 'Search')
  75.  
  76. $second = 0;
  77.  
  78. while ($attWait.isNotExist) && $second < 10
  79. puts $second
  80. $second += 1
  81. waitsecond(1)
  82. end
  83.  
  84. waitsecond(2)
  85. end
  86.  
  87. tcase << TestAction.new(:Failcheck) do
  88. $ruiObj = RUIObject.new.with('objectid', 1040592064).with('selfid', 1955905798).with('textdescid', -1063252184).with('uniqueparentid', 107476858)
  89. .with('uitreeindex', 2)
  90. .with('classname', 'Button')
  91. .with('content-desc', 'Search')
  92.  
  93. $ruiObj.isExist
  94.  
  95. waitsecond(0)
  96. end
  97.  
  98. tcase << TestAction.new(:Result) do
  99. $myTestResult = checkLastExistResult
  100.  
  101. waitsecond(0)
  102. end
  103.  
  104. tcase << TestAction.new(:OpenTab) do
  105. $ruiObj = RUIObject.new.with('objectid', 1733100788).with('selfid', 1714812761).with('textdescid', 885754).with('uniqueparentid', 753086758)
  106. .with('uitreeindex', 88)
  107. .with('classname', 'ImageButton')
  108. .with('resource-id', 'com.android.chrome:id/tab_switcher_button')
  109. .with('content-desc', '1 open tab')
  110.  
  111. $ruiObj.click
  112.  
  113. waitsecond(2)
  114. end
  115.  
  116. tcase << TestAction.new(:Menu) do
  117. $ruiObj = RUIObject.new.with('objectid', 286278959).with('selfid', -17041368).with('textdescid', 536559428).with('uniqueparentid', -1426174679)
  118. .with('uitreeindex', 3)
  119. .with('classname', 'ImageButton')
  120. .with('resource-id', 'com.android.chrome:id/menu_button')
  121. .with('content-desc', 'More options')
  122.  
  123. $ruiObj.click
  124.  
  125. waitsecond(2)
  126. end
  127.  
  128. tcase << TestAction.new(:CloseAllTab) do
  129. $ruiObj = RUIObject.new.with('objectid', -1231103165).with('selfid', 437378293).with('textdescid', -1236643043).with('uniqueparentid', 1228315496).with('classresourceid', -11696959)
  130. .with('uitreeindex', 2)
  131. .with('classname', 'TextView')
  132. .with('resource-id', 'com.android.chrome:id/menu_item_text')
  133. .with('content-desc', 'Close all tabs')
  134. .with('text', 'Close all tabs')
  135.  
  136. $ruiObj.click
  137.  
  138. waitsecond(2)
  139. end
  140.  
  141. tcase << TestAction.new(:Settings) do
  142. gotoAppPixel("Settings")
  143.  
  144. waitsecond(2)
  145. end
  146.  
  147. tcase << TestAction.new(:Apps) do
  148. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', -999362027).with('textdescid', -2077380333).with('uniqueparentid', 1746487935)
  149. .with('uitreeindex', 18)
  150. .with('classname', 'TextView')
  151. .with('resource-id', 'android:id/title')
  152. .with('text', 'Apps notifications')
  153.  
  154. $ruiObj.click
  155.  
  156. waitsecond(2)
  157. end
  158.  
  159. tcase << TestAction.new(:SearchChrome) do
  160. scrollAndSearchText("Chrome")
  161.  
  162. waitsecond(2)
  163. end
  164.  
  165. tcase << TestAction.new(:Chrome) do
  166. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', -368011717).with('textdescid', -2137822469).with('uniqueparentid', 1418026757)
  167. .with('uitreeindex', 4)
  168. .with('classname', 'TextView')
  169. .with('resource-id', 'android:id/title')
  170. .with('text', 'Chrome')
  171.  
  172. $ruiObj.click
  173.  
  174. waitsecond(2)
  175. end
  176.  
  177. tcase << TestAction.new(:Storage) do
  178. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', -1162414374).with('textdescid', -2051153520).with('uniqueparentid', -1774219556)
  179. .with('uitreeindex', 10)
  180. .with('classname', 'TextView')
  181. .with('resource-id', 'android:id/title')
  182. .with('text', 'Storage')
  183.  
  184. $ruiObj.click
  185.  
  186. waitsecond(2)
  187. end
  188.  
  189. tcase << TestAction.new(:ClearCache) do
  190. $ruiObj = RUIObject.new.with('objectid', 1453245671).with('selfid', 606168607).with('textdescid', 1434483946).with('uniqueparentid', 1890970267)
  191. .with('uitreeindex', 6)
  192. .with('classname', 'Button')
  193. .with('resource-id', 'com.android.settings:id/right_button')
  194. .with('text', 'CLEAR CACHE')
  195.  
  196. $ruiObj.click
  197.  
  198. waitsecond(2)
  199. end
  200.  
  201. tcase << TestAction.new(:LogStop) do
  202. logStopTest("Browser_5_1_4_1")
  203.  
  204. waitsecond(0)
  205. end
  206.  
  207. tcase.run(loopTime)
  208.  
  209. end
  210.  
  211. def self.Browser_5_1_4_2(loopTime)
  212.  
  213. tcase = TestCase.new("Browser_5_1_4_2")
  214.  
  215. tcase << TestAction.new(:Home) do
  216. pressHome
  217.  
  218. waitsecond(2)
  219. end
  220.  
  221. tcase << TestAction.new(:logStart) do
  222. logStartTest("Browser_5_1_4_2")
  223.  
  224. waitsecond(0)
  225. end
  226.  
  227. tcase << TestAction.new(:gotoChrome) do
  228. gotoAppPixel('Chrome')
  229.  
  230.  
  231. waitsecond(2)
  232. end
  233.  
  234. tcase << TestAction.new(:Tab) do
  235. $ruiObj = RUIObject.new.with('objectid', 1733100788).with('selfid', 1877756082).with('textdescid', -559267845).with('uniqueparentid', -1651273323)
  236. .with('uitreeindex', 20)
  237. .with('classname', 'ImageButton')
  238. .with('resource-id', 'com.android.chrome:id/tab_switcher_button')
  239. .with('content-desc', 'open tabs')
  240.  
  241. $ruiObj.click
  242.  
  243. waitsecond(2)
  244. end
  245.  
  246. tcase << TestAction.new(:NewTab) do
  247. $ruiObj = RUIObject.new.with('objectid', -1772071808).with('selfid', 820590808).with('textdescid', 561000469).with('uniqueparentid', 54637515)
  248. .with('uitreeindex', 1)
  249. .with('classname', 'Button')
  250. .with('resource-id', 'com.android.chrome:id/new_tab_button')
  251. .with('content-desc', 'New tab')
  252.  
  253. $ruiObj.click
  254.  
  255. waitsecond(2)
  256. end
  257.  
  258. tcase << TestAction.new(:Link1) do
  259. uitree.q("ImageView@com.android.chrome:id/tile_view_icon@@0").click
  260.  
  261. waitsecond(2)
  262. end
  263.  
  264. tcase << TestAction.new(:Loading_1) do
  265. waitsecond(2)
  266.  
  267. $attWait = RUIObject.new.with('objectid', 1040592064).with('selfid', 1955905798).with('textdescid', -1063252184).with('uniqueparentid', 107476858)
  268. .with('uitreeindex', 2)
  269. .with('classname', 'Button')
  270. .with('content-desc', 'Search')
  271.  
  272. $second = 0;
  273.  
  274. while ($attWait.isNotExist) && $second < 10
  275. puts $second
  276. $second += 1
  277. waitsecond(1)
  278. end
  279.  
  280. waitsecond(2)
  281. end
  282.  
  283. tcase << TestAction.new(:Failcheck_1) do
  284. $ruiObj = RUIObject.new.with('objectid', 1040592064).with('selfid', 1955905798).with('textdescid', -1063252184).with('uniqueparentid', 107476858)
  285. .with('uitreeindex', 2)
  286. .with('classname', 'Button')
  287. .with('content-desc', 'Search')
  288.  
  289. $ruiObj.isExist
  290.  
  291. waitsecond(0)
  292. end
  293.  
  294. tcase << TestAction.new(:Result1) do
  295. $myTestResult = checkLastExistResult
  296.  
  297. waitsecond(0)
  298. end
  299.  
  300. tcase << TestAction.new(:Down1) do
  301. swipe_vertical 100
  302. swipe_vertical 100
  303. swipe_vertical 100
  304. swipe_vertical 100
  305. swipe_vertical 100
  306. swipe_vertical 100
  307. swipe_vertical 100
  308. swipe_vertical 100
  309.  
  310.  
  311. waitsecond(2)
  312. end
  313.  
  314. tcase << TestAction.new(:clickLink1) do
  315. $ruiObj = RUIObject.new.with('objectid', 761580953).with('selfid', -6287651).with('textdescid', -491663525).with('uniqueparentid', -1512430850).with('classresourceid', 1815484335)
  316. .with('uitreeindex', 71)
  317. .with('classname', 'android.view.View')
  318. .with('content-desc', 'About AT&T')
  319.  
  320. $ruiObj.click
  321.  
  322. waitsecond(2)
  323. end
  324.  
  325. tcase << TestAction.new(:Tab2) do
  326. $ruiObj = RUIObject.new.with('objectid', 1733100788).with('selfid', 1877756082).with('textdescid', -559267845).with('uniqueparentid', -1651273323)
  327. .with('uitreeindex', 20)
  328. .with('classname', 'ImageButton')
  329. .with('resource-id', 'com.android.chrome:id/tab_switcher_button')
  330. .with('content-desc', 'open tabs')
  331.  
  332. $ruiObj.click
  333.  
  334. waitsecond(2)
  335. end
  336.  
  337. tcase << TestAction.new(:NewTab2) do
  338. $ruiObj = RUIObject.new.with('objectid', -1772071808).with('selfid', 820590808).with('textdescid', 561000469).with('uniqueparentid', 54637515)
  339. .with('uitreeindex', 1)
  340. .with('classname', 'Button')
  341. .with('resource-id', 'com.android.chrome:id/new_tab_button')
  342. .with('content-desc', 'New tab')
  343.  
  344. $ruiObj.click
  345.  
  346. waitsecond(2)
  347. end
  348.  
  349. tcase << TestAction.new(:Link2) do
  350. uitree.q("ImageView@com.android.chrome:id/tile_view_icon@@0").click
  351.  
  352. waitsecond(2)
  353. end
  354.  
  355. tcase << TestAction.new(:Loading_1_1) do
  356. waitsecond(2)
  357.  
  358. $attWait = RUIObject.new.with('objectid', 1040592064).with('selfid', 1955905798).with('textdescid', -1063252184).with('uniqueparentid', 107476858)
  359. .with('uitreeindex', 2)
  360. .with('classname', 'Button')
  361. .with('content-desc', 'Search')
  362.  
  363. $second = 0;
  364.  
  365. while ($attWait.isNotExist) && $second < 10
  366. puts $second
  367. $second += 1
  368. waitsecond(1)
  369. end
  370.  
  371. waitsecond(2)
  372. end
  373.  
  374. tcase << TestAction.new(:Down1_1) do
  375. swipe_vertical 100
  376. swipe_vertical 100
  377. swipe_vertical 100
  378. swipe_vertical 100
  379. swipe_vertical 100
  380. swipe_vertical 100
  381. swipe_vertical 100
  382. swipe_vertical 100
  383.  
  384.  
  385. waitsecond(2)
  386. end
  387.  
  388. tcase << TestAction.new(:clickLink) do
  389. $ruiObj = RUIObject.new.with('objectid', 761580953).with('selfid', 485825171).with('textdescid', 1878932069).with('uniqueparentid', 858164744).with('classresourceid', 1815484335)
  390. .with('uitreeindex', 72)
  391. .with('classname', 'android.view.View')
  392. .with('content-desc', 'Contact us')
  393.  
  394. $ruiObj.click
  395.  
  396. waitsecond(2)
  397. end
  398.  
  399. tcase << TestAction.new(:Tab3) do
  400. $ruiObj = RUIObject.new.with('objectid', 1733100788).with('selfid', 1877756082).with('textdescid', -559267845).with('uniqueparentid', -1651273323)
  401. .with('uitreeindex', 108)
  402. .with('classname', 'ImageButton')
  403. .with('resource-id', 'com.android.chrome:id/tab_switcher_button')
  404. .with('content-desc', 'open tabs')
  405.  
  406. $ruiObj.click
  407.  
  408. waitsecond(2)
  409. end
  410.  
  411. tcase << TestAction.new(:NewTab3) do
  412. $ruiObj = RUIObject.new.with('objectid', -1772071808).with('selfid', 820590808).with('textdescid', 561000469).with('uniqueparentid', -857215705)
  413. .with('uitreeindex', 1)
  414. .with('classname', 'Button')
  415. .with('resource-id', 'com.android.chrome:id/new_tab_button')
  416. .with('content-desc', 'New tab')
  417.  
  418. $ruiObj.click
  419.  
  420. waitsecond(2)
  421. end
  422.  
  423. tcase << TestAction.new(:Link3) do
  424. uitree.q("ImageView@com.android.chrome:id/tile_view_icon@@0").click
  425.  
  426. waitsecond(2)
  427. end
  428.  
  429. tcase << TestAction.new(:Tab4) do
  430. $ruiObj = RUIObject.new.with('objectid', 1733100788).with('selfid', 1877756082).with('textdescid', -559267845).with('uniqueparentid', -1651273323)
  431. .with('uitreeindex', 19)
  432. .with('classname', 'ImageButton')
  433. .with('resource-id', 'com.android.chrome:id/tab_switcher_button')
  434. .with('content-desc', 'open tabs')
  435.  
  436. $ruiObj.click
  437.  
  438. waitsecond(2)
  439. end
  440.  
  441. tcase << TestAction.new(:Up1) do
  442. swipe_vertical_back 500
  443.  
  444. waitsecond(2)
  445. end
  446.  
  447. tcase << TestAction.new(:click1) do
  448. click(693,688.5)
  449.  
  450. waitsecond(2)
  451. end
  452.  
  453. tcase << TestAction.new(:Failcheck) do
  454. $ruiObj = RUIObject.new.with('objectid', 1733100788).with('selfid', 1748673363).with('textdescid', -265864838).with('uniqueparentid', 1682079956)
  455. .with('uitreeindex', 95)
  456. .with('classname', 'ImageButton')
  457. .with('resource-id', 'com.android.chrome:id/tab_switcher_button')
  458. .with('content-desc', 'open tabs')
  459.  
  460. $ruiObj.isExist
  461.  
  462. waitsecond(0)
  463. end
  464.  
  465. tcase << TestAction.new(:Result) do
  466. $myTestResult = checkLastExistResult
  467.  
  468. waitsecond(0)
  469. end
  470.  
  471. tcase << TestAction.new(:Tab6) do
  472. $ruiObj = RUIObject.new.with('objectid', 1733100788).with('selfid', 1748673363).with('textdescid', -265864838).with('uniqueparentid', 1682079956)
  473. .with('uitreeindex', 95)
  474. .with('classname', 'ImageButton')
  475. .with('resource-id', 'com.android.chrome:id/tab_switcher_button')
  476. .with('content-desc', '2 open tabs')
  477.  
  478. $ruiObj.click
  479.  
  480. waitsecond(2)
  481. end
  482.  
  483. tcase << TestAction.new(:Menu) do
  484. $ruiObj = RUIObject.new.with('objectid', 286278959).with('selfid', -17041368).with('textdescid', 536559428).with('uniqueparentid', -1426174679)
  485. .with('uitreeindex', 96)
  486. .with('classname', 'ImageButton')
  487. .with('resource-id', 'com.android.chrome:id/menu_button')
  488. .with('content-desc', 'More options')
  489.  
  490. $ruiObj.click
  491.  
  492. waitsecond(2)
  493. end
  494.  
  495. tcase << TestAction.new(:CloseTabs) do
  496. $ruiObj = RUIObject.new.with('objectid', -1231103165).with('selfid', 437378293).with('textdescid', -1236643043).with('uniqueparentid', 1228315496).with('classresourceid', -11696959)
  497. .with('uitreeindex', 2)
  498. .with('classname', 'TextView')
  499. .with('resource-id', 'com.android.chrome:id/menu_item_text')
  500. .with('content-desc', 'Close all tabs')
  501. .with('text', 'Close all tabs')
  502.  
  503. $ruiObj.click
  504.  
  505. waitsecond(2)
  506. end
  507.  
  508. tcase << TestAction.new(:logStop) do
  509. logStopTest("Browser_5_1_4_2")
  510.  
  511. waitsecond(0)
  512. end
  513.  
  514. tcase.run(loopTime)
  515.  
  516. end
  517.  
  518. def self.Browser_5_1_4_3(loopTime)
  519.  
  520. tcase = TestCase.new("Browser_5_1_4_3")
  521.  
  522. tcase << TestAction.new(:Home) do
  523. pressHome
  524.  
  525. waitsecond(2)
  526. end
  527.  
  528. tcase << TestAction.new(:logStart) do
  529. logStartTest("Browser_5_1_4_3")
  530.  
  531. waitsecond(0)
  532. end
  533.  
  534. tcase << TestAction.new(:gotoChrome) do
  535. gotoAppPixel('Chrome')
  536.  
  537.  
  538. waitsecond(2)
  539. end
  540.  
  541. tcase << TestAction.new(:Tab1) do
  542. $ruiObj = RUIObject.new.with('objectid', 1733100788).with('selfid', 1714812761).with('textdescid', 885754).with('uniqueparentid', 753086758)
  543. .with('uitreeindex', 29)
  544. .with('classname', 'ImageButton')
  545. .with('resource-id', 'com.android.chrome:id/tab_switcher_button')
  546. .with('content-desc', '1 open tab')
  547.  
  548. $ruiObj.click
  549.  
  550. waitsecond(2)
  551. end
  552.  
  553. tcase << TestAction.new(:NewTab) do
  554. $ruiObj = RUIObject.new.with('objectid', -1772071808).with('selfid', 820590808).with('textdescid', 561000469).with('uniqueparentid', 54637515)
  555. .with('uitreeindex', 1)
  556. .with('classname', 'Button')
  557. .with('resource-id', 'com.android.chrome:id/new_tab_button')
  558. .with('content-desc', 'New tab')
  559.  
  560. $ruiObj.click
  561.  
  562. waitsecond(2)
  563. end
  564.  
  565. tcase << TestAction.new(:URL1) do
  566. $ruiObj = RUIObject.new.with('objectid', -740560065).with('selfid', 1023920737).with('textdescid', -1482525503).with('uniqueparentid', -1010905038)
  567. .with('uitreeindex', 1)
  568. .with('classname', 'EditText')
  569. .with('resource-id', 'com.android.chrome:id/search_box_text')
  570.  
  571. $ruiObj.inputtext('www.ebay.com')
  572.  
  573. waitsecond(2)
  574. end
  575.  
  576. tcase << TestAction.new(:Enter1) do
  577. pressEnter
  578.  
  579. waitsecond(2)
  580. end
  581.  
  582. tcase << TestAction.new(:Loading) do
  583. waitsecond(2)
  584.  
  585. $ebayWait = RUIObject.new.with('objectid', 609044440).with('selfid', 1175141772).with('textdescid', -2143820243).with('uniqueparentid', -1830344402)
  586. .with('uitreeindex', 4)
  587. .with('classname', 'android.view.View')
  588. .with('content-desc', 'eBay Home page')
  589.  
  590. $second = 0;
  591.  
  592. while ($ebayWait.isNotExist) && $second < 10
  593. puts $second
  594. $second += 1
  595. waitsecond(1)
  596. end
  597.  
  598. waitsecond(2)
  599. end
  600.  
  601. tcase << TestAction.new(:Wait) do
  602. waitsecond(2)
  603.  
  604. waitsecond(2)
  605. end
  606.  
  607. tcase << TestAction.new(:FailCheck1) do
  608. $ruiObj = RUIObject.new.with('objectid', 609044440).with('selfid', 1175141772).with('textdescid', -2143820243).with('uniqueparentid', -1830344402)
  609. .with('uitreeindex', 4)
  610. .with('classname', 'android.view.View')
  611. .with('content-desc', 'eBay Home page')
  612.  
  613.  
  614.  
  615. $ruiObj.isExist
  616.  
  617. waitsecond(0)
  618. end
  619.  
  620. tcase << TestAction.new(:Result1) do
  621. $myTestResult = checkLastExistResult
  622.  
  623. waitsecond(0)
  624. end
  625.  
  626. tcase << TestAction.new(:URL2) do
  627. $ruiObj = RUIObject.new.with('objectid', 800382463).with('selfid', 613381324).with('textdescid', -957947391).with('uniqueparentid', -420161517)
  628. .with('uitreeindex', 90)
  629. .with('classname', 'EditText')
  630. .with('resource-id', 'com.android.chrome:id/url_bar')
  631.  
  632. $ruiObj.inputtext('www.yahoo.com')
  633.  
  634. waitsecond(2)
  635. end
  636.  
  637. tcase << TestAction.new(:Enter2) do
  638. pressEnter
  639.  
  640. waitsecond(2)
  641. end
  642.  
  643. tcase << TestAction.new(:Loading2) do
  644. waitsecond(2)
  645.  
  646. $yahooWait = RUIObject.new.with('objectid', -530407122).with('selfid', -326866941).with('textdescid', 13521966).with('uniqueparentid', -191624725)
  647. .with('uitreeindex', 5)
  648. .with('classname', 'Button')
  649. .with('resource-id', 'placeHolder-search-btn')
  650. .with('content-desc', 'Search Search')
  651.  
  652. $second = 0;
  653.  
  654. while ($yahooWait.isNotExist) && $second < 10
  655. puts $second
  656. $second += 1
  657. waitsecond(1)
  658. end
  659.  
  660. waitsecond(2)
  661. end
  662.  
  663. tcase << TestAction.new(:Wait2) do
  664. waitsecond(2)
  665.  
  666. waitsecond(2)
  667. end
  668.  
  669. tcase << TestAction.new(:FailCheck2) do
  670. $ruiObj = RUIObject.new.with('objectid', -530407122).with('selfid', -326866941).with('textdescid', 13521966).with('uniqueparentid', -191624725)
  671. .with('uitreeindex', 5)
  672. .with('classname', 'Button')
  673. .with('resource-id', 'placeHolder-search-btn')
  674. .with('content-desc', 'Search Search')
  675.  
  676.  
  677.  
  678. $ruiObj.isExist
  679.  
  680. waitsecond(0)
  681. end
  682.  
  683. tcase << TestAction.new(:Result2) do
  684. $myTestResult = checkLastExistResult
  685.  
  686. waitsecond(0)
  687. end
  688.  
  689. tcase << TestAction.new(:URL3) do
  690. $ruiObj = RUIObject.new.with('objectid', 800382463).with('selfid', 613381324).with('textdescid', -957947391).with('uniqueparentid', -939721082)
  691. .with('uitreeindex', 114)
  692. .with('classname', 'EditText')
  693. .with('resource-id', 'com.android.chrome:id/url_bar')
  694.  
  695. $ruiObj.inputtext('www.amazon.com')
  696.  
  697. waitsecond(2)
  698. end
  699.  
  700. tcase << TestAction.new(:Enter3) do
  701. pressEnter
  702.  
  703. waitsecond(2)
  704. end
  705.  
  706. tcase << TestAction.new(:Loading3) do
  707. waitsecond(2)
  708.  
  709. $amazonWait = RUIObject.new.with('objectid', -1521303824).with('selfid', 1797265808).with('textdescid', 1249383791).with('uniqueparentid', -2005587295)
  710. .with('uitreeindex', 9)
  711. .with('classname', 'android.view.View')
  712. .with('content-desc', 'Prime')
  713.  
  714. $second = 0;
  715.  
  716. while ($amazonWait.isNotExist) && $second < 10
  717. puts $second
  718. $second += 1
  719. waitsecond(1)
  720. end
  721.  
  722. waitsecond(2)
  723. end
  724.  
  725. tcase << TestAction.new(:Wait3) do
  726. waitsecond(2)
  727.  
  728. waitsecond(2)
  729. end
  730.  
  731. tcase << TestAction.new(:FailCheck3) do
  732. $ruiObj = RUIObject.new.with('objectid', -1521303824).with('selfid', 1797265808).with('textdescid', 1249383791).with('uniqueparentid', -2005587295)
  733. .with('uitreeindex', 9)
  734. .with('classname', 'android.view.View')
  735. .with('content-desc', 'Prime')
  736.  
  737.  
  738. $ruiObj.isExist
  739.  
  740. waitsecond(0)
  741. end
  742.  
  743. tcase << TestAction.new(:Result3) do
  744. $myTestResult = checkLastExistResult
  745.  
  746. waitsecond(0)
  747. end
  748.  
  749. tcase << TestAction.new(:URL4) do
  750. $ruiObj = RUIObject.new.with('objectid', 800382463).with('selfid', 613381324).with('textdescid', -957947391).with('uniqueparentid', -939721082)
  751. .with('uitreeindex', 50)
  752. .with('classname', 'EditText')
  753. .with('resource-id', 'com.android.chrome:id/url_bar')
  754.  
  755. $ruiObj.inputtext('www.youtube.com')
  756.  
  757. waitsecond(2)
  758. end
  759.  
  760. tcase << TestAction.new(:Enter4) do
  761. pressEnter
  762.  
  763. waitsecond(2)
  764. end
  765.  
  766. tcase << TestAction.new(:Loading4) do
  767. waitsecond(2)
  768.  
  769. $youtubeWait = RUIObject.new.with('objectid', 2003397674).with('selfid', -1955067805).with('textdescid', -1024800959).with('uniqueparentid', 841602579)
  770. .with('uitreeindex', 1)
  771. .with('classname', 'Button')
  772. .with('content-desc', 'Search YouTube')
  773.  
  774. $second = 0;
  775.  
  776. while ($youtubeWait.isNotExist) && $second < 10
  777. puts $second
  778. $second += 1
  779. waitsecond(1)
  780. end
  781.  
  782. waitsecond(2)
  783. end
  784.  
  785. tcase << TestAction.new(:Wait4) do
  786. waitsecond(2)
  787.  
  788. waitsecond(2)
  789. end
  790.  
  791. tcase << TestAction.new(:FailCheck4) do
  792. $ruiObj = RUIObject.new.with('objectid', 2003397674).with('selfid', -1955067805).with('textdescid', -1024800959).with('uniqueparentid', 841602579)
  793. .with('uitreeindex', 1)
  794. .with('classname', 'Button')
  795. .with('content-desc', 'Search YouTube')
  796.  
  797.  
  798. $ruiObj.isExist
  799.  
  800. waitsecond(0)
  801. end
  802.  
  803. tcase << TestAction.new(:Result4) do
  804. $myTestResult = checkLastExistResult
  805.  
  806. waitsecond(0)
  807. end
  808.  
  809. tcase << TestAction.new(:URL5) do
  810. $ruiObj = RUIObject.new.with('objectid', 800382463).with('selfid', 613381324).with('textdescid', -957947391).with('uniqueparentid', -939721082)
  811. .with('uitreeindex', 35)
  812. .with('classname', 'EditText')
  813. .with('resource-id', 'com.android.chrome:id/url_bar')
  814.  
  815. $ruiObj.inputtext('www.nytimes.com')
  816.  
  817. waitsecond(2)
  818. end
  819.  
  820. tcase << TestAction.new(:Enter5) do
  821. pressEnter
  822.  
  823. waitsecond(2)
  824. end
  825.  
  826. tcase << TestAction.new(:Loading5) do
  827. waitsecond(2)
  828.  
  829. $NYWait = RUIObject.new.with('objectid', 815131388).with('selfid', -1040612595).with('textdescid', -440199256).with('uniqueparentid', 1781929957)
  830. .with('classname', 'android.view.View')
  831. .with('content-desc', 'The New York Times')
  832.  
  833. $second = 0;
  834.  
  835. while ($NYWait.isNotExist) && $second < 10
  836. puts $second
  837. $second += 1
  838. waitsecond(1)
  839. end
  840.  
  841. waitsecond(2)
  842. end
  843.  
  844. tcase << TestAction.new(:Wait5) do
  845. waitsecond(2)
  846.  
  847. waitsecond(2)
  848. end
  849.  
  850. tcase << TestAction.new(:FailCheck5) do
  851. $ruiObj = RUIObject.new.with('objectid', 815131388).with('selfid', -1040612595).with('textdescid', -440199256).with('uniqueparentid', 1781929957)
  852. .with('classname', 'android.view.View')
  853. .with('content-desc', 'The New York Times')
  854.  
  855. $ruiObj.isExist
  856.  
  857. waitsecond(0)
  858. end
  859.  
  860. tcase << TestAction.new(:Result5) do
  861. $myTestResult = checkLastExistResult
  862.  
  863. waitsecond(0)
  864. end
  865.  
  866. tcase << TestAction.new(:Tab) do
  867. $ruiObj = RUIObject.new.with('objectid', 1733100788).with('selfid', 1714812761).with('textdescid', 885754).with('uniqueparentid', 0)
  868. .with('uitreeindex', 34)
  869. .with('classname', 'ImageButton')
  870. .with('resource-id', 'com.android.chrome:id/tab_switcher_button')
  871. .with('content-desc', '1 open tab')
  872.  
  873. $ruiObj.click
  874.  
  875. waitsecond(2)
  876. end
  877.  
  878. tcase << TestAction.new(:Menu) do
  879. $ruiObj = RUIObject.new.with('objectid', 286278959).with('selfid', -17041368).with('textdescid', 536559428).with('uniqueparentid', -1426174679)
  880. .with('uitreeindex', 3)
  881. .with('classname', 'ImageButton')
  882. .with('resource-id', 'com.android.chrome:id/menu_button')
  883. .with('content-desc', 'More options')
  884.  
  885. $ruiObj.click
  886.  
  887. waitsecond(2)
  888. end
  889.  
  890. tcase << TestAction.new(:ClearAll) do
  891. $ruiObj = RUIObject.new.with('objectid', -1231103165).with('selfid', 437378293).with('textdescid', -1236643043).with('uniqueparentid', 1228315496).with('classresourceid', -11696959)
  892. .with('uitreeindex', 2)
  893. .with('classname', 'TextView')
  894. .with('resource-id', 'com.android.chrome:id/menu_item_text')
  895. .with('content-desc', 'Close all tabs')
  896. .with('text', 'Close all tabs')
  897.  
  898. $ruiObj.click
  899.  
  900. waitsecond(2)
  901. end
  902.  
  903. tcase << TestAction.new(:Settings) do
  904. gotoAppPixel("Settings")
  905.  
  906. waitsecond(2)
  907. end
  908.  
  909. tcase << TestAction.new(:Apps) do
  910. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', -999362027).with('textdescid', -2077380333).with('uniqueparentid', 1746487935)
  911. .with('uitreeindex', 18)
  912. .with('classname', 'TextView')
  913. .with('resource-id', 'android:id/title')
  914. .with('text', 'Apps notifications')
  915.  
  916. $ruiObj.click
  917.  
  918. waitsecond(2)
  919. end
  920.  
  921. tcase << TestAction.new(:SearchChrome) do
  922. scrollAndSearchText("Chrome")
  923.  
  924. waitsecond(2)
  925. end
  926.  
  927. tcase << TestAction.new(:Chrome) do
  928. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', -368011717).with('textdescid', -2137822469).with('uniqueparentid', 1418026757)
  929. .with('uitreeindex', 4)
  930. .with('classname', 'TextView')
  931. .with('resource-id', 'android:id/title')
  932. .with('text', 'Chrome')
  933.  
  934. $ruiObj.click
  935.  
  936. waitsecond(2)
  937. end
  938.  
  939. tcase << TestAction.new(:Storage) do
  940. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', -1162414374).with('textdescid', -2051153520).with('uniqueparentid', 342750947)
  941. .with('uitreeindex', 10)
  942. .with('classname', 'TextView')
  943. .with('resource-id', 'android:id/title')
  944. .with('text', 'Storage')
  945.  
  946. $ruiObj.click
  947.  
  948. waitsecond(2)
  949. end
  950.  
  951. tcase << TestAction.new(:ClearCache) do
  952. $ruiObj = RUIObject.new.with('objectid', 1453245671).with('selfid', 606168607).with('textdescid', 1434483946).with('uniqueparentid', 1890970267)
  953. .with('uitreeindex', 6)
  954. .with('classname', 'Button')
  955. .with('resource-id', 'com.android.settings:id/right_button')
  956. .with('text', 'CLEAR CACHE')
  957.  
  958. $ruiObj.click
  959.  
  960. waitsecond(2)
  961. end
  962.  
  963. tcase << TestAction.new(:logStop) do
  964. logStopTest("Browser_5_1_4_3")
  965.  
  966. waitsecond(0)
  967. end
  968.  
  969. tcase.run(loopTime)
  970.  
  971. end
  972.  
  973. def self.Browser_Precondition(loopTime)
  974.  
  975. tcase = TestCase.new("Browser_Precondition")
  976.  
  977. tcase << TestAction.new(:OpenChrome) do
  978. gotoAppPixel('Chrome')
  979.  
  980.  
  981. waitsecond(2)
  982. end
  983.  
  984. tcase << TestAction.new(:checkBox) do
  985. $ruiObj = RUIObject.new.with('objectid', 1560599896).with('selfid', 45001589).with('textdescid', -1345211847).with('uniqueparentid', 1351926725).with('classresourceid', 1998469038)
  986. .with('uitreeindex', 3)
  987. .with('classname', 'CheckBox')
  988. .with('resource-id', 'com.android.chrome:id/send_report_checkbox')
  989. .with('text', 'Help make Chrome better by sending usage statistics and crash reports to Google')
  990.  
  991. $ruiObj.click
  992. ifFailJumpTo(:OpenTab)
  993.  
  994. waitsecond(2)
  995. end
  996.  
  997. tcase << TestAction.new(:Accept) do
  998. $ruiObj = RUIObject.new.with('objectid', 1131623741).with('selfid', 2073999009).with('textdescid', -212510162).with('uniqueparentid', -1930936534)
  999. .with('uitreeindex', 4)
  1000. .with('classname', 'Button')
  1001. .with('resource-id', 'com.android.chrome:id/terms_accept')
  1002. .with('text', 'ACCEPT CONTINUE')
  1003.  
  1004. $ruiObj.click
  1005.  
  1006. waitsecond(2)
  1007. end
  1008.  
  1009. tcase << TestAction.new(:NoThanks) do
  1010. $ruiObj = RUIObject.new.with('objectid', -1069290294).with('selfid', 1665543358).with('textdescid', 14199854).with('uniqueparentid', -972892335)
  1011. .with('uitreeindex', 8)
  1012. .with('classname', 'Button')
  1013. .with('resource-id', 'com.android.chrome:id/negative_button')
  1014. .with('text', 'NO THANKS')
  1015.  
  1016. $ruiObj.click
  1017.  
  1018. waitsecond(2)
  1019. end
  1020.  
  1021. tcase << TestAction.new(:OpenTab) do
  1022. $ruiObj = RUIObject.new.with('objectid', -1772071808).with('selfid', 820590808).with('textdescid', 561000469).with('uniqueparentid', 54637515)
  1023. .with('uitreeindex', 1)
  1024. .with('classname', 'Button')
  1025. .with('resource-id', 'com.android.chrome:id/new_tab_button')
  1026. .with('content-desc', 'New tab')
  1027.  
  1028. $ruiObj.click
  1029. ifFailJumpTo(:URL1)
  1030.  
  1031. waitsecond(2)
  1032. end
  1033.  
  1034. tcase << TestAction.new(:URL1) do
  1035. $ruiObj = RUIObject.new.with('objectid', -740560065).with('selfid', 1023920737).with('textdescid', -1482525503).with('uniqueparentid', -1010905038)
  1036. .with('uitreeindex', 1)
  1037. .with('classname', 'EditText')
  1038. .with('resource-id', 'com.android.chrome:id/search_box_text')
  1039.  
  1040. $ruiObj.inputtext('www.att.com')
  1041.  
  1042. waitsecond(2)
  1043. end
  1044.  
  1045. tcase << TestAction.new(:Enter) do
  1046. pressEnter
  1047.  
  1048. waitsecond(2)
  1049. end
  1050.  
  1051. tcase << TestAction.new(:Loading) do
  1052. waitsecond(2)
  1053.  
  1054. $attWait = RUIObject.new.with('objectid', 1040592064).with('selfid', 1955905798).with('textdescid', -1063252184).with('uniqueparentid', 107476858)
  1055. .with('uitreeindex', 2)
  1056. .with('classname', 'Button')
  1057. .with('content-desc', 'Search')
  1058.  
  1059. $second = 0;
  1060.  
  1061. while ($attWait.isNotExist) && $second < 10
  1062. puts $second
  1063. $second += 1
  1064. waitsecond(1)
  1065. end
  1066.  
  1067. waitsecond(2)
  1068. end
  1069.  
  1070. tcase << TestAction.new(:Options) do
  1071. $ruiObj = RUIObject.new.with('objectid', 286278959).with('selfid', -17041368).with('textdescid', 536559428).with('uniqueparentid', -1426174679)
  1072. .with('uitreeindex', 86)
  1073. .with('classname', 'ImageButton')
  1074. .with('resource-id', 'com.android.chrome:id/menu_button')
  1075. .with('content-desc', 'More options')
  1076.  
  1077. $ruiObj.click
  1078.  
  1079. waitsecond(2)
  1080. end
  1081.  
  1082. tcase << TestAction.new(:EditBookmark) do
  1083. $ruiObj = RUIObject.new.with('objectid', -1748660012).with('selfid', -1695848864).with('textdescid', 223981600).with('uniqueparentid', 1676584768).with('classresourceid', 747996460)
  1084. .with('uitreeindex', 1)
  1085. .with('classname', 'ImageButton')
  1086. .with('resource-id', 'com.android.chrome:id/button_two')
  1087. .with('content-desc', 'Edit bookmark')
  1088.  
  1089. $ruiObj.isNotExist
  1090. ifFailJumpTo(:GotoSettings)
  1091.  
  1092. waitsecond(2)
  1093. end
  1094.  
  1095. tcase << TestAction.new(:Bookmark) do
  1096. $ruiObj = RUIObject.new.with('objectid', -1748660012).with('selfid', 647573709).with('textdescid', 1394875027).with('uniqueparentid', 953315029).with('classresourceid', 747996460)
  1097. .with('uitreeindex', 1)
  1098. .with('classname', 'ImageButton')
  1099. .with('resource-id', 'com.android.chrome:id/button_two')
  1100. .with('content-desc', 'Bookmark this page')
  1101.  
  1102. $ruiObj.click
  1103.  
  1104. waitsecond(2)
  1105. end
  1106.  
  1107. tcase << TestAction.new(:URL2) do
  1108. $ruiObj = RUIObject.new.with('objectid', 800382463).with('selfid', 613381324).with('textdescid', -957947391).with('uniqueparentid', 0)
  1109. .with('uitreeindex', 91)
  1110. .with('classname', 'EditText')
  1111. .with('resource-id', 'com.android.chrome:id/url_bar')
  1112.  
  1113. $ruiObj.inputtext('www.ebay.com')
  1114.  
  1115. waitsecond(2)
  1116. end
  1117.  
  1118. tcase << TestAction.new(:Enter2) do
  1119. pressEnter
  1120.  
  1121. waitsecond(2)
  1122. end
  1123.  
  1124. tcase << TestAction.new(:Loading2) do
  1125. waitsecond(2)
  1126.  
  1127. $ebayWait = RUIObject.new.with('objectid', 609044440).with('selfid', 1175141772).with('textdescid', -2143820243).with('uniqueparentid', -1830344402)
  1128. .with('uitreeindex', 4)
  1129. .with('classname', 'android.view.View')
  1130. .with('content-desc', 'eBay Home page')
  1131.  
  1132. $second = 0;
  1133.  
  1134. while ($ebayWait.isNotExist) && $second < 10
  1135. puts $second
  1136. $second += 1
  1137. waitsecond(1)
  1138. end
  1139.  
  1140. waitsecond(2)
  1141. end
  1142.  
  1143. tcase << TestAction.new(:Options2) do
  1144. $ruiObj = RUIObject.new.with('objectid', 286278959).with('selfid', -17041368).with('textdescid', 536559428).with('uniqueparentid', -1426174679)
  1145. .with('uitreeindex', 92)
  1146. .with('classname', 'ImageButton')
  1147. .with('resource-id', 'com.android.chrome:id/menu_button')
  1148. .with('content-desc', 'More options')
  1149.  
  1150. $ruiObj.click
  1151.  
  1152. waitsecond(2)
  1153. end
  1154.  
  1155. tcase << TestAction.new(:EditBookmark_1) do
  1156. $ruiObj = RUIObject.new.with('objectid', -1748660012).with('selfid', -1695848864).with('textdescid', 223981600).with('uniqueparentid', 1676584768).with('classresourceid', 747996460)
  1157. .with('uitreeindex', 1)
  1158. .with('classname', 'ImageButton')
  1159. .with('resource-id', 'com.android.chrome:id/button_two')
  1160. .with('content-desc', 'Edit bookmark')
  1161.  
  1162. $ruiObj.isNotExist
  1163. ifFailJumpTo(:GotoSettings)
  1164.  
  1165. waitsecond(2)
  1166. end
  1167.  
  1168. tcase << TestAction.new(:Bookmark2) do
  1169. $ruiObj = RUIObject.new.with('objectid', -1748660012).with('selfid', 647573709).with('textdescid', 1394875027).with('uniqueparentid', 953315029).with('classresourceid', 747996460)
  1170. .with('uitreeindex', 1)
  1171. .with('classname', 'ImageButton')
  1172. .with('resource-id', 'com.android.chrome:id/button_two')
  1173. .with('content-desc', 'Bookmark this page')
  1174.  
  1175. $ruiObj.click
  1176.  
  1177. waitsecond(2)
  1178. end
  1179.  
  1180. tcase << TestAction.new(:URL3) do
  1181. $ruiObj = RUIObject.new.with('objectid', 800382463).with('selfid', 613381324).with('textdescid', -957947391).with('uniqueparentid', -420161517)
  1182. .with('uitreeindex', 90)
  1183. .with('classname', 'EditText')
  1184. .with('resource-id', 'com.android.chrome:id/url_bar')
  1185.  
  1186. $ruiObj.inputtext('www.yahoo.com')
  1187.  
  1188. waitsecond(2)
  1189. end
  1190.  
  1191. tcase << TestAction.new(:Enter3) do
  1192. pressEnter
  1193.  
  1194. waitsecond(2)
  1195. end
  1196.  
  1197. tcase << TestAction.new(:Loading3) do
  1198. waitsecond(2)
  1199.  
  1200. $yahooWait = RUIObject.new.with('objectid', -530407122).with('selfid', -326866941).with('textdescid', 13521966).with('uniqueparentid', -191624725)
  1201. .with('uitreeindex', 5)
  1202. .with('classname', 'Button')
  1203. .with('resource-id', 'placeHolder-search-btn')
  1204. .with('content-desc', 'Search Search')
  1205.  
  1206. $second = 0;
  1207.  
  1208. while ($yahooWait.isNotExist) && $second < 10
  1209. puts $second
  1210. $second += 1
  1211. waitsecond(1)
  1212. end
  1213.  
  1214. waitsecond(2)
  1215. end
  1216.  
  1217. tcase << TestAction.new(:Options3) do
  1218. $ruiObj = RUIObject.new.with('objectid', 286278959).with('selfid', -17041368).with('textdescid', 536559428).with('uniqueparentid', -1426174679)
  1219. .with('uitreeindex', 114)
  1220. .with('classname', 'ImageButton')
  1221. .with('resource-id', 'com.android.chrome:id/menu_button')
  1222. .with('content-desc', 'More options')
  1223.  
  1224. $ruiObj.click
  1225.  
  1226. waitsecond(2)
  1227. end
  1228.  
  1229. tcase << TestAction.new(:EditBookmark_1) do
  1230. $ruiObj = RUIObject.new.with('objectid', -1748660012).with('selfid', -1695848864).with('textdescid', 223981600).with('uniqueparentid', 1676584768).with('classresourceid', 747996460)
  1231. .with('uitreeindex', 1)
  1232. .with('classname', 'ImageButton')
  1233. .with('resource-id', 'com.android.chrome:id/button_two')
  1234. .with('content-desc', 'Edit bookmark')
  1235.  
  1236. $ruiObj.isNotExist
  1237. ifFailJumpTo(:GotoSettings)
  1238.  
  1239. waitsecond(2)
  1240. end
  1241.  
  1242. tcase << TestAction.new(:Bookmark3) do
  1243. $ruiObj = RUIObject.new.with('objectid', -1748660012).with('selfid', 647573709).with('textdescid', 1394875027).with('uniqueparentid', 953315029).with('classresourceid', 747996460)
  1244. .with('uitreeindex', 1)
  1245. .with('classname', 'ImageButton')
  1246. .with('resource-id', 'com.android.chrome:id/button_two')
  1247. .with('content-desc', 'Bookmark this page')
  1248.  
  1249. $ruiObj.click
  1250.  
  1251. waitsecond(2)
  1252. end
  1253.  
  1254. tcase << TestAction.new(:URL4) do
  1255. $ruiObj = RUIObject.new.with('objectid', 800382463).with('selfid', 613381324).with('textdescid', -957947391).with('uniqueparentid', -939721082)
  1256. .with('uitreeindex', 114)
  1257. .with('classname', 'EditText')
  1258. .with('resource-id', 'com.android.chrome:id/url_bar')
  1259.  
  1260. $ruiObj.inputtext('www.amazon.com ')
  1261.  
  1262. waitsecond(2)
  1263. end
  1264.  
  1265. tcase << TestAction.new(:Enter4) do
  1266. pressEnter
  1267.  
  1268. waitsecond(2)
  1269. end
  1270.  
  1271. tcase << TestAction.new(:Loading4) do
  1272. waitsecond(2)
  1273.  
  1274. $amazonWait = RUIObject.new.with('objectid', -1521303824).with('selfid', 1797265808).with('textdescid', 1249383791).with('uniqueparentid', -2005587295)
  1275. .with('uitreeindex', 9)
  1276. .with('classname', 'android.view.View')
  1277. .with('content-desc', 'Prime')
  1278.  
  1279. $second = 0;
  1280.  
  1281. while ($amazonWait.isNotExist) && $second < 10
  1282. puts $second
  1283. $second += 1
  1284. waitsecond(1)
  1285. end
  1286.  
  1287. waitsecond(2)
  1288. end
  1289.  
  1290. tcase << TestAction.new(:Options4) do
  1291. $ruiObj = RUIObject.new.with('objectid', 286278959).with('selfid', -17041368).with('textdescid', 536559428).with('uniqueparentid', -1426174679)
  1292. .with('uitreeindex', 50)
  1293. .with('classname', 'ImageButton')
  1294. .with('resource-id', 'com.android.chrome:id/menu_button')
  1295. .with('content-desc', 'More options')
  1296.  
  1297. $ruiObj.click
  1298.  
  1299. waitsecond(2)
  1300. end
  1301.  
  1302. tcase << TestAction.new(:EditBookmark_1) do
  1303. $ruiObj = RUIObject.new.with('objectid', -1748660012).with('selfid', -1695848864).with('textdescid', 223981600).with('uniqueparentid', 1676584768).with('classresourceid', 747996460)
  1304. .with('uitreeindex', 1)
  1305. .with('classname', 'ImageButton')
  1306. .with('resource-id', 'com.android.chrome:id/button_two')
  1307. .with('content-desc', 'Edit bookmark')
  1308.  
  1309. $ruiObj.isNotExist
  1310. ifFailJumpTo(:GotoSettings)
  1311.  
  1312. waitsecond(2)
  1313. end
  1314.  
  1315. tcase << TestAction.new(:Bookmark4) do
  1316. $ruiObj = RUIObject.new.with('objectid', -1748660012).with('selfid', 647573709).with('textdescid', 1394875027).with('uniqueparentid', 953315029).with('classresourceid', 747996460)
  1317. .with('uitreeindex', 1)
  1318. .with('classname', 'ImageButton')
  1319. .with('resource-id', 'com.android.chrome:id/button_two')
  1320. .with('content-desc', 'Bookmark this page')
  1321.  
  1322. $ruiObj.click
  1323.  
  1324. waitsecond(2)
  1325. end
  1326.  
  1327. tcase << TestAction.new(:URL5) do
  1328. $ruiObj = RUIObject.new.with('objectid', 800382463).with('selfid', 613381324).with('textdescid', -957947391).with('uniqueparentid', -939721082)
  1329. .with('uitreeindex', 50)
  1330. .with('classname', 'EditText')
  1331. .with('resource-id', 'com.android.chrome:id/url_bar')
  1332.  
  1333. $ruiObj.inputtext('www.youtube.com')
  1334.  
  1335. waitsecond(2)
  1336. end
  1337.  
  1338. tcase << TestAction.new(:Enter5) do
  1339. pressEnter
  1340.  
  1341. waitsecond(2)
  1342. end
  1343.  
  1344. tcase << TestAction.new(:Loading5) do
  1345. waitsecond(2)
  1346.  
  1347. $youtubeWait = RUIObject.new.with('objectid', 2003397674).with('selfid', -1955067805).with('textdescid', -1024800959).with('uniqueparentid', 841602579)
  1348. .with('uitreeindex', 1)
  1349. .with('classname', 'Button')
  1350. .with('content-desc', 'Search YouTube')
  1351.  
  1352. $second = 0;
  1353.  
  1354. while ($youtubeWait.isNotExist) && $second < 10
  1355. puts $second
  1356. $second += 1
  1357. waitsecond(1)
  1358. end
  1359.  
  1360. waitsecond(2)
  1361. end
  1362.  
  1363. tcase << TestAction.new(:Options5) do
  1364. $ruiObj = RUIObject.new.with('objectid', 286278959).with('selfid', -17041368).with('textdescid', 536559428).with('uniqueparentid', -1426174679)
  1365. .with('uitreeindex', 35)
  1366. .with('classname', 'ImageButton')
  1367. .with('resource-id', 'com.android.chrome:id/menu_button')
  1368. .with('content-desc', 'More options')
  1369.  
  1370. $ruiObj.click
  1371.  
  1372. waitsecond(2)
  1373. end
  1374.  
  1375. tcase << TestAction.new(:EditBookmark_1) do
  1376. $ruiObj = RUIObject.new.with('objectid', -1748660012).with('selfid', -1695848864).with('textdescid', 223981600).with('uniqueparentid', 1676584768).with('classresourceid', 747996460)
  1377. .with('uitreeindex', 1)
  1378. .with('classname', 'ImageButton')
  1379. .with('resource-id', 'com.android.chrome:id/button_two')
  1380. .with('content-desc', 'Edit bookmark')
  1381.  
  1382. $ruiObj.isNotExist
  1383. ifFailJumpTo(:GotoSettings)
  1384.  
  1385. waitsecond(2)
  1386. end
  1387.  
  1388. tcase << TestAction.new(:Bookmark5) do
  1389. $ruiObj = RUIObject.new.with('objectid', -1748660012).with('selfid', 647573709).with('textdescid', 1394875027).with('uniqueparentid', 953315029).with('classresourceid', 747996460)
  1390. .with('uitreeindex', 1)
  1391. .with('classname', 'ImageButton')
  1392. .with('resource-id', 'com.android.chrome:id/button_two')
  1393. .with('content-desc', 'Bookmark this page')
  1394.  
  1395. $ruiObj.click
  1396.  
  1397. waitsecond(2)
  1398. end
  1399.  
  1400. tcase << TestAction.new(:URL6) do
  1401. $ruiObj = RUIObject.new.with('objectid', 800382463).with('selfid', 613381324).with('textdescid', -957947391).with('uniqueparentid', -939721082)
  1402. .with('uitreeindex', 35)
  1403. .with('classname', 'EditText')
  1404. .with('resource-id', 'com.android.chrome:id/url_bar')
  1405.  
  1406. $ruiObj.inputtext('www.nytimes.com')
  1407.  
  1408. waitsecond(2)
  1409. end
  1410.  
  1411. tcase << TestAction.new(:Enter6) do
  1412. pressEnter
  1413.  
  1414. waitsecond(2)
  1415. end
  1416.  
  1417. tcase << TestAction.new(:Loading6) do
  1418. waitsecond(2)
  1419.  
  1420. $NYWait = RUIObject.new.with('objectid', 815131388).with('selfid', -1040612595).with('textdescid', -440199256).with('uniqueparentid', 1781929957)
  1421. .with('classname', 'android.view.View')
  1422. .with('content-desc', 'The New York Times')
  1423.  
  1424. $second = 0;
  1425.  
  1426. while ($NYWait.isNotExist) && $second < 10
  1427. puts $second
  1428. $second += 1
  1429. waitsecond(1)
  1430. end
  1431.  
  1432. waitsecond(2)
  1433. end
  1434.  
  1435. tcase << TestAction.new(:Options6) do
  1436. $ruiObj = RUIObject.new.with('objectid', 286278959).with('selfid', -17041368).with('textdescid', 536559428).with('uniqueparentid', -1426174679)
  1437. .with('uitreeindex', 213)
  1438. .with('classname', 'ImageButton')
  1439. .with('resource-id', 'com.android.chrome:id/menu_button')
  1440. .with('content-desc', 'More options')
  1441.  
  1442. $ruiObj.click
  1443.  
  1444. waitsecond(2)
  1445. end
  1446.  
  1447. tcase << TestAction.new(:EditBookmark_1_1) do
  1448. $ruiObj = RUIObject.new.with('objectid', -1748660012).with('selfid', -1695848864).with('textdescid', 223981600).with('uniqueparentid', 1676584768).with('classresourceid', 747996460)
  1449. .with('uitreeindex', 1)
  1450. .with('classname', 'ImageButton')
  1451. .with('resource-id', 'com.android.chrome:id/button_two')
  1452. .with('content-desc', 'Edit bookmark')
  1453.  
  1454. $ruiObj.isNotExist
  1455. ifFailJumpTo(:GotoSettings)
  1456.  
  1457. waitsecond(2)
  1458. end
  1459.  
  1460. tcase << TestAction.new(:Bookmark6) do
  1461. $ruiObj = RUIObject.new.with('objectid', -1748660012).with('selfid', 647573709).with('textdescid', 1394875027).with('uniqueparentid', 953315029).with('classresourceid', 747996460)
  1462. .with('uitreeindex', 1)
  1463. .with('classname', 'ImageButton')
  1464. .with('resource-id', 'com.android.chrome:id/button_two')
  1465. .with('content-desc', 'Bookmark this page')
  1466.  
  1467. $ruiObj.click
  1468.  
  1469. waitsecond(2)
  1470. end
  1471.  
  1472. tcase << TestAction.new(:Tab) do
  1473. $ruiObj = RUIObject.new.with('objectid', 1733100788).with('selfid', 1714812761).with('textdescid', 885754).with('uniqueparentid', 0)
  1474. .with('uitreeindex', 34)
  1475. .with('classname', 'ImageButton')
  1476. .with('resource-id', 'com.android.chrome:id/tab_switcher_button')
  1477. .with('content-desc', '1 open tab')
  1478.  
  1479. $ruiObj.click
  1480.  
  1481. waitsecond(2)
  1482. end
  1483.  
  1484. tcase << TestAction.new(:Options7) do
  1485. $ruiObj = RUIObject.new.with('objectid', 286278959).with('selfid', -17041368).with('textdescid', 536559428).with('uniqueparentid', -1426174679)
  1486. .with('uitreeindex', 3)
  1487. .with('classname', 'ImageButton')
  1488. .with('resource-id', 'com.android.chrome:id/menu_button')
  1489. .with('content-desc', 'More options')
  1490.  
  1491. $ruiObj.click
  1492.  
  1493. waitsecond(2)
  1494. end
  1495.  
  1496. tcase << TestAction.new(:ClearAllTabs) do
  1497. $ruiObj = RUIObject.new.with('objectid', -1231103165).with('selfid', 437378293).with('textdescid', -1236643043).with('uniqueparentid', 1228315496).with('classresourceid', -11696959)
  1498. .with('uitreeindex', 2)
  1499. .with('classname', 'TextView')
  1500. .with('resource-id', 'com.android.chrome:id/menu_item_text')
  1501. .with('content-desc', 'Close all tabs')
  1502. .with('text', 'Close all tabs')
  1503.  
  1504. $ruiObj.click
  1505.  
  1506. waitsecond(2)
  1507. end
  1508.  
  1509. tcase << TestAction.new(:GotoSettings) do
  1510. gotoAppPixel("Settings")
  1511.  
  1512. waitsecond(2)
  1513. end
  1514.  
  1515. tcase << TestAction.new(:Apps2) do
  1516. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', -999362027).with('textdescid', -2077380333).with('uniqueparentid', 1746487935)
  1517. .with('uitreeindex', 18)
  1518. .with('classname', 'TextView')
  1519. .with('resource-id', 'android:id/title')
  1520. .with('text', 'Apps notifications')
  1521.  
  1522. $ruiObj.click
  1523.  
  1524. waitsecond(2)
  1525. end
  1526.  
  1527. tcase << TestAction.new(:SearchChrome2) do
  1528. scrollAndSearchText("Chrome")
  1529.  
  1530. waitsecond(2)
  1531. end
  1532.  
  1533. tcase << TestAction.new(:Chrome2) do
  1534. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', -368011717).with('textdescid', -2137822469).with('uniqueparentid', 1418026757)
  1535. .with('uitreeindex', 4)
  1536. .with('classname', 'TextView')
  1537. .with('resource-id', 'android:id/title')
  1538. .with('text', 'Chrome')
  1539.  
  1540. $ruiObj.click
  1541.  
  1542. waitsecond(2)
  1543. end
  1544.  
  1545. tcase << TestAction.new(:Storage2) do
  1546. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', -1162414374).with('textdescid', -2051153520).with('uniqueparentid', 342750947)
  1547. .with('uitreeindex', 10)
  1548. .with('classname', 'TextView')
  1549. .with('resource-id', 'android:id/title')
  1550. .with('text', 'Storage')
  1551.  
  1552. $ruiObj.click
  1553.  
  1554. waitsecond(2)
  1555. end
  1556.  
  1557. tcase << TestAction.new(:ClearCache2) do
  1558. $ruiObj = RUIObject.new.with('objectid', 1453245671).with('selfid', 606168607).with('textdescid', 1434483946).with('uniqueparentid', 1890970267)
  1559. .with('uitreeindex', 6)
  1560. .with('classname', 'Button')
  1561. .with('resource-id', 'com.android.settings:id/right_button')
  1562. .with('text', 'CLEAR CACHE')
  1563.  
  1564. $ruiObj.click
  1565.  
  1566. waitsecond(2)
  1567. end
  1568.  
  1569. tcase << TestAction.new(:RecentApps) do
  1570. pressRecentApps
  1571.  
  1572. waitsecond(2)
  1573. end
  1574.  
  1575. tcase << TestAction.new(:SwipeUp) do
  1576. swipe_vertical_back 100
  1577.  
  1578. waitsecond(2)
  1579. end
  1580.  
  1581. tcase << TestAction.new(:SwipeUp2) do
  1582. swipe_vertical_back 100
  1583.  
  1584. waitsecond(2)
  1585. end
  1586.  
  1587. tcase << TestAction.new(:ClearAll) do
  1588. $ruiObj = RUIObject.new.with('objectid', -213794734).with('selfid', -204985471).with('textdescid', 1763854688).with('uniqueparentid', -537263169)
  1589. .with('uitreeindex', 12)
  1590. .with('classname', 'TextView')
  1591. .with('resource-id', 'com.android.systemui:id/button')
  1592. .with('text', 'CLEAR ALL')
  1593.  
  1594. $ruiObj.click
  1595.  
  1596. waitsecond(2)
  1597. end
  1598.  
  1599. tcase.run(loopTime)
  1600.  
  1601. end
  1602.  
  1603. def self.EMAIL_5_1_3_1(loopTime)
  1604.  
  1605. tcase = TestCase.new("EMAIL_5_1_3_1")
  1606.  
  1607. tcase << TestAction.new(:Home) do
  1608. pressHome
  1609.  
  1610. waitsecond(2)
  1611. end
  1612.  
  1613. tcase << TestAction.new(:logStart_1) do
  1614. logStartTest("Email_5_1_3_1")
  1615.  
  1616. waitsecond(0)
  1617. end
  1618.  
  1619. tcase << TestAction.new(:gotoGmail) do
  1620. gotoAppPixel('Gmail')
  1621.  
  1622. waitsecond(2)
  1623. end
  1624.  
  1625. tcase << TestAction.new(:Compose) do
  1626. $ruiObj = RUIObject.new.with('objectid', 1598291378).with('selfid', 1808564263).with('textdescid', -1604213756).with('uniqueparentid', 150150411)
  1627. .with('uitreeindex', 22)
  1628. .with('classname', 'ImageButton')
  1629. .with('resource-id', 'com.google.android.gm:id/compose_button')
  1630. .with('content-desc', 'Compose')
  1631.  
  1632. $ruiObj.click
  1633.  
  1634. waitsecond(2)
  1635. end
  1636.  
  1637. tcase << TestAction.new(:ToField) do
  1638. $ruiObj = RUIObject.new.with('objectid', 1308296701).with('selfid', 678761455).with('textdescid', 1902492099).with('uniqueparentid', -1962010460).with('classresourceid', 1488875515)
  1639. .with('uitreeindex', 9)
  1640. .with('classname', 'MultiAutoCompleteTextView')
  1641. .with('resource-id', 'com.google.android.gm:id/to')
  1642.  
  1643. $ruiObj.inputtext('nalab.qct02@gmail.com')
  1644.  
  1645. waitsecond(2)
  1646. end
  1647.  
  1648. tcase << TestAction.new(:SubjectField) do
  1649. $ruiObj = RUIObject.new.with('objectid', 524508352).with('selfid', -477614756).with('textdescid', -920110240).with('uniqueparentid', -1427376388).with('classresourceid', 927865352)
  1650. .with('uitreeindex', 12)
  1651. .with('classname', 'EditText')
  1652. .with('resource-id', 'com.google.android.gm:id/subject')
  1653.  
  1654. $ruiObj.click
  1655.  
  1656. waitsecond(2)
  1657. end
  1658.  
  1659. tcase << TestAction.new(:InputText) do
  1660. $ruiObj.inputtext('Email Test 1')
  1661.  
  1662. waitsecond(2)
  1663. end
  1664.  
  1665. tcase << TestAction.new(:ComposeField) do
  1666. $ruiObj = RUIObject.new.with('objectid', -2101420856).with('selfid', -497970335).with('textdescid', 1027339414).with('uniqueparentid', 1227675605).with('classresourceid', 1815484335)
  1667. .with('uitreeindex', 14)
  1668. .with('classname', 'android.view.View')
  1669. .with('content-desc', 'Compose email')
  1670.  
  1671. $ruiObj.click
  1672.  
  1673. waitsecond(2)
  1674. end
  1675.  
  1676. tcase << TestAction.new(:InputText2) do
  1677. $ruiObj.inputtext('Email Test - 30 Characters, No Attachments')
  1678.  
  1679. waitsecond(2)
  1680. end
  1681.  
  1682. tcase << TestAction.new(:Send) do
  1683. $ruiObj = RUIObject.new.with('objectid', 823683940).with('selfid', 2103341243).with('textdescid', -976543260).with('uniqueparentid', -1674145749)
  1684. .with('uitreeindex', 3)
  1685. .with('classname', 'TextView')
  1686. .with('resource-id', 'com.google.android.gm:id/send')
  1687. .with('content-desc', 'Send')
  1688.  
  1689. $ruiObj.click
  1690.  
  1691. waitsecond(2)
  1692. end
  1693.  
  1694. tcase << TestAction.new(:wait8second_7) do
  1695. waitsecond(8)
  1696. end
  1697.  
  1698. tcase << TestAction.new(:Navigate) do
  1699. $ruiObj = RUIObject.new.with('objectid', -1013150848).with('selfid', 1589392844).with('textdescid', -993230041).with('uniqueparentid', -941014244)
  1700. .with('uitreeindex', 0)
  1701. .with('classname', 'ImageButton')
  1702. .with('content-desc', 'Open navigation drawer')
  1703.  
  1704. $ruiObj.click
  1705.  
  1706. waitsecond(2)
  1707. end
  1708.  
  1709. tcase << TestAction.new(:Sent) do
  1710. $ruiObj = RUIObject.new.with('objectid', -630461263).with('selfid', -610816808).with('textdescid', 727067449).with('uniqueparentid', -382526183).with('classresourceid', 790406410)
  1711. .with('uitreeindex', 22)
  1712. .with('classname', 'TextView')
  1713. .with('resource-id', 'com.google.android.gm:id/name')
  1714. .with('text', 'Sent')
  1715.  
  1716. $ruiObj.click
  1717.  
  1718. waitsecond(2)
  1719. end
  1720.  
  1721. tcase << TestAction.new(:Sending) do
  1722. $progressbar = RUIObject.new.with('objectid', -267448081).with('selfid', -1495589242).with('textdescid', 299044113).with('uniqueparentid', 2063960009).with('classresourceid', -1495589242)
  1723. .with('uitreeindex', 9)
  1724. .with('pretext', 'Sent')
  1725. .with('classname', 'ProgressBar')
  1726.  
  1727. $sending = RUIObject.new.with('objectid', -1155201837).with('selfid', -1497543209).with('textdescid', -636469849).with('uniqueparentid', 1819926825).with('classresourceid', 1815484335)
  1728. .with('uitreeindex', 4)
  1729. .with('pretext', 'Sent?0')
  1730. .with('classname', 'android.view.View')
  1731. .with('content-desc', 'Double tap to select this conversation')
  1732.  
  1733.  
  1734. $second = 0;
  1735.  
  1736. while ($progressbar.isExist || $sending.isNotExist) && $second < 20 do
  1737. puts $second
  1738. $second += 1
  1739. waitsecond(1)
  1740. end
  1741.  
  1742. waitsecond(2)
  1743.  
  1744. waitsecond(2)
  1745. end
  1746.  
  1747. tcase << TestAction.new(:FailCheck) do
  1748. $ruiObj = RUIObject.new.with('objectid', -1155201837).with('selfid', -1497543209).with('textdescid', -636469849).with('uniqueparentid', 1819926825).with('classresourceid', 1815484335)
  1749. .with('uitreeindex', 4)
  1750. .with('pretext', 'Sent?0')
  1751. .with('classname', 'android.view.View')
  1752. .with('content-desc', 'Double tap to select this conversation')
  1753.  
  1754. $ruiObj.isExist
  1755.  
  1756. waitsecond(0)
  1757. end
  1758.  
  1759. tcase << TestAction.new(:Result) do
  1760. $myTestResult = checkLastExistResult
  1761.  
  1762.  
  1763.  
  1764. waitsecond(0)
  1765. end
  1766.  
  1767. tcase << TestAction.new(:Delete) do
  1768. $sentMail = RUIObject.new.with('objectid', -1155201837).with('selfid', -1497543209).with('textdescid', -636469849).with('uniqueparentid', -440420788).with('classresourceid', 1815484335)
  1769. .with('uitreeindex', 7)
  1770. .with('pretext', 'Sent?0')
  1771. .with('classname', 'android.view.View')
  1772. .with('content-desc', 'Double tap to select this conversation')
  1773. $deleteButton = RUIObject.new.with('objectid', 1483973719).with('selfid', -390800203).with('textdescid', 1201560756).with('uniqueparentid', 1555561971)
  1774. .with('uitreeindex', 9)
  1775. .with('classname', 'TextView')
  1776. .with('resource-id', 'com.google.android.gm:id/delete')
  1777. .with('content-desc', 'Delete')
  1778.  
  1779. $count = 0;
  1780.  
  1781. while ($sentMail.isExist) && $count < 10 do
  1782. puts $count
  1783. $count += 1
  1784. $sentMail.click
  1785. waitsecond(2)
  1786. $deleteButton.click
  1787. waitsecond(2)
  1788. end
  1789.  
  1790. waitsecond(2)
  1791. end
  1792.  
  1793. tcase << TestAction.new(:logStop) do
  1794. logStopTest("Email_5_1_3_1")
  1795.  
  1796. waitsecond(0)
  1797. end
  1798.  
  1799. tcase.run(loopTime)
  1800.  
  1801. end
  1802.  
  1803. def self.EMAIL_5_1_3_2(loopTime)
  1804.  
  1805. tcase = TestCase.new("EMAIL_5_1_3_2")
  1806.  
  1807. tcase << TestAction.new(:Home) do
  1808. pressHome
  1809.  
  1810. waitsecond(2)
  1811. end
  1812.  
  1813. tcase << TestAction.new(:logStart) do
  1814. logStartTest("Email_5_1_3_2")
  1815.  
  1816. waitsecond(0)
  1817. end
  1818.  
  1819. tcase << TestAction.new(:gotoGmail) do
  1820. gotoAppPixel('Gmail')
  1821.  
  1822. waitsecond(2)
  1823. end
  1824.  
  1825. tcase << TestAction.new(:Compose) do
  1826. $ruiObj = RUIObject.new.with('objectid', 1598291378).with('selfid', 1808564263).with('textdescid', -1604213756).with('uniqueparentid', 150150411)
  1827. .with('uitreeindex', 5)
  1828. .with('classname', 'ImageButton')
  1829. .with('resource-id', 'com.google.android.gm:id/compose_button')
  1830. .with('content-desc', 'Compose')
  1831.  
  1832. $ruiObj.click
  1833.  
  1834. waitsecond(2)
  1835. end
  1836.  
  1837. tcase << TestAction.new(:ToField) do
  1838. $ruiObj = RUIObject.new.with('objectid', 1308296701).with('selfid', 678761455).with('textdescid', 1902492099).with('uniqueparentid', -1962010460).with('classresourceid', 1488875515)
  1839. .with('uitreeindex', 9)
  1840. .with('classname', 'MultiAutoCompleteTextView')
  1841. .with('resource-id', 'com.google.android.gm:id/to')
  1842.  
  1843. $ruiObj.inputtext('nalab.qct02@gmail.com')
  1844.  
  1845. waitsecond(2)
  1846. end
  1847.  
  1848. tcase << TestAction.new(:SubjectField) do
  1849. $ruiObj = RUIObject.new.with('objectid', 524508352).with('selfid', -477614756).with('textdescid', -920110240).with('uniqueparentid', -1427376388).with('classresourceid', 927865352)
  1850. .with('uitreeindex', 12)
  1851. .with('classname', 'EditText')
  1852. .with('resource-id', 'com.google.android.gm:id/subject')
  1853.  
  1854. $ruiObj.click
  1855.  
  1856. waitsecond(2)
  1857. end
  1858.  
  1859. tcase << TestAction.new(:InputText1) do
  1860. $ruiObj.inputtext('Email Test 2')
  1861.  
  1862. waitsecond(2)
  1863. end
  1864.  
  1865. tcase << TestAction.new(:ComposeField) do
  1866. $ruiObj = RUIObject.new.with('objectid', -2101420856).with('selfid', -497970335).with('textdescid', 1027339414).with('uniqueparentid', 1227675605).with('classresourceid', 1815484335)
  1867. .with('uitreeindex', 14)
  1868. .with('classname', 'android.view.View')
  1869. .with('content-desc', 'Compose email')
  1870.  
  1871. $ruiObj.click
  1872.  
  1873. waitsecond(2)
  1874. end
  1875.  
  1876. tcase << TestAction.new(:InputText2) do
  1877. $ruiObj.inputtext('Email Test - 30 Characters, With Attachments')
  1878.  
  1879. waitsecond(2)
  1880. end
  1881.  
  1882. tcase << TestAction.new(:AddAttachment) do
  1883. $ruiObj = RUIObject.new.with('objectid', -124211107).with('selfid', 1566257663).with('textdescid', -1240659436).with('uniqueparentid', -1674145749)
  1884. .with('uitreeindex', 2)
  1885. .with('classname', 'TextView')
  1886. .with('resource-id', 'com.google.android.gm:id/add_attachment')
  1887. .with('content-desc', 'Attach file')
  1888.  
  1889. $ruiObj.click
  1890.  
  1891. waitsecond(2)
  1892. end
  1893.  
  1894. tcase << TestAction.new(:AddFile) do
  1895. $ruiObj = RUIObject.new.with('objectid', 665784376).with('selfid', -1478650284).with('textdescid', 1395090321).with('uniqueparentid', -382816812).with('classresourceid', -1261418567)
  1896. .with('uitreeindex', 0)
  1897. .with('classname', 'TextView')
  1898. .with('resource-id', 'com.google.android.gm:id/title')
  1899. .with('text', 'Attach file')
  1900.  
  1901. $ruiObj.click
  1902.  
  1903. waitsecond(2)
  1904. end
  1905.  
  1906. tcase << TestAction.new(:Menu) do
  1907. $ruiObj = RUIObject.new.with('objectid', 1571666208).with('selfid', -929198491).with('textdescid', 2010273934).with('uniqueparentid', 1659654416)
  1908. .with('uitreeindex', 0)
  1909. .with('classname', 'ImageButton')
  1910. .with('content-desc', 'Show roots')
  1911.  
  1912. $ruiObj.click
  1913.  
  1914. waitsecond(2)
  1915. end
  1916.  
  1917. tcase << TestAction.new(:Images) do
  1918. $ruiObj = RUIObject.new.with('objectid', -1941383373).with('selfid', -192133575).with('textdescid', -1736969061).with('uniqueparentid', -1508177030).with('classresourceid', 490183159)
  1919. .with('uitreeindex', 17)
  1920. .with('classname', 'TextView')
  1921. .with('resource-id', 'android:id/title')
  1922. .with('text', 'Images')
  1923.  
  1924. $ruiObj.click
  1925.  
  1926. waitsecond(2)
  1927. end
  1928.  
  1929. tcase << TestAction.new(:BB) do
  1930. $ruiObj = RUIObject.new.with('objectid', 1672498228).with('selfid', -434686975).with('textdescid', 1966941386).with('uniqueparentid', 250144459)
  1931. .with('uitreeindex', 15)
  1932. .with('classname', 'TextView')
  1933. .with('resource-id', 'android:id/title')
  1934. .with('text', 'BBB')
  1935.  
  1936. $ruiObj.click
  1937.  
  1938. waitsecond(2)
  1939. end
  1940.  
  1941. tcase << TestAction.new(:BBBfile) do
  1942. $ruiObj = RUIObject.new.with('objectid', 634917201).with('selfid', -433169344).with('textdescid', 1456659346).with('uniqueparentid', 338741138)
  1943. .with('uitreeindex', 11)
  1944. .with('classname', 'TextView')
  1945. .with('resource-id', 'android:id/title')
  1946. .with('text', 'BBBjpg')
  1947.  
  1948. $ruiObj.click
  1949.  
  1950. waitsecond(2)
  1951. end
  1952.  
  1953. tcase << TestAction.new(:Send) do
  1954. $ruiObj = RUIObject.new.with('objectid', 823683940).with('selfid', 2103341243).with('textdescid', -976543260).with('uniqueparentid', -1674145749)
  1955. .with('uitreeindex', 3)
  1956. .with('classname', 'TextView')
  1957. .with('resource-id', 'com.google.android.gm:id/send')
  1958. .with('content-desc', 'Send')
  1959.  
  1960. $ruiObj.click
  1961.  
  1962. waitsecond(2)
  1963. end
  1964.  
  1965. tcase << TestAction.new(:wait8second_2) do
  1966. waitsecond(8)
  1967. end
  1968.  
  1969. tcase << TestAction.new(:Navigate) do
  1970. $ruiObj = RUIObject.new.with('objectid', -1013150848).with('selfid', 1589392844).with('textdescid', -993230041).with('uniqueparentid', -941014244)
  1971. .with('uitreeindex', 0)
  1972. .with('classname', 'ImageButton')
  1973. .with('content-desc', 'Open navigation drawer')
  1974.  
  1975. $ruiObj.click
  1976.  
  1977. waitsecond(2)
  1978. end
  1979.  
  1980. tcase << TestAction.new(:Sent) do
  1981. $ruiObj = RUIObject.new.with('objectid', -630461263).with('selfid', -610816808).with('textdescid', 727067449).with('uniqueparentid', 336360023).with('classresourceid', 790406410)
  1982. .with('uitreeindex', 22)
  1983. .with('classname', 'TextView')
  1984. .with('resource-id', 'com.google.android.gm:id/name')
  1985. .with('text', 'Sent')
  1986.  
  1987. $ruiObj.click
  1988.  
  1989. waitsecond(2)
  1990. end
  1991.  
  1992. tcase << TestAction.new(:Sending_1) do
  1993. $progressbar = RUIObject.new.with('objectid', -267448081).with('selfid', -1495589242).with('textdescid', 299044113).with('uniqueparentid', 2063960009).with('classresourceid', -1495589242)
  1994. .with('uitreeindex', 9)
  1995. .with('pretext', 'Sent')
  1996. .with('classname', 'ProgressBar')
  1997.  
  1998. $sending = RUIObject.new.with('objectid', -1155201837).with('selfid', -1497543209).with('textdescid', -636469849).with('uniqueparentid', 1819926825).with('classresourceid', 1815484335)
  1999. .with('uitreeindex', 4)
  2000. .with('pretext', 'Sent?0')
  2001. .with('classname', 'android.view.View')
  2002. .with('content-desc', 'Double tap to select this conversation')
  2003.  
  2004.  
  2005. $second = 0;
  2006.  
  2007. while ($progressbar.isExist || $sending.isNotExist) && $second < 20 do
  2008. puts $second
  2009. $second += 1
  2010. waitsecond(1)
  2011. end
  2012.  
  2013. waitsecond(2)
  2014.  
  2015. waitsecond(2)
  2016. end
  2017.  
  2018. tcase << TestAction.new(:FailCheck) do
  2019. $ruiObj = RUIObject.new.with('objectid', -1155201837).with('selfid', -1497543209).with('textdescid', -636469849).with('uniqueparentid', 1819926825).with('classresourceid', 1815484335)
  2020. .with('uitreeindex', 4)
  2021. .with('pretext', 'Sent?0')
  2022. .with('classname', 'android.view.View')
  2023. .with('content-desc', 'Double tap to select this conversation')
  2024.  
  2025. $ruiObj.isExist
  2026.  
  2027. waitsecond(0)
  2028. end
  2029.  
  2030. tcase << TestAction.new(:Result) do
  2031. $myTestResult = checkLastExistResult
  2032.  
  2033.  
  2034.  
  2035. waitsecond(0)
  2036. end
  2037.  
  2038. tcase << TestAction.new(:Delete) do
  2039. $sentMail = RUIObject.new.with('objectid', -1155201837).with('selfid', -1497543209).with('textdescid', -636469849).with('uniqueparentid', 619983791).with('classresourceid', 1815484335)
  2040. .with('uitreeindex', 4)
  2041. .with('pretext', 'Sent?0')
  2042. .with('classname', 'android.view.View')
  2043. .with('content-desc', 'Double tap to select this conversation')
  2044.  
  2045. $deleteButton = RUIObject.new.with('objectid', 1483973719).with('selfid', -390800203).with('textdescid', 1201560756).with('uniqueparentid', 1555561971)
  2046. .with('uitreeindex', 11)
  2047. .with('classname', 'TextView')
  2048. .with('resource-id', 'com.google.android.gm:id/delete')
  2049. .with('content-desc', 'Delete')
  2050.  
  2051. $count = 0;
  2052.  
  2053. while ($sentMail.isExist) && $count < 10 do
  2054. puts $count
  2055. $count += 1
  2056. $sentMail.click
  2057. waitsecond(2)
  2058. $deleteButton.click
  2059. waitsecond(2)
  2060. end
  2061.  
  2062. waitsecond(2)
  2063. end
  2064.  
  2065. tcase << TestAction.new(:logStop) do
  2066. logStopTest("Email_5_1_3_2")
  2067.  
  2068. waitsecond(0)
  2069. end
  2070.  
  2071. tcase.run(loopTime)
  2072.  
  2073. end
  2074.  
  2075. def self.Email_Precondition(loopTime)
  2076.  
  2077. tcase = TestCase.new("Email_Precondition")
  2078.  
  2079. tcase << TestAction.new(:Settings) do
  2080. gotoAppPixel('Settings')
  2081.  
  2082. waitsecond(2)
  2083. end
  2084.  
  2085. tcase << TestAction.new(:Apps) do
  2086. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', -999362027).with('textdescid', -2077380333).with('uniqueparentid', 1746487935)
  2087. .with('uitreeindex', 18)
  2088. .with('classname', 'TextView')
  2089. .with('resource-id', 'android:id/title')
  2090. .with('text', 'Apps notifications')
  2091.  
  2092. $ruiObj.click
  2093.  
  2094. waitsecond(2)
  2095. end
  2096.  
  2097. tcase << TestAction.new(:SearchCamera) do
  2098. scrollAndSearchText('Camera')
  2099.  
  2100. waitsecond(2)
  2101. end
  2102.  
  2103. tcase << TestAction.new(:Camera) do
  2104. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', -374634778).with('textdescid', 1951829936).with('uniqueparentid', 1212711866)
  2105. .with('uitreeindex', 4)
  2106. .with('classname', 'TextView')
  2107. .with('resource-id', 'android:id/title')
  2108. .with('text', 'Camera')
  2109.  
  2110. $ruiObj.click
  2111.  
  2112. waitsecond(2)
  2113. end
  2114.  
  2115. tcase << TestAction.new(:Storage) do
  2116. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', -1162414374).with('textdescid', -2051153520).with('uniqueparentid', 162506563)
  2117. .with('uitreeindex', 10)
  2118. .with('classname', 'TextView')
  2119. .with('resource-id', 'android:id/title')
  2120. .with('text', 'Storage')
  2121.  
  2122. $ruiObj.click
  2123.  
  2124. waitsecond(2)
  2125. end
  2126.  
  2127. tcase << TestAction.new(:ClearCache) do
  2128. $ruiObj = RUIObject.new.with('objectid', 699987448).with('selfid', 2145148908).with('textdescid', -1064159269).with('uniqueparentid', -1819455735)
  2129. .with('uitreeindex', 5)
  2130. .with('classname', 'Button')
  2131. .with('resource-id', 'com.android.settings:id/left_button')
  2132. .with('text', 'CLEAR DATA')
  2133.  
  2134. $ruiObj.click
  2135.  
  2136. waitsecond(2)
  2137. end
  2138.  
  2139. tcase << TestAction.new(:OK) do
  2140. $ruiObj = RUIObject.new.with('objectid', -1004548822).with('selfid', -1318451484).with('textdescid', -405740082).with('uniqueparentid', -2133631140).with('classresourceid', 1834539358)
  2141. .with('uitreeindex', 4)
  2142. .with('classname', 'Button')
  2143. .with('resource-id', 'android:id/button1')
  2144. .with('text', 'OK')
  2145.  
  2146. $ruiObj.click
  2147.  
  2148. waitsecond(2)
  2149. end
  2150.  
  2151. tcase << TestAction.new(:OpenCamera) do
  2152. gotoAppPixel('Camera')
  2153.  
  2154. waitsecond(2)
  2155. end
  2156.  
  2157. tcase << TestAction.new(:Allow) do
  2158. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  2159. .with('uitreeindex', 3)
  2160. .with('classname', 'Button')
  2161. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  2162. .with('text', 'ALLOW')
  2163.  
  2164. $ruiObj.click
  2165.  
  2166. waitsecond(2)
  2167. end
  2168.  
  2169. tcase << TestAction.new(:CheckBox) do
  2170. $ruiObj = RUIObject.new.with('objectid', 664129579).with('selfid', -829319141).with('textdescid', 745076204).with('uniqueparentid', 342104880)
  2171. .with('uitreeindex', 2)
  2172. .with('classname', 'CheckBox')
  2173. .with('resource-id', 'com.android.camera2:id/check_box')
  2174. .with('text', 'Tag your photos and videos with the locations where theyre taken')
  2175.  
  2176. $ruiObj.click
  2177.  
  2178. waitsecond(2)
  2179. end
  2180.  
  2181. tcase << TestAction.new(:Next) do
  2182. $ruiObj = RUIObject.new.with('objectid', -1187921382).with('selfid', -1055162259).with('textdescid', 1673606663).with('uniqueparentid', -1678803509)
  2183. .with('uitreeindex', 3)
  2184. .with('classname', 'Button')
  2185. .with('resource-id', 'com.android.camera2:id/confirm_button')
  2186. .with('text', 'NEXT')
  2187.  
  2188. $ruiObj.click
  2189.  
  2190. waitsecond(2)
  2191. end
  2192.  
  2193. tcase << TestAction.new(:swipeLeft) do
  2194. swipe_horizontal_back 50
  2195.  
  2196. waitsecond(2)
  2197. end
  2198.  
  2199. tcase << TestAction.new(:wait2) do
  2200. waitsecond(2)
  2201. end
  2202.  
  2203. tcase << TestAction.new(:clickSettings) do
  2204. click(1314,2128.5)
  2205.  
  2206. waitsecond(2)
  2207. end
  2208.  
  2209. tcase << TestAction.new(:Resolution) do
  2210. $ruiObj = RUIObject.new.with('objectid', 769121715).with('selfid', 865723314).with('textdescid', -589260518).with('uniqueparentid', -1979112293).with('classresourceid', 490183159)
  2211. .with('uitreeindex', 2)
  2212. .with('classname', 'TextView')
  2213. .with('resource-id', 'android:id/title')
  2214. .with('text', 'Resolution quality')
  2215.  
  2216. $ruiObj.click
  2217.  
  2218. waitsecond(2)
  2219. end
  2220.  
  2221. tcase << TestAction.new(:BackCamera) do
  2222. $ruiObj = RUIObject.new.with('objectid', 769121715).with('selfid', 1818667439).with('textdescid', 336805309).with('uniqueparentid', -1743767793).with('classresourceid', 490183159)
  2223. .with('uitreeindex', 3)
  2224. .with('classname', 'TextView')
  2225. .with('resource-id', 'android:id/title')
  2226. .with('text', 'Back camera photo')
  2227.  
  2228. $ruiObj.click
  2229.  
  2230. waitsecond(2)
  2231. end
  2232.  
  2233. tcase << TestAction.new(:Pixel) do
  2234. $ruiObj = RUIObject.new.with('objectid', -2032711530).with('selfid', 54695798).with('textdescid', -491191936).with('uniqueparentid', -1389815021).with('classresourceid', 2074814108)
  2235. .with('uitreeindex', 7)
  2236. .with('classname', 'CheckedTextView')
  2237. .with('resource-id', 'android:id/text1')
  2238. .with('text', '169 09 megapixels')
  2239.  
  2240. $ruiObj.click
  2241.  
  2242. waitsecond(2)
  2243. end
  2244.  
  2245. tcase << TestAction.new(:FrontCamera) do
  2246. $ruiObj = RUIObject.new.with('objectid', 769121715).with('selfid', -625898417).with('textdescid', -59672123).with('uniqueparentid', 1182748742).with('classresourceid', 490183159)
  2247. .with('uitreeindex', 5)
  2248. .with('classname', 'TextView')
  2249. .with('resource-id', 'android:id/title')
  2250. .with('text', 'Front camera photo')
  2251.  
  2252. $ruiObj.click
  2253.  
  2254. waitsecond(2)
  2255. end
  2256.  
  2257. tcase << TestAction.new(:Pixel2) do
  2258. $ruiObj = RUIObject.new.with('objectid', -2032711530).with('selfid', -848883235).with('textdescid', 1562629113).with('uniqueparentid', 2068759084).with('classresourceid', 2074814108)
  2259. .with('uitreeindex', 7)
  2260. .with('classname', 'CheckedTextView')
  2261. .with('resource-id', 'android:id/text1')
  2262. .with('text', '169 02 megapixels')
  2263.  
  2264. $ruiObj.click
  2265.  
  2266. waitsecond(2)
  2267. end
  2268.  
  2269. tcase << TestAction.new(:Back) do
  2270. $ruiObj = RUIObject.new.with('objectid', -749179047).with('selfid', -123872605).with('textdescid', -911113085).with('uniqueparentid', -292129185)
  2271. .with('uitreeindex', 0)
  2272. .with('classname', 'ImageButton')
  2273. .with('content-desc', 'Navigate up')
  2274.  
  2275. $ruiObj.click
  2276.  
  2277. waitsecond(2)
  2278. end
  2279.  
  2280. tcase << TestAction.new(:Back2) do
  2281. $ruiObj = RUIObject.new.with('objectid', -749179047).with('selfid', -123872605).with('textdescid', -911113085).with('uniqueparentid', -292129185)
  2282. .with('uitreeindex', 0)
  2283. .with('classname', 'ImageButton')
  2284. .with('content-desc', 'Navigate up')
  2285.  
  2286. $ruiObj.click
  2287.  
  2288. waitsecond(2)
  2289. end
  2290.  
  2291. tcase << TestAction.new(:Shutter) do
  2292. $ruiObj = RUIObject.new.with('objectid', -1444537032).with('selfid', 111453042).with('textdescid', 1162006437).with('uniqueparentid', -1154361882)
  2293. .with('uitreeindex', 6)
  2294. .with('classname', 'ImageView')
  2295. .with('resource-id', 'com.android.camera2:id/shutter_button')
  2296. .with('content-desc', 'Shutter')
  2297.  
  2298. $ruiObj.click
  2299.  
  2300. waitsecond(2)
  2301. end
  2302.  
  2303. tcase << TestAction.new(:GoToSettings) do
  2304. gotoAppPixel('Settings')
  2305.  
  2306. waitsecond(2)
  2307. end
  2308.  
  2309. tcase << TestAction.new(:SearchAccounts) do
  2310. scrollAndSearchText('Users & accounts')
  2311.  
  2312. waitsecond(2)
  2313. end
  2314.  
  2315. tcase << TestAction.new(:UsersAccounts) do
  2316. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', 1816414541).with('textdescid', 483636443).with('uniqueparentid', -769009501)
  2317. .with('uitreeindex', 21)
  2318. .with('classname', 'TextView')
  2319. .with('resource-id', 'android:id/title')
  2320. .with('text', 'Users accounts')
  2321.  
  2322. $ruiObj.click
  2323.  
  2324. waitsecond(2)
  2325. end
  2326.  
  2327. tcase << TestAction.new(:ClickAccount) do
  2328. $accountButton = RUIObject.new.with('objectid', 2093003359).with('selfid', -1580627678).with('textdescid', 458594721).with('uniqueparentid', -1208912882)
  2329. .with('uitreeindex', 6)
  2330. .with('pretext', 'Accounts for Owner')
  2331. .with('classname', 'ImageView')
  2332. .with('resource-id', 'android:id/icon')
  2333.  
  2334. if $accountButton.isExist
  2335. $accountButton.click
  2336. end
  2337.  
  2338. waitsecond(2)
  2339. end
  2340.  
  2341. tcase << TestAction.new(:RemoveAccount) do
  2342. $removeAccount = $ruiObj = RUIObject.new.with('objectid', 142601956).with('selfid', 190620862).with('textdescid', -81471853).with('uniqueparentid', -1843605818)
  2343. .with('uitreeindex', 6)
  2344. .with('classname', 'Button')
  2345. .with('resource-id', 'com.android.settings:id/button')
  2346. .with('text', 'REMOVE ACCOUNT')
  2347. if $removeAccount.isExist
  2348. $removeAccount.click
  2349. end
  2350.  
  2351. $ruiObj.click
  2352.  
  2353. waitsecond(2)
  2354. end
  2355.  
  2356. tcase << TestAction.new(:Confirm) do
  2357. $ruiObj = RUIObject.new.with('objectid', -1004548822).with('selfid', -1699837063).with('textdescid', -172267303).with('uniqueparentid', 1451097447).with('classresourceid', 1834539358)
  2358. .with('uitreeindex', 4)
  2359. .with('classname', 'Button')
  2360. .with('resource-id', 'android:id/button1')
  2361. .with('text', 'REMOVE ACCOUNT')
  2362.  
  2363. $ruiObj.click
  2364.  
  2365. waitsecond(2)
  2366. end
  2367.  
  2368. tcase << TestAction.new(:GoToGmail) do
  2369. gotoAppPixel('Gmail')
  2370.  
  2371. waitsecond(2)
  2372. end
  2373.  
  2374. tcase << TestAction.new(:TourGotIt) do
  2375. $ruiObj = RUIObject.new.with('objectid', -1374270067).with('selfid', 29381074).with('textdescid', -1431784690).with('uniqueparentid', -1320248293)
  2376. .with('uitreeindex', 4)
  2377. .with('classname', 'TextView')
  2378. .with('resource-id', 'com.google.android.gm:id/welcome_tour_got_it')
  2379. .with('text', 'GOT IT')
  2380.  
  2381. $ruiObj.click
  2382. ifFailJumpTo(:TourNext)
  2383.  
  2384. waitsecond(2)
  2385. end
  2386.  
  2387. tcase << TestAction.new(:TourNext) do
  2388. $ruiObj = RUIObject.new.with('objectid', -965796713).with('selfid', 2106428631).with('textdescid', -49033732).with('uniqueparentid', 41439437)
  2389. .with('uitreeindex', 6)
  2390. .with('classname', 'ImageView')
  2391. .with('resource-id', 'com.google.android.gm:id/welcome_tour_next')
  2392. .with('content-desc', 'Next')
  2393.  
  2394. $ruiObj.click
  2395.  
  2396. waitsecond(2)
  2397. end
  2398.  
  2399. tcase << TestAction.new(:WelcomeDone) do
  2400. $ruiObj = RUIObject.new.with('objectid', -1459269354).with('selfid', -2111812423).with('textdescid', -1337192108).with('uniqueparentid', -118933564)
  2401. .with('uitreeindex', 5)
  2402. .with('classname', 'TextView')
  2403. .with('resource-id', 'com.google.android.gm:id/welcome_tour_done')
  2404. .with('text', 'DONE')
  2405.  
  2406. $ruiObj.click
  2407.  
  2408. waitsecond(2)
  2409. end
  2410.  
  2411. tcase << TestAction.new(:AddEmail) do
  2412. $ruiObj = RUIObject.new.with('objectid', 1784765643).with('selfid', 394229773).with('textdescid', -1185071217).with('uniqueparentid', 35495294).with('classresourceid', 759149223)
  2413. .with('uitreeindex', 2)
  2414. .with('classname', 'TextView')
  2415. .with('resource-id', 'com.google.android.gm:id/setup_addresses_add_another')
  2416. .with('text', 'Add an email address')
  2417.  
  2418. $ruiObj.click
  2419.  
  2420. waitsecond(2)
  2421. end
  2422.  
  2423. tcase << TestAction.new(:SetUpGmail) do
  2424. $ruiObj = RUIObject.new.with('objectid', -1456508049).with('selfid', -320144828).with('textdescid', 2104439094).with('uniqueparentid', 1362689227).with('classresourceid', -1877262527)
  2425. .with('uitreeindex', 4)
  2426. .with('classname', 'TextView')
  2427. .with('resource-id', 'com.google.android.gm:id/account_setup_label')
  2428. .with('text', 'Google')
  2429.  
  2430. $ruiObj.click
  2431.  
  2432. waitsecond(2)
  2433. end
  2434.  
  2435. tcase << TestAction.new(:Loading) do
  2436. $signIn = RUIObject.new.with('objectid', 476695571).with('selfid', 1024373019).with('textdescid', 1892660845).with('uniqueparentid', 877823464)
  2437. .with('uitreeindex', 3)
  2438. .with('classname', 'EditText')
  2439. .with('resource-id', 'identifierId')
  2440.  
  2441. $second = 0;
  2442.  
  2443. while ($signIn.isNotExist) && $second < 15
  2444. puts $second
  2445. $second += 1
  2446. waitsecond(1)
  2447. end
  2448.  
  2449. waitsecond(2)
  2450. end
  2451.  
  2452. tcase << TestAction.new(:ID) do
  2453. $ruiObj = RUIObject.new.with('objectid', 476695571).with('selfid', 1024373019).with('textdescid', 1892660845).with('uniqueparentid', 877823464)
  2454. .with('uitreeindex', 3)
  2455. .with('classname', 'EditText')
  2456. .with('resource-id', 'identifierId')
  2457.  
  2458. $ruiObj.inputtext('nalab.qct02@gmail.com')
  2459.  
  2460. waitsecond(2)
  2461. end
  2462.  
  2463. tcase << TestAction.new(:Next2) do
  2464. $ruiObj = RUIObject.new.with('objectid', -240525947).with('selfid', 1739137727).with('textdescid', 264687918).with('uniqueparentid', -1629724901)
  2465. .with('uitreeindex', 6)
  2466. .with('classname', 'Button')
  2467. .with('resource-id', 'identifierNext')
  2468. .with('content-desc', 'NEXT')
  2469.  
  2470. $ruiObj.click
  2471.  
  2472. waitsecond(2)
  2473. end
  2474.  
  2475. tcase << TestAction.new(:PWD) do
  2476. $ruiObj = RUIObject.new.with('objectid', 1904625454).with('selfid', 1666676343).with('textdescid', -1086153038).with('uniqueparentid', -1718739466)
  2477. .with('uitreeindex', 3)
  2478. .with('classname', 'EditText')
  2479.  
  2480. $ruiObj.inputtext('12abcdef34')
  2481.  
  2482. waitsecond(2)
  2483. end
  2484.  
  2485. tcase << TestAction.new(:Next3) do
  2486. $ruiObj = RUIObject.new.with('objectid', -412639049).with('selfid', -1426408179).with('textdescid', 1787982268).with('uniqueparentid', 446487721)
  2487. .with('uitreeindex', 9)
  2488. .with('classname', 'Button')
  2489. .with('resource-id', 'passwordNext')
  2490. .with('content-desc', 'NEXT')
  2491.  
  2492. $ruiObj.click
  2493.  
  2494. waitsecond(2)
  2495. end
  2496.  
  2497. tcase << TestAction.new(:Agree) do
  2498. $ruiObj = RUIObject.new.with('objectid', 948550242).with('selfid', -1165549500).with('textdescid', -1009902985).with('uniqueparentid', 2011089354)
  2499. .with('uitreeindex', 7)
  2500. .with('classname', 'Button')
  2501. .with('resource-id', 'signinconsentNext')
  2502. .with('content-desc', 'I AGREE')
  2503.  
  2504. $ruiObj.click
  2505.  
  2506. waitsecond(2)
  2507. end
  2508.  
  2509. tcase << TestAction.new(:BackUpOff) do
  2510. $ruiObj = RUIObject.new.with('objectid', 2065931740).with('selfid', -1480442820).with('textdescid', 1158832046).with('uniqueparentid', -1396600084).with('classresourceid', -483288220)
  2511. .with('uitreeindex', 6)
  2512. .with('classname', 'TextView')
  2513. .with('resource-id', 'com.google.android.gms.policy_sidecar_o:id/backup_opt_in_disable_backup')
  2514. .with('text', 'Turn off backup')
  2515.  
  2516. $ruiObj.click
  2517.  
  2518. waitsecond(2)
  2519. end
  2520.  
  2521. tcase << TestAction.new(:OK2) do
  2522. $ruiObj = RUIObject.new.with('objectid', -725277645).with('selfid', -1318451484).with('textdescid', -395210665).with('uniqueparentid', 887820595).with('classresourceid', 1834539358)
  2523. .with('uitreeindex', 4)
  2524. .with('classname', 'Button')
  2525. .with('resource-id', 'android:id/button1')
  2526. .with('text', 'OK')
  2527.  
  2528. $ruiObj.click
  2529.  
  2530. waitsecond(2)
  2531. end
  2532.  
  2533. tcase << TestAction.new(:TakeToGmail) do
  2534. $ruiObj = RUIObject.new.with('objectid', -1799555089).with('selfid', 1716018366).with('textdescid', -485572825).with('uniqueparentid', -1903073185)
  2535. .with('uitreeindex', 7)
  2536. .with('classname', 'TextView')
  2537. .with('resource-id', 'com.google.android.gm:id/action_done')
  2538. .with('text', 'TAKE ME TO GMAIL')
  2539.  
  2540. $ruiObj.click
  2541.  
  2542. waitsecond(2)
  2543. end
  2544.  
  2545. tcase << TestAction.new(:RecentApps) do
  2546. pressRecentApps
  2547.  
  2548. waitsecond(2)
  2549. end
  2550.  
  2551. tcase << TestAction.new(:SwipeUp) do
  2552. swipe_vertical_back 100
  2553.  
  2554. waitsecond(2)
  2555. end
  2556.  
  2557. tcase << TestAction.new(:swipeUp) do
  2558. swipe_vertical_back 100
  2559.  
  2560. waitsecond(2)
  2561. end
  2562.  
  2563. tcase << TestAction.new(:ClearAll) do
  2564. $ruiObj = RUIObject.new.with('objectid', -213794734).with('selfid', -204985471).with('textdescid', 1763854688).with('uniqueparentid', 1782126143)
  2565. .with('uitreeindex', 12)
  2566. .with('classname', 'TextView')
  2567. .with('resource-id', 'com.android.systemui:id/button')
  2568. .with('text', 'CLEAR ALL')
  2569.  
  2570. $ruiObj.click
  2571.  
  2572. waitsecond(2)
  2573. end
  2574.  
  2575. tcase.run(loopTime)
  2576.  
  2577. end
  2578.  
  2579. def self.IPME_5_1_15_2(loopTime)
  2580.  
  2581. tcase = TestCase.new("IPME_5_1_15_2")
  2582.  
  2583. tcase << TestAction.new(:logstart) do
  2584. logStartTest("05_01_15_02_IPME")
  2585.  
  2586. waitsecond(0)
  2587. end
  2588.  
  2589. tcase << TestAction.new(:gotoMessages) do
  2590. gotoAppPixel("Messages")
  2591.  
  2592. waitsecond(2)
  2593. end
  2594.  
  2595. tcase << TestAction.new(:startnewchat) do
  2596. $ruiObj = RUIObject.new.with('objectid', 764419066).with('selfid', 916878134).with('textdescid', 48640071).with('uniqueparentid', 1408873138)
  2597. .with('uitreeindex', 6)
  2598. .with('classname', 'ImageView')
  2599. .with('resource-id', 'com.google.android.apps.messaging:id/start_new_conversation_button')
  2600. .with('content-desc', 'Start new conversation')
  2601.  
  2602. $ruiObj.click
  2603.  
  2604. waitsecond(2)
  2605. end
  2606.  
  2607. tcase << TestAction.new(:MultiAutoCompleteTextView_RecipientTextView_2) do
  2608. $ruiObj = RUIObject.new.with('objectid', -1173212947).with('selfid', 1163803387).with('textdescid', -2009862957).with('uniqueparentid', 955347666).with('classresourceid', 461007471)
  2609. .with('uitreeindex', 1)
  2610. .with('classname', 'MultiAutoCompleteTextView')
  2611. .with('resource-id', 'com.google.android.apps.messaging:id/recipient_text_view')
  2612.  
  2613. $ruiObj.inputtext('A01 a01')
  2614.  
  2615. waitsecond(2)
  2616. end
  2617.  
  2618. tcase << TestAction.new(:pressEnter_3) do
  2619. pressEnter
  2620.  
  2621. waitsecond(2)
  2622. end
  2623.  
  2624. tcase << TestAction.new(:input200characters) do
  2625. $ruiObj = RUIObject.new.with('objectid', 839697618).with('selfid', -1932318364).with('textdescid', 260822414).with('uniqueparentid', 1032254030)
  2626. .with('uitreeindex', 8)
  2627. .with('classname', 'EditText')
  2628. .with('resource-id', 'com.google.android.apps.messaging:id/compose_message_text')
  2629.  
  2630. $ruiObj.inputtext('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccdddddddddddddddeeeeeeeeeeeeeeffffffffffffffffgggggggggaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbb')
  2631.  
  2632. waitsecond(2)
  2633. end
  2634.  
  2635. tcase << TestAction.new(:sendmessages) do
  2636. $ruiObj = RUIObject.new.with('objectid', 874675584).with('selfid', -1214465728).with('textdescid', 1345139360).with('uniqueparentid', 1105097632)
  2637. .with('uitreeindex', 10)
  2638. .with('classname', 'ImageView')
  2639. .with('resource-id', 'com.google.android.apps.messaging:id/send_message_button_icon')
  2640.  
  2641. $ruiObj.click
  2642.  
  2643. waitsecond(2)
  2644. end
  2645.  
  2646. tcase << TestAction.new(:textmessageexist) do
  2647. $ruiObj = RUIObject.new.with('objectid', -1787159315).with('selfid', -1421701512).with('textdescid', 320778449).with('uniqueparentid', 942352883)
  2648. .with('uitreeindex', 2)
  2649. .with('classname', 'TextView')
  2650. .with('resource-id', 'com.google.android.apps.messaging:id/message_text')
  2651. .with('text', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccdddddddddddddddeeeeeeeeeeeeeeffffffffffffffffgggggggggaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbb')
  2652.  
  2653. $ruiObj.isExist
  2654.  
  2655. waitsecond(2)
  2656. end
  2657.  
  2658. tcase << TestAction.new(:logstop) do
  2659. $myTestResult = checkLastExistResult
  2660.  
  2661. if $myTestResult == false
  2662. $myFailReason == "Message is not sent"
  2663. end
  2664. logStopTest("05_01_15_02_IPME")
  2665.  
  2666.  
  2667. waitsecond(0)
  2668. end
  2669.  
  2670. tcase << TestAction.new(:pressBack_8) do
  2671. pressBack
  2672.  
  2673. waitsecond(2)
  2674. end
  2675.  
  2676. tcase << TestAction.new(:pressBack_9) do
  2677. pressBack
  2678.  
  2679. waitsecond(2)
  2680. end
  2681.  
  2682. tcase << TestAction.new(:pressBack_10) do
  2683. pressBack
  2684.  
  2685. waitsecond(2)
  2686. end
  2687.  
  2688. tcase << TestAction.new(:pressHome_11) do
  2689. pressHome
  2690.  
  2691. waitsecond(2)
  2692. end
  2693.  
  2694. tcase.run(loopTime)
  2695.  
  2696. end
  2697.  
  2698. def self.IPME_5_1_15_4(loopTime)
  2699.  
  2700. tcase = TestCase.new("IPME_5_1_15_4")
  2701.  
  2702. tcase << TestAction.new(:logstart) do
  2703. logStartTest("05_01_15_02_IPME")
  2704.  
  2705. waitsecond(0)
  2706. end
  2707.  
  2708. tcase << TestAction.new(:gotoMessages) do
  2709. gotoAppPixel("Messages")
  2710.  
  2711. waitsecond(2)
  2712. end
  2713.  
  2714. tcase << TestAction.new(:startnewchat) do
  2715. $ruiObj = RUIObject.new.with('objectid', 764419066).with('selfid', 916878134).with('textdescid', 48640071).with('uniqueparentid', 1408873138)
  2716. .with('uitreeindex', 6)
  2717. .with('classname', 'ImageView')
  2718. .with('resource-id', 'com.google.android.apps.messaging:id/start_new_conversation_button')
  2719. .with('content-desc', 'Start new conversation')
  2720.  
  2721. $ruiObj.click
  2722.  
  2723. waitsecond(2)
  2724. end
  2725.  
  2726. tcase << TestAction.new(:MultiAutoCompleteTextView_RecipientTextView_2) do
  2727. $ruiObj = RUIObject.new.with('objectid', -1173212947).with('selfid', 1163803387).with('textdescid', -2009862957).with('uniqueparentid', 955347666).with('classresourceid', 461007471)
  2728. .with('uitreeindex', 1)
  2729. .with('classname', 'MultiAutoCompleteTextView')
  2730. .with('resource-id', 'com.google.android.apps.messaging:id/recipient_text_view')
  2731.  
  2732. $ruiObj.inputtext('A01 a01')
  2733.  
  2734. waitsecond(2)
  2735. end
  2736.  
  2737. tcase << TestAction.new(:pressEnter_3) do
  2738. pressEnter
  2739.  
  2740. waitsecond(2)
  2741. end
  2742.  
  2743. tcase << TestAction.new(:sendmessages) do
  2744. $ruiObj = RUIObject.new.with('objectid', 874675584).with('selfid', -1214465728).with('textdescid', 1345139360).with('uniqueparentid', 1105097632)
  2745. .with('uitreeindex', 10)
  2746. .with('classname', 'ImageView')
  2747. .with('resource-id', 'com.google.android.apps.messaging:id/send_message_button_icon')
  2748.  
  2749. $ruiObj.click
  2750.  
  2751. waitsecond(2)
  2752. end
  2753.  
  2754. tcase << TestAction.new(:textmessageexist) do
  2755. $ruiObj = RUIObject.new.with('objectid', -1787159315).with('selfid', -1421701512).with('textdescid', 320778449).with('uniqueparentid', 942352883)
  2756. .with('uitreeindex', 2)
  2757. .with('classname', 'TextView')
  2758. .with('resource-id', 'com.google.android.apps.messaging:id/message_text')
  2759. .with('text', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccdddddddddddddddeeeeeeeeeeeeeeffffffffffffffffgggggggggaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbb')
  2760.  
  2761. $ruiObj.isExist
  2762.  
  2763. waitsecond(2)
  2764. end
  2765.  
  2766. tcase << TestAction.new(:logstop) do
  2767. $myTestResult = checkLastExistResult
  2768.  
  2769. if $myTestResult == false
  2770. $myFailReason == "Message is not sent"
  2771. end
  2772. logStopTest("05_01_15_02_IPME")
  2773.  
  2774.  
  2775. waitsecond(0)
  2776. end
  2777.  
  2778. tcase << TestAction.new(:pressBack_8) do
  2779. pressBack
  2780.  
  2781. waitsecond(0)
  2782. end
  2783.  
  2784. tcase << TestAction.new(:pressBack_9) do
  2785. pressBack
  2786.  
  2787. waitsecond(0)
  2788. end
  2789.  
  2790. tcase << TestAction.new(:pressBack_10) do
  2791. pressBack
  2792.  
  2793. waitsecond(0)
  2794. end
  2795.  
  2796. tcase << TestAction.new(:pressHome_11) do
  2797. pressHome
  2798.  
  2799. waitsecond(0)
  2800. end
  2801.  
  2802. tcase.run(loopTime)
  2803.  
  2804. end
  2805.  
  2806. def self.MenuNav_5_1_9_1(loopTime)
  2807.  
  2808. tcase = TestCase.new("MenuNav_5_1_9_1")
  2809.  
  2810. tcase << TestAction.new(:scriptAction_2) do
  2811. $Apps = db("AppName").length
  2812. i = 0
  2813.  
  2814. while i < $Apps do
  2815.  
  2816. logStartTest("MenuNav_5_1_9_1")
  2817.  
  2818. gotoAppPixel(db("AppName")[i])
  2819.  
  2820. waitsecond(2)
  2821.  
  2822. RUIObject.new.with('objectid', 1308040668).with('selfid', 1900891271).with('textdescid', 1801250344).with('uniqueparentid', 125426211)
  2823. .with('uitreeindex', 4)
  2824. .with('classname', 'ImageView')
  2825. .with('resource-id', 'com.google.android.apps.nexuslauncher:id/all_apps_handle')
  2826. .with('content-desc', 'Apps list').isNotExist
  2827.  
  2828. waitsecond(2)
  2829.  
  2830. pressHome
  2831.  
  2832. $myTestResult = checkLastExistResult
  2833.  
  2834. logStopTest("MenuNav_5_1_9_1")
  2835.  
  2836. waitsecond(2)
  2837.  
  2838. i += 1
  2839. end
  2840.  
  2841.  
  2842.  
  2843. waitsecond(2)
  2844. end
  2845.  
  2846. tcase.run(loopTime)
  2847.  
  2848. end
  2849.  
  2850. def self.Messaging_5_1_2_3(loopTime)
  2851.  
  2852. tcase = TestCase.new("Messaging_5_1_2_3")
  2853.  
  2854. tcase << TestAction.new(:LogStart) do
  2855. logStartTest('Messaging_5_1_2_3')
  2856.  
  2857. waitsecond(0)
  2858. end
  2859.  
  2860. tcase << TestAction.new(:goto_Messages) do
  2861. gotoAppPixel('Messages')
  2862.  
  2863. waitsecond(2)
  2864. end
  2865.  
  2866. tcase << TestAction.new(:Messages_Default) do
  2867. $ruiObj = RUIObject.new.with('objectid', 774620124).with('selfid', -737737443).with('textdescid', -1309712823).with('uniqueparentid', 1739951846)
  2868. .with('uitreeindex', 5)
  2869. .with('classname', 'TextView')
  2870. .with('resource-id', 'com.google.android.apps.messaging:id/next')
  2871. .with('text', 'NEXT')
  2872.  
  2873. $ruiObj.click
  2874.  
  2875. waitsecond(2)
  2876. end
  2877.  
  2878. tcase << TestAction.new(:Confirm_Message_Default) do
  2879. $ruiObj = RUIObject.new.with('objectid', -1004548822).with('selfid', 2077686463).with('textdescid', 307253103).with('uniqueparentid', 1156097466).with('classresourceid', 1834539358)
  2880. .with('uitreeindex', 4)
  2881. .with('classname', 'Button')
  2882. .with('resource-id', 'android:id/button1')
  2883. .with('text', 'YES')
  2884.  
  2885. $ruiObj.click
  2886.  
  2887. waitsecond(2)
  2888. end
  2889.  
  2890. tcase << TestAction.new(:Open_New_Message) do
  2891. $ruiObj = RUIObject.new.with('objectid', 764419066).with('selfid', 916878134).with('textdescid', 48640071).with('uniqueparentid', 1408873138)
  2892. .with('uitreeindex', 6)
  2893. .with('classname', 'ImageView')
  2894. .with('resource-id', 'com.google.android.apps.messaging:id/start_new_conversation_button')
  2895. .with('content-desc', 'Start new conversation')
  2896.  
  2897. $ruiObj.click
  2898.  
  2899. waitsecond(2)
  2900. end
  2901.  
  2902. tcase << TestAction.new(:Select_Recipient) do
  2903. $ruiObj = RUIObject.new.with('objectid', 1212228391).with('selfid', 1084775715).with('textdescid', -604433803).with('uniqueparentid', 1087733730).with('classresourceid', -848607765)
  2904. .with('uitreeindex', 10)
  2905. .with('classname', 'TextView')
  2906. .with('resource-id', 'com.google.android.apps.messaging:id/contact_name')
  2907. .with('text', 'A01 a01')
  2908.  
  2909. $ruiObj.click
  2910.  
  2911. waitsecond(2)
  2912. end
  2913.  
  2914. tcase << TestAction.new(:Input_Message_Text) do
  2915. $inputText = RUIObject.new.with('objectid', 839697618).with('selfid', -1932318364).with('textdescid', 260822414).with('uniqueparentid', 1032254030)
  2916. .with('uitreeindex', 8)
  2917. .with('classname', 'EditText')
  2918. .with('resource-id', 'com.google.android.apps.messaging:id/compose_message_text')
  2919.  
  2920. $inputText.inputtext('Abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzaaaaaaaaaabbbbbbbbbbcccccccccc')
  2921.  
  2922. waitsecond(2)
  2923. end
  2924.  
  2925. tcase << TestAction.new(:Send_Message) do
  2926. $ruiObj = RUIObject.new.with('objectid', 874675584).with('selfid', -1214465728).with('textdescid', 1345139360).with('uniqueparentid', 1105097632)
  2927. .with('uitreeindex', 10)
  2928. .with('classname', 'ImageView')
  2929. .with('resource-id', 'com.google.android.apps.messaging:id/send_message_button_icon')
  2930.  
  2931. $ruiObj.click
  2932.  
  2933. waitsecond(5)
  2934. end
  2935.  
  2936. tcase << TestAction.new(:Confirm_Sent) do
  2937. $ruiObj = RUIObject.new.with('objectid', -1223562103).with('selfid', -2140029069).with('textdescid', -479005533).with('uniqueparentid', -952460748)
  2938. .with('uitreeindex', 3)
  2939. .with('classname', 'TextView')
  2940. .with('text', 'Now SMS')
  2941.  
  2942. $ruiObj.isExist
  2943.  
  2944. waitsecond(0)
  2945. end
  2946.  
  2947. tcase << TestAction.new(:Test_Result) do
  2948. $myTestResult = checkLastExistResult
  2949.  
  2950. waitsecond(0)
  2951. end
  2952.  
  2953. tcase << TestAction.new(:Exit_Conversation) do
  2954. $ruiObj = RUIObject.new.with('objectid', 1425651979).with('selfid', -123872605).with('textdescid', 1768877749).with('uniqueparentid', -1261979652)
  2955. .with('uitreeindex', 9)
  2956. .with('classname', 'ImageButton')
  2957. .with('content-desc', 'Navigate up')
  2958.  
  2959. $ruiObj.click
  2960.  
  2961. waitsecond(2)
  2962. end
  2963.  
  2964. tcase << TestAction.new(:Select_Conversation) do
  2965. $ruiObj = RUIObject.new.with('objectid', 201599363).with('selfid', -373146860).with('textdescid', 648115097).with('uniqueparentid', 138155849)
  2966. .with('uitreeindex', 4)
  2967. .with('classname', 'TextView')
  2968. .with('resource-id', 'com.google.android.apps.messaging:id/conversation_name')
  2969. .with('text', 'A01 a01')
  2970.  
  2971. $ruiObj.longClick
  2972.  
  2973. waitsecond(2)
  2974. end
  2975.  
  2976. tcase << TestAction.new(:Delete_Conversation) do
  2977. $ruiObj = RUIObject.new.with('objectid', 1400187979).with('selfid', -1174101288).with('textdescid', -1369143488).with('uniqueparentid', 112203385)
  2978. .with('uitreeindex', 2)
  2979. .with('classname', 'TextView')
  2980. .with('resource-id', 'com.google.android.apps.messaging:id/action_delete')
  2981. .with('content-desc', 'Delete')
  2982.  
  2983. $ruiObj.click
  2984.  
  2985. waitsecond(2)
  2986. end
  2987.  
  2988. tcase << TestAction.new(:Confirm_Delete_Conversation) do
  2989. $ruiObj = RUIObject.new.with('objectid', -968538326).with('selfid', 982364851).with('textdescid', -2103192353).with('uniqueparentid', -1643928723).with('classresourceid', 1834539358)
  2990. .with('uitreeindex', 2)
  2991. .with('classname', 'Button')
  2992. .with('resource-id', 'android:id/button1')
  2993. .with('text', 'DELETE')
  2994.  
  2995. $ruiObj.click
  2996.  
  2997. waitsecond(2)
  2998. end
  2999.  
  3000. tcase << TestAction.new(:LogStop) do
  3001. logStopTest('Messaging_5_1_2_3')
  3002.  
  3003. waitsecond(0)
  3004. end
  3005.  
  3006. tcase << TestAction.new(:Press_Back) do
  3007. pressBack
  3008. waitsecond(1)
  3009. pressBack
  3010.  
  3011. waitsecond(2)
  3012. end
  3013.  
  3014. tcase.run(loopTime)
  3015.  
  3016. end
  3017.  
  3018. def self.Messaging_5_1_2_5(loopTime)
  3019.  
  3020. tcase = TestCase.new("Messaging_5_1_2_5")
  3021.  
  3022. tcase << TestAction.new(:LogStart) do
  3023. logStartTest('Messaging_5_1_2_5')
  3024.  
  3025. waitsecond(0)
  3026. end
  3027.  
  3028. tcase << TestAction.new(:goto_Messages) do
  3029. gotoAppPixel('Messages')
  3030.  
  3031. waitsecond(2)
  3032. end
  3033.  
  3034. tcase << TestAction.new(:Open_New_Message) do
  3035. $ruiObj = RUIObject.new.with('objectid', 764419066).with('selfid', 916878134).with('textdescid', 48640071).with('uniqueparentid', 1408873138)
  3036. .with('uitreeindex', 6)
  3037. .with('classname', 'ImageView')
  3038. .with('resource-id', 'com.google.android.apps.messaging:id/start_new_conversation_button')
  3039. .with('content-desc', 'Start new conversation')
  3040.  
  3041. $ruiObj.click
  3042.  
  3043. waitsecond(2)
  3044. end
  3045.  
  3046. tcase << TestAction.new(:Select_Recipient) do
  3047. $ruiObj = RUIObject.new.with('objectid', 1212228391).with('selfid', 1084775715).with('textdescid', -604433803).with('uniqueparentid', 1087733730).with('classresourceid', -848607765)
  3048. .with('uitreeindex', 10)
  3049. .with('classname', 'TextView')
  3050. .with('resource-id', 'com.google.android.apps.messaging:id/contact_name')
  3051. .with('text', 'A01 a01')
  3052.  
  3053. $ruiObj.click
  3054.  
  3055. waitsecond(2)
  3056. end
  3057.  
  3058. tcase << TestAction.new(:Input_Message_Text) do
  3059. $inputText = RUIObject.new.with('objectid', 839697618).with('selfid', -1932318364).with('textdescid', 260822414).with('uniqueparentid', 1032254030)
  3060. .with('uitreeindex', 8)
  3061. .with('classname', 'EditText')
  3062. .with('resource-id', 'com.google.android.apps.messaging:id/compose_message_text')
  3063.  
  3064. $inputText.inputtext('Abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzaaaaaaaaaabbbbbbbbbbcccccccccc')
  3065.  
  3066. waitsecond(2)
  3067. end
  3068.  
  3069. tcase << TestAction.new(:Add_Attachment) do
  3070. $ruiObj = RUIObject.new.with('objectid', -1360420814).with('selfid', -952088716).with('textdescid', 1847611113).with('uniqueparentid', 1631420680)
  3071. .with('uitreeindex', 7)
  3072. .with('classname', 'ImageButton')
  3073. .with('resource-id', 'com.google.android.apps.messaging:id/attach_media_button')
  3074. .with('content-desc', 'Add an attachment')
  3075.  
  3076. $ruiObj.click
  3077.  
  3078. waitsecond(2)
  3079. end
  3080.  
  3081. tcase << TestAction.new(:Navigate_Pictures) do
  3082. $ruiObj = RUIObject.new.with('objectid', 1408822083).with('selfid', 538927602).with('textdescid', 531479902).with('uniqueparentid', -1874692983)
  3083. .with('uitreeindex', 28)
  3084. .with('classname', 'ImageButton')
  3085. .with('content-desc', 'Choose images from this device')
  3086.  
  3087. $ruiObj.click
  3088.  
  3089. waitsecond(2)
  3090. end
  3091.  
  3092. tcase << TestAction.new(:Allow_Permission) do
  3093. $ruiObj = RUIObject.new.with('objectid', -655699299).with('selfid', -1852985786).with('textdescid', -1480420102).with('uniqueparentid', -2002661991)
  3094. .with('uitreeindex', 13)
  3095. .with('classname', 'TextView')
  3096. .with('resource-id', 'com.google.android.apps.messaging:id/missing_permission_enable')
  3097. .with('text', 'ALLOW')
  3098.  
  3099. $ruiObj.click
  3100.  
  3101. waitsecond(2)
  3102. end
  3103.  
  3104. tcase << TestAction.new(:Accept_Permission) do
  3105. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  3106. .with('uitreeindex', 3)
  3107. .with('classname', 'Button')
  3108. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  3109. .with('text', 'ALLOW')
  3110.  
  3111. $ruiObj.click
  3112.  
  3113. waitsecond(2)
  3114. end
  3115.  
  3116. tcase << TestAction.new(:Expand_Attachments) do
  3117. swipe(getDisplayWidth/2, getDisplayHeight - 50, getDisplayWidth/2, getDisplayHeight/4, 20)
  3118.  
  3119. waitsecond(2)
  3120. end
  3121.  
  3122. tcase << TestAction.new(:Search_for_Video) do
  3123. scrollAndSearchText("031")
  3124.  
  3125. waitsecond(2)
  3126. end
  3127.  
  3128. tcase << TestAction.new(:Select_Video) do
  3129. $ruiObj = RUIObject.new.with('selfid', 387236504).with('textdescid', 1922566919).with('uniqueparentid', -660471932)
  3130. .with('content-desc', 'Video attachment 31 seconds')
  3131.  
  3132. $ruiObj.click
  3133.  
  3134. waitsecond(2)
  3135. end
  3136.  
  3137. tcase << TestAction.new(:Collapse_Attachments) do
  3138. swipe(getDisplayWidth/2, getDisplayHeight/4, getDisplayWidth/2, getDisplayHeight, 10)
  3139. swipe(getDisplayWidth/2, getDisplayHeight/4, getDisplayWidth/2, getDisplayHeight, 10)
  3140.  
  3141. waitsecond(2)
  3142. end
  3143.  
  3144. tcase << TestAction.new(:Send_Message) do
  3145. $ruiObj = RUIObject.new.with('objectid', 874675584).with('selfid', -1214465728).with('textdescid', 1345139360).with('uniqueparentid', 1105097632)
  3146. .with('uitreeindex', 10)
  3147. .with('classname', 'ImageView')
  3148. .with('resource-id', 'com.google.android.apps.messaging:id/send_message_button_icon')
  3149.  
  3150. $ruiObj.click
  3151.  
  3152. waitsecond(2)
  3153. end
  3154.  
  3155. tcase << TestAction.new(:Wait_Sent_Confirmation) do
  3156. $sentMMS = RUIObject.new.with('objectid', -1223562103).with('selfid', 893316915).with('textdescid', 1281233763).with('uniqueparentid', 807778548)
  3157. .with('uitreeindex', 4)
  3158. .with('classname', 'TextView')
  3159. .with('text', 'Now MMS')
  3160.  
  3161. $count = 0
  3162.  
  3163. while $sentMMS.isNotExist && $count < 60
  3164. waitsecond(1)
  3165. $count += 1
  3166. puts $count
  3167. end
  3168.  
  3169. waitsecond(2)
  3170. end
  3171.  
  3172. tcase << TestAction.new(:Sent_Confirmation) do
  3173. $ruiObj = RUIObject.new.with('objectid', -1223562103).with('selfid', 893316915).with('textdescid', 1281233763).with('uniqueparentid', 807778548)
  3174. .with('uitreeindex', 4)
  3175. .with('classname', 'TextView')
  3176. .with('text', 'Now MMS')
  3177.  
  3178. $ruiObj.isExist
  3179.  
  3180. waitsecond(0)
  3181. end
  3182.  
  3183. tcase << TestAction.new(:Test_Result) do
  3184. $myTestResult = checkLastExistResult
  3185.  
  3186. waitsecond(0)
  3187. end
  3188.  
  3189. tcase << TestAction.new(:Press_Back) do
  3190. pressBack
  3191.  
  3192. waitsecond(2)
  3193. end
  3194.  
  3195. tcase << TestAction.new(:Exit_Conversation) do
  3196. $ruiObj = RUIObject.new.with('objectid', 1425651979).with('selfid', -123872605).with('textdescid', 1768877749).with('uniqueparentid', -1261979652)
  3197. .with('uitreeindex', 9)
  3198. .with('classname', 'ImageButton')
  3199. .with('content-desc', 'Navigate up')
  3200.  
  3201. $ruiObj.click
  3202.  
  3203. waitsecond(2)
  3204. end
  3205.  
  3206. tcase << TestAction.new(:Select_Conversation) do
  3207. $ruiObj = RUIObject.new.with('objectid', 201599363).with('selfid', -373146860).with('textdescid', 648115097).with('uniqueparentid', 138155849)
  3208. .with('uitreeindex', 6)
  3209. .with('classname', 'TextView')
  3210. .with('resource-id', 'com.google.android.apps.messaging:id/conversation_name')
  3211. .with('text', 'A01 a01')
  3212.  
  3213. $ruiObj.longClick
  3214.  
  3215. waitsecond(2)
  3216. end
  3217.  
  3218. tcase << TestAction.new(:Delete_Conversation) do
  3219. $ruiObj = RUIObject.new.with('objectid', 1400187979).with('selfid', -1174101288).with('textdescid', -1369143488).with('uniqueparentid', 112203385)
  3220. .with('uitreeindex', 2)
  3221. .with('classname', 'TextView')
  3222. .with('resource-id', 'com.google.android.apps.messaging:id/action_delete')
  3223. .with('content-desc', 'Delete')
  3224.  
  3225. $ruiObj.click
  3226.  
  3227. waitsecond(2)
  3228. end
  3229.  
  3230. tcase << TestAction.new(:Confirm_Delete_Conversation) do
  3231. $ruiObj = RUIObject.new.with('objectid', -968538326).with('selfid', 982364851).with('textdescid', -2103192353).with('uniqueparentid', -1643928723).with('classresourceid', 1834539358)
  3232. .with('uitreeindex', 2)
  3233. .with('classname', 'Button')
  3234. .with('resource-id', 'android:id/button1')
  3235. .with('text', 'DELETE')
  3236.  
  3237. $ruiObj.click
  3238.  
  3239. waitsecond(2)
  3240. end
  3241.  
  3242. tcase << TestAction.new(:LogStop) do
  3243. logStopTest('Messaging_5_1_2_5')
  3244.  
  3245. waitsecond(0)
  3246. end
  3247.  
  3248. tcase << TestAction.new(:Press_Back_1) do
  3249. pressBack
  3250. waitsecond(1)
  3251. pressBack
  3252.  
  3253. waitsecond(2)
  3254. end
  3255.  
  3256. tcase.run(loopTime)
  3257.  
  3258. end
  3259.  
  3260. def self.MultiTasking_5_1_8_1(loopTime)
  3261.  
  3262. tcase = TestCase.new("MultiTasking_5_1_8_1")
  3263.  
  3264. tcase << TestAction.new(:LogStart) do
  3265. logStartTest("MultiTasking_5_1_8_1")
  3266.  
  3267. waitsecond(0)
  3268. end
  3269.  
  3270. tcase << TestAction.new(:goto_Phone) do
  3271. gotoAppPixel('Phone')
  3272.  
  3273. waitsecond(2)
  3274. end
  3275.  
  3276. tcase << TestAction.new(:View_Contacts) do
  3277. $ruiObj = RUIObject.new.with('objectid', 1729076897).with('selfid', -1616608746).with('textdescid', -1107521081).with('uniqueparentid', -1902824159)
  3278. .with('uitreeindex', 2)
  3279. .with('classname', 'ImageView')
  3280. .with('resource-id', 'com.android.dialer:id/icon')
  3281. .with('content-desc', 'Contacts tab.')
  3282.  
  3283. $ruiObj.click
  3284.  
  3285. waitsecond(2)
  3286. end
  3287.  
  3288. tcase << TestAction.new(:Search_A01) do
  3289. scrollAndSearchText('A01 a01', 1000)
  3290.  
  3291. waitsecond(2)
  3292. end
  3293.  
  3294. tcase << TestAction.new(:Select_Contact_A01a01) do
  3295. $ruiObj = RUIObject.new.with('objectid', -667564700).with('selfid', -43585994).with('textdescid', 89720436).with('uniqueparentid', -497841051).with('classresourceid', -695489144)
  3296. .with('uitreeindex', 6)
  3297. .with('classname', 'TextView')
  3298. .with('resource-id', 'com.android.dialer:id/cliv_name_textview')
  3299. .with('content-desc', 'A01 a01')
  3300. .with('text', 'A01 a01')
  3301.  
  3302. $ruiObj.click
  3303.  
  3304. waitsecond(2)
  3305. end
  3306.  
  3307. tcase << TestAction.new(:Start_Voice_Call) do
  3308. $ruiObj = RUIObject.new.with('objectid', 921547951).with('selfid', 692509261).with('textdescid', -1496784559).with('uniqueparentid', -1243726177).with('classresourceid', 457622547)
  3309. .with('uitreeindex', 8)
  3310. .with('classname', 'ImageView')
  3311. .with('resource-id', 'com.google.android.contacts:id/icon')
  3312.  
  3313. $ruiObj.click
  3314.  
  3315. waitsecond(8)
  3316. end
  3317.  
  3318. tcase << TestAction.new(:Slave_Answer_Call) do
  3319. sendBTCmd('answerCall')
  3320.  
  3321. waitsecond(2)
  3322. end
  3323.  
  3324. tcase << TestAction.new(:Check_End) do
  3325. $ruiObj = RUIObject.new.with('objectid', 2131066002).with('selfid', 279498384).with('textdescid', -733664719).with('uniqueparentid', 15085754)
  3326. .with('uitreeindex', 3)
  3327. .with('pretext', 'OK')
  3328. .with('classname', 'ImageButton')
  3329. .with('resource-id', 'com.google.android.dialer:id/incall_end_call')
  3330. .with('content-desc', 'End call')
  3331.  
  3332. $ruiObj.isExist
  3333.  
  3334. waitsecond(0)
  3335. end
  3336.  
  3337. tcase << TestAction.new(:LogStop) do
  3338. $myTestResult = checkLastExistResult
  3339.  
  3340. logStopTest("MultiTasking_5_1_8_1")
  3341.  
  3342. waitsecond(0)
  3343. end
  3344.  
  3345. tcase.run(loopTime)
  3346.  
  3347. end
  3348.  
  3349. def self.MultiTasking_5_1_8_2(loopTime)
  3350.  
  3351. tcase = TestCase.new("MultiTasking_5_1_8_2")
  3352.  
  3353. tcase << TestAction.new(:LogStart) do
  3354. logStartTest("MultiTasking_5_1_8_2")
  3355.  
  3356. waitsecond(0)
  3357. end
  3358.  
  3359. tcase << TestAction.new(:goto_Contacts) do
  3360. gotoAppPixel('Contacts')
  3361.  
  3362. waitsecond(5)
  3363. end
  3364.  
  3365. tcase << TestAction.new(:goto_Messages) do
  3366. gotoAppPixel('Messages')
  3367.  
  3368. waitsecond(5)
  3369. end
  3370.  
  3371. tcase << TestAction.new(:goto_Phone) do
  3372. gotoAppPixel('Phone')
  3373.  
  3374. waitsecond(5)
  3375. end
  3376.  
  3377. tcase << TestAction.new(:goto_PlayStore) do
  3378. gotoAppPixel("Play Store")
  3379.  
  3380. waitsecond(5)
  3381. end
  3382.  
  3383. tcase << TestAction.new(:goto_Camera) do
  3384. gotoAppPixel('Camera')
  3385.  
  3386. waitsecond(5)
  3387. end
  3388.  
  3389. tcase << TestAction.new(:goto_Chrome) do
  3390. gotoAppPixel('Chrome')
  3391.  
  3392. waitsecond(5)
  3393. end
  3394.  
  3395. tcase << TestAction.new(:Chrome_Check_Menu) do
  3396. $ruiObj = RUIObject.new.with('objectid', 286278959).with('selfid', -17041368).with('textdescid', 536559428).with('uniqueparentid', -1426174679)
  3397. .with('uitreeindex', 29)
  3398. .with('classname', 'ImageButton')
  3399. .with('resource-id', 'com.android.chrome:id/menu_button')
  3400. .with('content-desc', 'More options')
  3401.  
  3402. $ruiObj.isExist
  3403.  
  3404. waitsecond(0)
  3405. end
  3406.  
  3407. tcase << TestAction.new(:LogStop) do
  3408. $myTestResult = checkLastExistResult
  3409.  
  3410. logStopTest("MultiTasking_5_1_8_2")
  3411.  
  3412. waitsecond(0)
  3413. end
  3414.  
  3415. tcase.run(loopTime)
  3416.  
  3417. end
  3418.  
  3419. def self.MultiTasking_5_1_8_3(loopTime)
  3420.  
  3421. tcase = TestCase.new("MultiTasking_5_1_8_3")
  3422.  
  3423. tcase << TestAction.new(:LogStart) do
  3424. logStartTest("MultiTasking_5_1_8_3")
  3425.  
  3426. waitsecond(0)
  3427. end
  3428.  
  3429. tcase << TestAction.new(:goto_Phone) do
  3430. gotoAppPixel('Phone')
  3431.  
  3432. waitsecond(2)
  3433. end
  3434.  
  3435. tcase << TestAction.new(:Return_Call_Progress) do
  3436. $ruiObj = RUIObject.new.with('objectid', -1049390963).with('selfid', 938939901).with('textdescid', 420774450).with('uniqueparentid', 2054641712).with('classresourceid', -526721384)
  3437. .with('uitreeindex', 5)
  3438. .with('classname', 'TextView')
  3439. .with('resource-id', 'com.android.dialer:id/text')
  3440. .with('text', 'Return to call in progress')
  3441.  
  3442. $ruiObj.click
  3443.  
  3444. waitsecond(2)
  3445. end
  3446.  
  3447. tcase << TestAction.new(:End_Call) do
  3448. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', -2124691094)
  3449. .with('uitreeindex', 13)
  3450. .with('classname', 'ImageButton')
  3451. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  3452. .with('content-desc', 'End call')
  3453.  
  3454. $ruiObj.click
  3455.  
  3456. waitsecond(2)
  3457. end
  3458.  
  3459. tcase << TestAction.new(:Check_Test) do
  3460. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', -2124691094)
  3461. .with('uitreeindex', 13)
  3462. .with('classname', 'ImageButton')
  3463. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  3464. .with('content-desc', 'End call')
  3465.  
  3466. $ruiObj.isExist
  3467.  
  3468. waitsecond(0)
  3469. end
  3470.  
  3471. tcase << TestAction.new(:LogStop) do
  3472. $myTestResult = checkLastExistResult
  3473.  
  3474. logStopTest("MultiTasking_5_1_8_3")
  3475.  
  3476. waitsecond(0)
  3477. end
  3478.  
  3479. tcase.run(loopTime)
  3480.  
  3481. end
  3482.  
  3483. def self.MultiTasking_5_1_8_4(loopTime)
  3484.  
  3485. tcase = TestCase.new("MultiTasking_5_1_8_4")
  3486.  
  3487. tcase << TestAction.new(:LogStart) do
  3488. logStartTest("MultiTasking_5_1_8_4")
  3489.  
  3490. waitsecond(0)
  3491. end
  3492.  
  3493. tcase << TestAction.new(:goto_Chrome) do
  3494. gotoAppPixel('Chrome')
  3495.  
  3496. waitsecond(2)
  3497. end
  3498.  
  3499. tcase << TestAction.new(:Open_Tabs) do
  3500. $ruiObj = RUIObject.new.with('objectid', 1733100788).with('selfid', 1748673363).with('textdescid', -265864838).with('uniqueparentid', 1682079956)
  3501. .with('uitreeindex', 19)
  3502. .with('classname', 'ImageButton')
  3503. .with('resource-id', 'com.android.chrome:id/tab_switcher_button')
  3504.  
  3505. $ruiObj.click
  3506.  
  3507. waitsecond(2)
  3508. end
  3509.  
  3510. tcase << TestAction.new(:New_Tab) do
  3511. $ruiObj = RUIObject.new.with('objectid', -1772071808).with('selfid', 820590808).with('textdescid', 561000469).with('uniqueparentid', 1610570984)
  3512. .with('uitreeindex', 1)
  3513. .with('classname', 'Button')
  3514. .with('resource-id', 'com.android.chrome:id/new_tab_button')
  3515. .with('content-desc', 'New tab')
  3516.  
  3517. $ruiObj.click
  3518.  
  3519. waitsecond(2)
  3520. end
  3521.  
  3522. tcase << TestAction.new(:Chrome_Check_Menu) do
  3523. $ruiObj = RUIObject.new.with('objectid', 286278959).with('selfid', -17041368).with('textdescid', 536559428).with('uniqueparentid', -1426174679)
  3524. .with('uitreeindex', 29)
  3525. .with('classname', 'ImageButton')
  3526. .with('resource-id', 'com.android.chrome:id/menu_button')
  3527. .with('content-desc', 'More options')
  3528.  
  3529. $ruiObj.isExist
  3530.  
  3531. waitsecond(0)
  3532. end
  3533.  
  3534. tcase << TestAction.new(:LogStop) do
  3535. $myTestResult = checkLastExistResult
  3536.  
  3537. logStopTest("MultiTasking_5_1_8_4")
  3538.  
  3539. waitsecond(0)
  3540. end
  3541.  
  3542. tcase.run(loopTime)
  3543.  
  3544. end
  3545.  
  3546. def self.MultiTasking_5_1_8_5(loopTime)
  3547.  
  3548. tcase = TestCase.new("MultiTasking_5_1_8_5")
  3549.  
  3550. tcase << TestAction.new(:LogStart) do
  3551. logStartTest("MultiTasking_5_1_8_5")
  3552.  
  3553. waitsecond(0)
  3554. end
  3555.  
  3556. tcase << TestAction.new(:goto_Contacts) do
  3557. gotoAppPixel('Contacts')
  3558.  
  3559. waitsecond(5)
  3560. end
  3561.  
  3562. tcase << TestAction.new(:goto_Messages) do
  3563. gotoAppPixel('Messages')
  3564.  
  3565. waitsecond(5)
  3566. end
  3567.  
  3568. tcase << TestAction.new(:goto_Phone) do
  3569. gotoAppPixel('Phone')
  3570.  
  3571. waitsecond(5)
  3572. end
  3573.  
  3574. tcase << TestAction.new(:goto_PlayStore) do
  3575. gotoAppPixel("Play Store")
  3576.  
  3577. waitsecond(5)
  3578. end
  3579.  
  3580. tcase << TestAction.new(:goto_Camera) do
  3581. gotoAppPixel('Camera')
  3582.  
  3583. waitsecond(5)
  3584. end
  3585.  
  3586. tcase << TestAction.new(:goto_Chrome) do
  3587. gotoAppPixel('Chrome')
  3588.  
  3589. waitsecond(5)
  3590. end
  3591.  
  3592. tcase << TestAction.new(:Chrome_Check_Menu) do
  3593. $ruiObj = RUIObject.new.with('objectid', 286278959).with('selfid', -17041368).with('textdescid', 536559428).with('uniqueparentid', -1426174679)
  3594. .with('uitreeindex', 29)
  3595. .with('classname', 'ImageButton')
  3596. .with('resource-id', 'com.android.chrome:id/menu_button')
  3597. .with('content-desc', 'More options')
  3598.  
  3599. $ruiObj.isExist
  3600.  
  3601. waitsecond(2)
  3602. end
  3603.  
  3604. tcase << TestAction.new(:LogStop) do
  3605. $myTestResult = checkLastExistResult
  3606.  
  3607. logStopTest("MultiTasking_5_1_8_5")
  3608.  
  3609. waitsecond(0)
  3610. end
  3611.  
  3612. tcase.run(loopTime)
  3613.  
  3614. end
  3615.  
  3616. def self.MultiTasking_5_1_8_6(loopTime)
  3617.  
  3618. tcase = TestCase.new("MultiTasking_5_1_8_6")
  3619.  
  3620. tcase << TestAction.new(:LogStart) do
  3621. logStartTest("MultiTasking_5_1_8_6")
  3622.  
  3623. waitsecond(0)
  3624. end
  3625.  
  3626. tcase << TestAction.new(:Press_Back) do
  3627. pressBack
  3628.  
  3629. waitsecond(2)
  3630. end
  3631.  
  3632. tcase << TestAction.new(:Press_Back_1) do
  3633. pressBack
  3634.  
  3635. waitsecond(2)
  3636. end
  3637.  
  3638. tcase << TestAction.new(:Home_Check) do
  3639. $ruiObj = RUIObject.new.with('objectid', 1308040668).with('selfid', 1900891271).with('textdescid', 1801250344).with('uniqueparentid', 125426211)
  3640. .with('uitreeindex', 7)
  3641. .with('classname', 'ImageView')
  3642. .with('resource-id', 'com.google.android.apps.nexuslauncher:id/all_apps_handle')
  3643. .with('content-desc', 'Apps list')
  3644.  
  3645. $ruiObj.isExist
  3646.  
  3647. waitsecond(0)
  3648. end
  3649.  
  3650. tcase << TestAction.new(:LogStop) do
  3651. $myTestResult = checkLastExistResult
  3652.  
  3653. logStopTest("MultiTasking_5_1_8_6")
  3654.  
  3655. waitsecond(0)
  3656. end
  3657.  
  3658. tcase.run(loopTime)
  3659.  
  3660. end
  3661.  
  3662. def self.Multimedia_5_1_7_1(loopTime)
  3663.  
  3664. tcase = TestCase.new("Multimedia_5_1_7_1")
  3665.  
  3666. tcase << TestAction.new(:logstart) do
  3667. logStartTest("05_01_07_01_MultiMedia")
  3668.  
  3669. waitsecond(0)
  3670. end
  3671.  
  3672. tcase << TestAction.new(:scriptAction_2) do
  3673. gotoAppPixel("Camera")
  3674.  
  3675. waitsecond(2)
  3676. end
  3677.  
  3678. tcase << TestAction.new(:PermissionAllowButton) do
  3679. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  3680. .with('uitreeindex', 3)
  3681. .with('classname', 'Button')
  3682. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  3683. .with('text', 'ALLOW')
  3684.  
  3685. $ruiObj.click
  3686.  
  3687. waitsecond(2)
  3688. end
  3689.  
  3690. tcase << TestAction.new(:Button_ConfirmButton_2) do
  3691. $ruiObj = RUIObject.new.with('objectid', -1187921382).with('selfid', -1055162259).with('textdescid', 1673606663).with('uniqueparentid', -1678803509)
  3692. .with('uitreeindex', 3)
  3693. .with('classname', 'Button')
  3694. .with('resource-id', 'com.android.camera2:id/confirm_button')
  3695. .with('text', 'NEXT')
  3696.  
  3697. $ruiObj.click
  3698.  
  3699. waitsecond(2)
  3700. end
  3701.  
  3702. tcase << TestAction.new(:allowpermission) do
  3703. $ruiObj = RUIObject.new.with('objectid', 1275766412).with('selfid', -1672772069).with('textdescid', -1293741455).with('uniqueparentid', -759816146)
  3704. .with('uitreeindex', 3)
  3705. .with('classname', 'Button')
  3706. .with('resource-id', 'com.google.android.GoogleCamera:id/ok_button')
  3707. .with('text', 'OK GOT IT')
  3708.  
  3709. $ruiObj.click
  3710.  
  3711. waitsecond(2)
  3712. end
  3713.  
  3714. tcase << TestAction.new(:swipeLeft_4) do
  3715. swipe_horizontal_back 50
  3716.  
  3717. waitsecond(2)
  3718. end
  3719.  
  3720. tcase << TestAction.new(:Videomode) do
  3721. $ruiObj = RUIObject.new.with('objectid', -1418579728).with('selfid', 361169431).with('textdescid', -1051676587).with('uniqueparentid', -725233796)
  3722. .with('uitreeindex', 9)
  3723. .with('classname', 'TextView')
  3724. .with('resource-id', 'com.android.camera2:id/selector_text')
  3725. .with('text', 'Video')
  3726.  
  3727. $ruiObj.click
  3728.  
  3729. waitsecond(2)
  3730. end
  3731.  
  3732. tcase << TestAction.new(:ChangetoVideomode) do
  3733. $ruiObj = RUIObject.new.with('objectid', -733699829).with('selfid', -2081355986).with('textdescid', -1269858187).with('uniqueparentid', 1962624833)
  3734. .with('uitreeindex', 17)
  3735. .with('classname', 'ImageView')
  3736. .with('resource-id', 'com.google.android.GoogleCamera:id/smooth_rotate_video_switch_icon')
  3737.  
  3738. $ruiObj.click
  3739.  
  3740. waitsecond(3)
  3741. end
  3742.  
  3743. tcase << TestAction.new(:recordvideo) do
  3744. $ruiObj = RUIObject.new.with('objectid', -1444537032).with('selfid', 111453042).with('textdescid', 1162006437).with('uniqueparentid', -1154361882)
  3745. .with('uitreeindex', 5)
  3746. .with('classname', 'ImageView')
  3747. .with('resource-id', 'com.android.camera2:id/shutter_button')
  3748. .with('content-desc', 'Shutter')
  3749.  
  3750. $ruiObj.click
  3751.  
  3752. waitsecond(2)
  3753. end
  3754.  
  3755. tcase << TestAction.new(:wait30seconds) do
  3756. waitsecond(32)
  3757. end
  3758.  
  3759. tcase << TestAction.new(:checkforthepausebutton) do
  3760. $ruiObj = RUIObject.new.with('objectid', -1444537032).with('selfid', 111453042).with('textdescid', 1162006437).with('uniqueparentid', -1154361882)
  3761. .with('uitreeindex', 5)
  3762. .with('classname', 'ImageView')
  3763. .with('resource-id', 'com.android.camera2:id/shutter_button')
  3764. .with('content-desc', 'Shutter')
  3765.  
  3766. $ruiObj.isExist
  3767.  
  3768. waitsecond(0)
  3769. end
  3770.  
  3771. tcase << TestAction.new(:stoprecord) do
  3772. $ruiObj = RUIObject.new.with('objectid', -1444537032).with('selfid', 111453042).with('textdescid', 1162006437).with('uniqueparentid', -1154361882)
  3773. .with('uitreeindex', 5)
  3774. .with('classname', 'ImageView')
  3775. .with('resource-id', 'com.android.camera2:id/shutter_button')
  3776. .with('content-desc', 'Shutter')
  3777.  
  3778. $ruiObj.click
  3779.  
  3780. waitsecond(2)
  3781. end
  3782.  
  3783. tcase << TestAction.new(:logstop) do
  3784. $myTestResult = checkLastExistResult
  3785.  
  3786. if $myTestResult == false
  3787. $myFailReason == "Video does not exist"
  3788. end
  3789.  
  3790. logStopTest("05_01_07_01_MultiMedia")
  3791.  
  3792.  
  3793. waitsecond(0)
  3794. end
  3795.  
  3796. tcase << TestAction.new(:pressBack) do
  3797. pressBack
  3798.  
  3799. waitsecond(0)
  3800. end
  3801.  
  3802. tcase << TestAction.new(:pressHome) do
  3803. pressBack
  3804.  
  3805.  
  3806. waitsecond(0)
  3807. end
  3808.  
  3809. tcase.run(loopTime)
  3810.  
  3811. end
  3812.  
  3813. def self.Multimedia_5_1_7_10(loopTime)
  3814.  
  3815. tcase = TestCase.new("Multimedia_5_1_7_10")
  3816.  
  3817. tcase << TestAction.new(:logstart) do
  3818. logStartTest("05_01_07_10_MultiMedia")
  3819.  
  3820. waitsecond(0)
  3821. end
  3822.  
  3823. tcase << TestAction.new(:scriptAction_2) do
  3824. gotoAppPixel("Chrome")
  3825.  
  3826. waitsecond(2)
  3827. end
  3828.  
  3829. tcase << TestAction.new(:ClickAccept) do
  3830. $ruiObj = RUIObject.new.with('objectid', 1131623741).with('selfid', 2073999009).with('textdescid', -212510162).with('uniqueparentid', -1930936534)
  3831. .with('uitreeindex', 4)
  3832. .with('classname', 'Button')
  3833. .with('resource-id', 'com.android.chrome:id/terms_accept')
  3834. .with('text', 'ACCEPT CONTINUE')
  3835.  
  3836. $ruiObj.click
  3837.  
  3838. waitsecond(2)
  3839. end
  3840.  
  3841. tcase << TestAction.new(:Clicknothanks) do
  3842. $ruiObj = RUIObject.new.with('objectid', -1069290294).with('selfid', 1665543358).with('textdescid', 14199854).with('uniqueparentid', -972892335)
  3843. .with('uitreeindex', 8)
  3844. .with('classname', 'Button')
  3845. .with('resource-id', 'com.android.chrome:id/negative_button')
  3846. .with('text', 'NO THANKS')
  3847.  
  3848. $ruiObj.click
  3849.  
  3850. waitsecond(2)
  3851. end
  3852.  
  3853. tcase << TestAction.new(:EditText_SearchBoxText_7) do
  3854. $ruiObj = RUIObject.new.with('objectid', -740560065).with('selfid', 1023920737).with('textdescid', -1482525503).with('uniqueparentid', -1010905038)
  3855. .with('uitreeindex', 0)
  3856. .with('classname', 'EditText')
  3857. .with('resource-id', 'com.android.chrome:id/search_box_text')
  3858.  
  3859. $ruiObj.inputtext('www.youtube.com')
  3860.  
  3861. waitsecond(2)
  3862. end
  3863.  
  3864. tcase << TestAction.new(:pressEnter_8) do
  3865. pressEnter
  3866.  
  3867. waitsecond(2)
  3868. end
  3869.  
  3870. tcase << TestAction.new(:wait15second_9) do
  3871. waitsecond(15)
  3872. end
  3873.  
  3874. tcase << TestAction.new(:Clickfirstvideo) do
  3875. click(724.5,1048.5)
  3876.  
  3877. waitsecond(6)
  3878. end
  3879.  
  3880. tcase << TestAction.new(:sharebuttonexist) do
  3881. $ruiObj = RUIObject.new.with('objectid', 537483260).with('selfid', -349777709).with('textdescid', 367962075).with('uniqueparentid', 1517455945)
  3882. .with('uitreeindex', 15)
  3883. .with('classname', 'Button')
  3884. .with('content-desc', 'Share')
  3885.  
  3886. $ruiObj.isExist
  3887.  
  3888. waitsecond(0)
  3889. end
  3890.  
  3891. tcase << TestAction.new(:logstop) do
  3892. $myTestResult = checkLastExistResult
  3893. if $myTestResult == false
  3894. $myFailReason == "Video Streaming does not work"
  3895. end
  3896. logStopTest("05_01_07_10_MultiMedia")
  3897.  
  3898.  
  3899. waitsecond(0)
  3900. end
  3901.  
  3902. tcase << TestAction.new(:pressBack_13) do
  3903. pressBack
  3904.  
  3905. waitsecond(0)
  3906. end
  3907.  
  3908. tcase << TestAction.new(:pressBack_14) do
  3909. pressBack
  3910.  
  3911. waitsecond(0)
  3912. end
  3913.  
  3914. tcase << TestAction.new(:pressBack_15) do
  3915. pressBack
  3916.  
  3917. waitsecond(0)
  3918. end
  3919.  
  3920. tcase << TestAction.new(:pressHome_16) do
  3921. pressHome
  3922.  
  3923. waitsecond(0)
  3924. end
  3925.  
  3926. tcase.run(loopTime)
  3927.  
  3928. end
  3929.  
  3930. def self.Multimedia_5_1_7_11(loopTime)
  3931.  
  3932. tcase = TestCase.new("Multimedia_5_1_7_11")
  3933.  
  3934. tcase << TestAction.new(:logstart) do
  3935. logStartTest("05_01_07_11_MultiMedia")
  3936.  
  3937. waitsecond(0)
  3938. end
  3939.  
  3940. tcase << TestAction.new(:scriptAction_2) do
  3941. gotoAppPixel("Play Music")
  3942.  
  3943. waitsecond(5)
  3944. end
  3945.  
  3946. tcase << TestAction.new(:Button_BtnDecline_4) do
  3947. $ruiObj = RUIObject.new.with('objectid', -1378300942).with('selfid', -1214082401).with('textdescid', -2120989690).with('uniqueparentid', -1218539231)
  3948. .with('uitreeindex', 12)
  3949. .with('classname', 'Button')
  3950. .with('resource-id', 'com.google.android.music:id/btn_decline')
  3951. .with('text', 'NO THANKS')
  3952.  
  3953. $ruiObj.click
  3954.  
  3955. waitsecond(2)
  3956. end
  3957.  
  3958. tcase << TestAction.new(:Button_Button0_2_1) do
  3959. $ruiObj = RUIObject.new.with('objectid', 1772672623).with('selfid', 1844568236).with('textdescid', 743697808).with('uniqueparentid', -1971983066)
  3960. .with('uitreeindex', 4)
  3961. .with('classname', 'Button')
  3962. .with('resource-id', 'com.google.android.music:id/button_0')
  3963. .with('text', 'SKIP')
  3964.  
  3965. $ruiObj.click
  3966.  
  3967. waitsecond(2)
  3968. end
  3969.  
  3970. tcase << TestAction.new(:ImageView_NavigationButton_6) do
  3971. $ruiObj = RUIObject.new.with('objectid', -1390467816).with('selfid', -959574335).with('textdescid', 2119483842).with('uniqueparentid', 672315111)
  3972. .with('uitreeindex', 0)
  3973. .with('classname', 'ImageView')
  3974. .with('resource-id', 'com.google.android.music:id/navigation_button')
  3975. .with('content-desc', 'Show navigation drawer')
  3976.  
  3977. $ruiObj.isExist
  3978.  
  3979. waitsecond(2)
  3980. end
  3981.  
  3982. tcase << TestAction.new(:logstop) do
  3983. $myTestResult = checkLastExistResult
  3984.  
  3985. if $myTestResult == false
  3986. $myFailReason == "Video Streaming does not work"
  3987. end
  3988. logStopTest("05_01_07_11_MultiMedia")
  3989.  
  3990.  
  3991. waitsecond(0)
  3992. end
  3993.  
  3994. tcase << TestAction.new(:pressBack_9) do
  3995. pressBack
  3996.  
  3997. waitsecond(0)
  3998. end
  3999.  
  4000. tcase << TestAction.new(:pressBack_10) do
  4001. pressBack
  4002.  
  4003. waitsecond(0)
  4004. end
  4005.  
  4006. tcase << TestAction.new(:pressHome_11) do
  4007. pressHome
  4008.  
  4009. waitsecond(0)
  4010. end
  4011.  
  4012. tcase << TestAction.new(:ImageButton_Show_1) do
  4013. $ruiObj = RUIObject.new.with('objectid', -16821482).with('selfid', -167844295).with('textdescid', 296856964).with('uniqueparentid', 1467430507)
  4014. .with('uitreeindex', 6)
  4015. .with('classname', 'ImageButton')
  4016. .with('content-desc', 'Show navigation drawer')
  4017.  
  4018. $ruiObj.click
  4019.  
  4020. waitsecond(2)
  4021. end
  4022.  
  4023. tcase.run(loopTime)
  4024.  
  4025. end
  4026.  
  4027. def self.Multimedia_5_1_7_12(loopTime)
  4028.  
  4029. tcase = TestCase.new("Multimedia_5_1_7_12")
  4030.  
  4031. tcase << TestAction.new(:logstart) do
  4032. logStartTest("05_01_07_12_MultiMedia")
  4033.  
  4034. waitsecond(0)
  4035. end
  4036.  
  4037. tcase << TestAction.new(:gotoplaymusic) do
  4038. gotoAppPixel("Play Music")
  4039.  
  4040. waitsecond(2)
  4041. end
  4042.  
  4043. tcase << TestAction.new(:Button_BtnDecline_4) do
  4044. $ruiObj = RUIObject.new.with('objectid', -1378300942).with('selfid', -1214082401).with('textdescid', -2120989690).with('uniqueparentid', -1218539231)
  4045. .with('uitreeindex', 12)
  4046. .with('classname', 'Button')
  4047. .with('resource-id', 'com.google.android.music:id/btn_decline')
  4048. .with('text', 'NO THANKS')
  4049.  
  4050. $ruiObj.click
  4051.  
  4052. waitsecond(2)
  4053. end
  4054.  
  4055. tcase << TestAction.new(:clicknavigationdrawer) do
  4056. $ruiObj = RUIObject.new.with('objectid', -1390467816).with('selfid', -959574335).with('textdescid', 2119483842).with('uniqueparentid', 672315111)
  4057. .with('uitreeindex', 0)
  4058. .with('classname', 'ImageView')
  4059. .with('resource-id', 'com.google.android.music:id/navigation_button')
  4060. .with('content-desc', 'Show navigation drawer')
  4061.  
  4062. $ruiObj.click
  4063.  
  4064. waitsecond(2)
  4065. end
  4066.  
  4067. tcase << TestAction.new(:musiclibrary) do
  4068. $ruiObj = RUIObject.new.with('objectid', 1337918942).with('selfid', -404350322).with('textdescid', -1209707262).with('uniqueparentid', 1865643829).with('classresourceid', -938935918)
  4069. .with('uitreeindex', 34)
  4070. .with('classname', 'TextView')
  4071. .with('text', 'Music library')
  4072.  
  4073. $ruiObj.click
  4074.  
  4075. waitsecond(2)
  4076. end
  4077.  
  4078. tcase << TestAction.new(:artist) do
  4079. $ruiObj = RUIObject.new.with('objectid', -741226326).with('selfid', -2050395810).with('textdescid', -294625686).with('uniqueparentid', -1232442324)
  4080. .with('uitreeindex', 5)
  4081. .with('classname', 'TextView')
  4082. .with('resource-id', 'com.google.android.music:id/title')
  4083. .with('text', 'ARTISTS')
  4084.  
  4085. $ruiObj.click
  4086.  
  4087. waitsecond(2)
  4088. end
  4089.  
  4090. tcase << TestAction.new(:clickthumbnail) do
  4091. $ruiObj = RUIObject.new.with('objectid', -146398081).with('selfid', -538001520).with('textdescid', -243373183).with('uniqueparentid', 1810546890).with('classresourceid', -1418125814)
  4092. .with('uitreeindex', 9)
  4093. .with('pretext', 'GENRES')
  4094. .with('classname', 'ImageView')
  4095. .with('resource-id', 'com.google.android.music:id/li_thumbnail_frame')
  4096.  
  4097. $ruiObj.click
  4098.  
  4099. waitsecond(2)
  4100. end
  4101.  
  4102. tcase << TestAction.new(:clickanotherthumnail) do
  4103. $ruiObj = RUIObject.new.with('objectid', 585237187).with('selfid', -538001520).with('textdescid', 962483645).with('uniqueparentid', 484936402)
  4104. .with('uitreeindex', 7)
  4105. .with('pretext', 'In my library')
  4106. .with('classname', 'ImageView')
  4107. .with('resource-id', 'com.google.android.music:id/li_thumbnail_frame')
  4108.  
  4109. $ruiObj.click
  4110.  
  4111. waitsecond(3)
  4112. end
  4113.  
  4114. tcase << TestAction.new(:clickplay) do
  4115. $ruiObj = RUIObject.new.with('objectid', 1267180639).with('selfid', -562829957).with('textdescid', -145594059).with('uniqueparentid', -1431364792).with('classresourceid', 554110641)
  4116. .with('uitreeindex', 8)
  4117. .with('classname', 'ImageButton')
  4118. .with('resource-id', 'com.google.android.music:id/fab_play')
  4119. .with('content-desc', 'Play')
  4120.  
  4121. $ruiObj.click
  4122.  
  4123. waitsecond(2)
  4124. end
  4125.  
  4126. tcase << TestAction.new(:wait12second_8) do
  4127. waitsecond(12)
  4128. end
  4129.  
  4130. tcase << TestAction.new(:pausebuttonexist) do
  4131. $ruiObj = RUIObject.new.with('objectid', 1487562708).with('selfid', 2054656518).with('textdescid', -1874588662).with('uniqueparentid', -317697394)
  4132. .with('uitreeindex', 34)
  4133. .with('classname', 'ImageButton')
  4134. .with('resource-id', 'com.google.android.music:id/play_pause_header')
  4135. .with('content-desc', 'Pause')
  4136.  
  4137. $ruiObj.isExist
  4138.  
  4139. waitsecond(2)
  4140. end
  4141.  
  4142. tcase << TestAction.new(:clickpausebutton) do
  4143. $ruiObj = RUIObject.new.with('objectid', 1487562708).with('selfid', 2054656518).with('textdescid', -1874588662).with('uniqueparentid', -317697394)
  4144. .with('uitreeindex', 34)
  4145. .with('classname', 'ImageButton')
  4146. .with('resource-id', 'com.google.android.music:id/play_pause_header')
  4147. .with('content-desc', 'Pause')
  4148.  
  4149. $ruiObj.click
  4150.  
  4151. waitsecond(3)
  4152. end
  4153.  
  4154. tcase << TestAction.new(:logstop) do
  4155. $myTestResult = checkLastExistResult
  4156.  
  4157. if $myTestResult == false
  4158. $myFailReason == "Music is not playing"
  4159. end
  4160. logStopTest("05_01_07_12_MultiMedia")
  4161.  
  4162.  
  4163. waitsecond(0)
  4164. end
  4165.  
  4166. tcase << TestAction.new(:goback) do
  4167. $ruiObj = RUIObject.new.with('objectid', -16821482).with('selfid', -123872605).with('textdescid', -2129880704).with('uniqueparentid', -272094647)
  4168. .with('uitreeindex', 0)
  4169. .with('classname', 'ImageButton')
  4170. .with('content-desc', 'Navigate up')
  4171.  
  4172. $ruiObj.click
  4173.  
  4174. waitsecond(2)
  4175. end
  4176.  
  4177. tcase << TestAction.new(:goback_1) do
  4178. $ruiObj = RUIObject.new.with('objectid', -16821482).with('selfid', -123872605).with('textdescid', -2129880704).with('uniqueparentid', -272094647)
  4179. .with('uitreeindex', 0)
  4180. .with('classname', 'ImageButton')
  4181. .with('content-desc', 'Navigate up')
  4182.  
  4183. $ruiObj.click
  4184.  
  4185. waitsecond(2)
  4186. end
  4187.  
  4188. tcase << TestAction.new(:gotomenunav) do
  4189. $ruiObj = RUIObject.new.with('objectid', -16821482).with('selfid', -167844295).with('textdescid', 296856964).with('uniqueparentid', 1467430507)
  4190. .with('uitreeindex', 6)
  4191. .with('classname', 'ImageButton')
  4192. .with('content-desc', 'Show navigation drawer')
  4193.  
  4194. $ruiObj.click
  4195.  
  4196. waitsecond(2)
  4197. end
  4198.  
  4199. tcase << TestAction.new(:gotohome) do
  4200. $ruiObj = RUIObject.new.with('objectid', 1337918942).with('selfid', 591713361).with('textdescid', -569085377).with('uniqueparentid', 1865643829).with('classresourceid', -938935918)
  4201. .with('uitreeindex', 27)
  4202. .with('classname', 'TextView')
  4203. .with('text', 'Home')
  4204.  
  4205. $ruiObj.click
  4206.  
  4207. waitsecond(2)
  4208. end
  4209.  
  4210. tcase << TestAction.new(:pressBack_9) do
  4211. pressBack
  4212.  
  4213. waitsecond(0)
  4214. end
  4215.  
  4216. tcase << TestAction.new(:pressBack_10) do
  4217. pressBack
  4218.  
  4219. waitsecond(0)
  4220. end
  4221.  
  4222. tcase << TestAction.new(:pressHome_11) do
  4223. pressHome
  4224.  
  4225. waitsecond(0)
  4226. end
  4227.  
  4228. tcase << TestAction.new(:swipenotificationbar) do
  4229. swipe(729,31.5,774,1500.5,100)
  4230.  
  4231. waitsecond(2)
  4232. end
  4233.  
  4234. tcase << TestAction.new(:swiperight) do
  4235. swipe(1102.5,679,100,679.5,100)
  4236.  
  4237. waitsecond(2)
  4238. end
  4239.  
  4240. tcase << TestAction.new(:pressHome_1) do
  4241. pressHome
  4242.  
  4243. waitsecond(2)
  4244. end
  4245.  
  4246. tcase.run(loopTime)
  4247.  
  4248. end
  4249.  
  4250. def self.Multimedia_5_1_7_13(loopTime)
  4251.  
  4252. tcase = TestCase.new("Multimedia_5_1_7_13")
  4253.  
  4254. tcase << TestAction.new(:logstart) do
  4255. logStartTest("05_01_07_13_MultiMedia")
  4256.  
  4257. waitsecond(0)
  4258. end
  4259.  
  4260. tcase << TestAction.new(:gotoplaymusic) do
  4261. gotoAppPixel("Play Music")
  4262.  
  4263. waitsecond(2)
  4264. end
  4265.  
  4266. tcase << TestAction.new(:Button_BtnDecline_4) do
  4267. $ruiObj = RUIObject.new.with('objectid', -1378300942).with('selfid', -1214082401).with('textdescid', -2120989690).with('uniqueparentid', -1218539231)
  4268. .with('uitreeindex', 12)
  4269. .with('classname', 'Button')
  4270. .with('resource-id', 'com.google.android.music:id/btn_decline')
  4271. .with('text', 'NO THANKS')
  4272.  
  4273. $ruiObj.click
  4274.  
  4275. waitsecond(2)
  4276. end
  4277.  
  4278. tcase << TestAction.new(:pressBack_9) do
  4279. pressBack
  4280.  
  4281. waitsecond(0)
  4282. end
  4283.  
  4284. tcase << TestAction.new(:pressBack_10) do
  4285. pressBack
  4286.  
  4287. waitsecond(0)
  4288. end
  4289.  
  4290. tcase << TestAction.new(:pressHome_11) do
  4291. pressHome
  4292.  
  4293. waitsecond(0)
  4294. end
  4295.  
  4296. tcase << TestAction.new(:swipenotificationbar) do
  4297. swipe(729,31.5,774,1500.5,100)
  4298.  
  4299. waitsecond(2)
  4300. end
  4301.  
  4302. tcase << TestAction.new(:pause) do
  4303. $ruiObj = RUIObject.new.with('objectid', 882076620).with('selfid', -1186380024).with('textdescid', -490366974).with('uniqueparentid', 1841961189).with('classresourceid', -343477762)
  4304. .with('uitreeindex', 18)
  4305. .with('classname', 'ImageButton')
  4306. .with('resource-id', 'android:id/action0')
  4307. .with('content-desc', 'Pause')
  4308.  
  4309. $ruiObj.isExist
  4310.  
  4311. waitsecond(3)
  4312. end
  4313.  
  4314. tcase << TestAction.new(:logstop_1) do
  4315. $myTestResult = !checkLastExistResult
  4316.  
  4317. if $myTestResult == false
  4318. $myFailReason == "Music is not closing."
  4319. end
  4320. logStopTest("05_01_07_13_MultiMedia")
  4321.  
  4322.  
  4323. waitsecond(0)
  4324. end
  4325.  
  4326. tcase << TestAction.new(:pressHome_1) do
  4327. pressHome
  4328.  
  4329. waitsecond(2)
  4330. end
  4331.  
  4332. tcase.run(loopTime)
  4333.  
  4334. end
  4335.  
  4336. def self.Multimedia_5_1_7_14(loopTime)
  4337.  
  4338. tcase = TestCase.new("Multimedia_5_1_7_14")
  4339.  
  4340. tcase << TestAction.new(:logstart) do
  4341. logStartTest("05_01_07_14_MultiMedia")
  4342.  
  4343. waitsecond(0)
  4344. end
  4345.  
  4346. tcase << TestAction.new(:gotosettings) do
  4347. gotoAppPixel("Settings")
  4348.  
  4349. waitsecond(2)
  4350. end
  4351.  
  4352. tcase << TestAction.new(:clickdisplay) do
  4353. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', -1901343455).with('textdescid', 1460376455).with('uniqueparentid', -349226723)
  4354. .with('uitreeindex', 22)
  4355. .with('classname', 'TextView')
  4356. .with('resource-id', 'android:id/title')
  4357. .with('text', 'Display')
  4358.  
  4359. $ruiObj.click
  4360.  
  4361. waitsecond(2)
  4362. end
  4363.  
  4364. tcase << TestAction.new(:advancedSettings) do
  4365. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', 183975843).with('textdescid', -1659217645).with('uniqueparentid', -512886282)
  4366. .with('uitreeindex', 13)
  4367. .with('classname', 'TextView')
  4368. .with('resource-id', 'android:id/title')
  4369. .with('text', 'Advanced')
  4370.  
  4371. $ruiObj.click
  4372.  
  4373. waitsecond(2)
  4374. end
  4375.  
  4376. tcase << TestAction.new(:swipeDown_6) do
  4377. swipe_vertical 500
  4378.  
  4379. waitsecond(2)
  4380. end
  4381.  
  4382. tcase << TestAction.new(:clicktheme) do
  4383. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', 80297600).with('textdescid', 722414294).with('uniqueparentid', 818307449)
  4384. .with('uitreeindex', 20)
  4385. .with('classname', 'TextView')
  4386. .with('resource-id', 'android:id/title')
  4387. .with('text', 'Device theme')
  4388.  
  4389. $ruiObj.click
  4390.  
  4391. waitsecond(2)
  4392. end
  4393.  
  4394. tcase << TestAction.new(:changetodark) do
  4395. $ruiObj = RUIObject.new.with('objectid', 374337900).with('selfid', -102657974).with('textdescid', 679433110).with('uniqueparentid', -290305997).with('classresourceid', 2074814108)
  4396. .with('uitreeindex', 4)
  4397. .with('classname', 'CheckedTextView')
  4398. .with('resource-id', 'android:id/text1')
  4399. .with('text', 'Dark')
  4400.  
  4401. $ruiObj.click
  4402.  
  4403. waitsecond(2)
  4404. end
  4405.  
  4406. tcase << TestAction.new(:clicktheme_1) do
  4407. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', 80297600).with('textdescid', 722414294).with('uniqueparentid', 818307449)
  4408. .with('uitreeindex', 20)
  4409. .with('classname', 'TextView')
  4410. .with('resource-id', 'android:id/title')
  4411. .with('text', 'Device theme')
  4412.  
  4413. $ruiObj.click
  4414.  
  4415. waitsecond(2)
  4416. end
  4417.  
  4418. tcase << TestAction.new(:changetoinverted) do
  4419. $ruiObj = RUIObject.new.with('objectid', 374337900).with('selfid', -797465143).with('textdescid', 1689955831).with('uniqueparentid', -290305997).with('classresourceid', 2074814108)
  4420. .with('uitreeindex', 3)
  4421. .with('classname', 'CheckedTextView')
  4422. .with('resource-id', 'android:id/text1')
  4423. .with('text', 'Inverted')
  4424.  
  4425. $ruiObj.click
  4426.  
  4427. waitsecond(2)
  4428. end
  4429.  
  4430. tcase << TestAction.new(:clicktheme_2) do
  4431. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', 80297600).with('textdescid', 722414294).with('uniqueparentid', 1677638763)
  4432. .with('uitreeindex', 20)
  4433. .with('classname', 'TextView')
  4434. .with('resource-id', 'android:id/title')
  4435. .with('text', 'Device theme')
  4436.  
  4437. $ruiObj.click
  4438.  
  4439. waitsecond(2)
  4440. end
  4441.  
  4442. tcase << TestAction.new(:clickPixel) do
  4443. $ruiObj = RUIObject.new.with('objectid', 374337900).with('selfid', 1123896370).with('textdescid', -61296722).with('uniqueparentid', -290305997).with('classresourceid', 2074814108)
  4444. .with('uitreeindex', 2)
  4445. .with('classname', 'CheckedTextView')
  4446. .with('resource-id', 'android:id/text1')
  4447. .with('text', 'Pixel')
  4448.  
  4449. $ruiObj.click
  4450.  
  4451. waitsecond(2)
  4452. end
  4453.  
  4454. tcase << TestAction.new(:Displayisexist) do
  4455. $ruiObj = RUIObject.new.with('objectid', 765775369).with('selfid', 1766108176).with('textdescid', 937308149).with('uniqueparentid', 1015447283)
  4456. .with('uitreeindex', 1)
  4457. .with('classname', 'TextView')
  4458. .with('text', 'Display')
  4459.  
  4460. $ruiObj.isExist
  4461.  
  4462. waitsecond(2)
  4463. end
  4464.  
  4465. tcase << TestAction.new(:logstop) do
  4466. $myTestResult = checkLastExistResult
  4467.  
  4468. if $myTestResult == false
  4469. $myFailReason == "Theme change not working"
  4470. end
  4471. logStopTest("05_01_07_14_MultiMedia")
  4472.  
  4473.  
  4474. waitsecond(0)
  4475. end
  4476.  
  4477. tcase << TestAction.new(:pressBack_19) do
  4478. pressBack
  4479.  
  4480. waitsecond(0)
  4481. end
  4482.  
  4483. tcase << TestAction.new(:pressBack_20) do
  4484. pressBack
  4485.  
  4486. waitsecond(0)
  4487. end
  4488.  
  4489. tcase << TestAction.new(:pressHome_22) do
  4490. pressHome
  4491.  
  4492. waitsecond(0)
  4493. end
  4494.  
  4495. tcase.run(loopTime)
  4496.  
  4497. end
  4498.  
  4499. def self.Multimedia_5_1_7_2(loopTime)
  4500.  
  4501. tcase = TestCase.new("Multimedia_5_1_7_2")
  4502.  
  4503. tcase << TestAction.new(:logstart) do
  4504. logStartTest("05_01_07_02_MultiMedia")
  4505.  
  4506. waitsecond(0)
  4507. end
  4508.  
  4509. tcase << TestAction.new(:gotophotos) do
  4510. gotoAppPixel("Photos")
  4511.  
  4512. waitsecond(2)
  4513. end
  4514.  
  4515. tcase << TestAction.new(:Switch_AutoBackupSwitch_2) do
  4516. $ruiObj = RUIObject.new.with('objectid', 1900129037).with('selfid', 1682285764).with('textdescid', 1396382350).with('uniqueparentid', -1851031688).with('classresourceid', -402277641)
  4517. .with('uitreeindex', 2)
  4518. .with('classname', 'Switch')
  4519. .with('resource-id', 'com.google.android.apps.photos:id/auto_backup_switch')
  4520. .with('text', 'ON')
  4521.  
  4522. $ruiObj.click
  4523.  
  4524. waitsecond(2)
  4525. end
  4526.  
  4527. tcase << TestAction.new(:Button_DoneButton_7) do
  4528. $ruiObj = RUIObject.new.with('objectid', 1857204703).with('selfid', -544460817).with('textdescid', -1623853219).with('uniqueparentid', -1190962124)
  4529. .with('uitreeindex', 9)
  4530. .with('classname', 'Button')
  4531. .with('resource-id', 'com.google.android.apps.photos:id/done_button')
  4532. .with('text', 'DONE')
  4533.  
  4534. $ruiObj.click
  4535.  
  4536. waitsecond(2)
  4537. end
  4538.  
  4539. tcase << TestAction.new(:Keepoff) do
  4540. $ruiObj = RUIObject.new.with('objectid', -767191036).with('selfid', 780820477).with('textdescid', 1663022928).with('uniqueparentid', -1776182139).with('classresourceid', 1834539359)
  4541. .with('uitreeindex', 3)
  4542. .with('classname', 'Button')
  4543. .with('resource-id', 'android:id/button2')
  4544. .with('text', 'KEEP OFF')
  4545.  
  4546. $ruiObj.click
  4547.  
  4548. waitsecond(2)
  4549. end
  4550.  
  4551. tcase << TestAction.new(:clickdone) do
  4552. $ruiObj = RUIObject.new.with('objectid', 1857204703).with('selfid', -544460817).with('textdescid', -1623853219).with('uniqueparentid', 1110794213)
  4553. .with('uitreeindex', 11)
  4554. .with('classname', 'Button')
  4555. .with('resource-id', 'com.google.android.apps.photos:id/done_button')
  4556. .with('text', 'DONE')
  4557.  
  4558. $ruiObj.click
  4559.  
  4560. waitsecond(2)
  4561. end
  4562.  
  4563. tcase << TestAction.new(:clickgotit) do
  4564. $ruiObj = RUIObject.new.with('objectid', -767191037).with('selfid', 1077689959).with('textdescid', 1333340036).with('uniqueparentid', 1950016636).with('classresourceid', 1834539358)
  4565. .with('uitreeindex', 3)
  4566. .with('classname', 'Button')
  4567. .with('resource-id', 'android:id/button1')
  4568. .with('text', 'GOT IT')
  4569.  
  4570. $ruiObj.click
  4571.  
  4572. waitsecond(2)
  4573. end
  4574.  
  4575. tcase << TestAction.new(:clickmostrecentvideo) do
  4576. click(180,792)
  4577.  
  4578. waitsecond(2)
  4579. end
  4580.  
  4581. tcase << TestAction.new(:clicktoallowfullscreen) do
  4582. $ruiObj = RUIObject.new.with('objectid', 421858869).with('selfid', 1817701202).with('textdescid', -941601866).with('uniqueparentid', -965863814)
  4583. .with('uitreeindex', 5)
  4584. .with('classname', 'Button')
  4585. .with('resource-id', 'android:id/ok')
  4586. .with('text', 'GOT IT')
  4587.  
  4588. $ruiObj.click
  4589.  
  4590. waitsecond(2)
  4591. end
  4592.  
  4593. tcase << TestAction.new(:View_Dismiss_10) do
  4594. $ruiObj = RUIObject.new.with('objectid', 1250577209).with('selfid', 2045596453).with('textdescid', 1467340739).with('uniqueparentid', -1059167548)
  4595. .with('uitreeindex', 3)
  4596. .with('classname', 'android.view.View')
  4597. .with('content-desc', 'Dismiss')
  4598.  
  4599. $ruiObj.click
  4600.  
  4601. waitsecond(2)
  4602. end
  4603.  
  4604. tcase << TestAction.new(:wait10seconds) do
  4605. for i in 1..4
  4606.  
  4607. waitsecond(i)
  4608. refreshScreen
  4609.  
  4610. end
  4611.  
  4612. end
  4613.  
  4614. tcase << TestAction.new(:clickthescreen) do
  4615. click(1080,1516.5)
  4616.  
  4617. waitsecond(2)
  4618. end
  4619.  
  4620. tcase << TestAction.new(:checkforpausebutton) do
  4621. $ruiObj = RUIObject.new.with('objectid', 1760472289).with('selfid', -1751474194).with('textdescid', -1538603918).with('uniqueparentid', 542296211)
  4622. .with('uitreeindex', 2)
  4623. .with('classname', 'ImageButton')
  4624. .with('resource-id', 'com.google.android.apps.photos:id/photos_videoplayer_pause_button')
  4625. .with('content-desc', 'Pause video')
  4626.  
  4627. $ruiObj.isExist
  4628.  
  4629. waitsecond(0)
  4630. end
  4631.  
  4632. tcase << TestAction.new(:refreshscreen) do
  4633. refreshScreen
  4634.  
  4635. waitsecond(0)
  4636. end
  4637.  
  4638. tcase << TestAction.new(:wait16second) do
  4639. for i in 1..5
  4640.  
  4641. waitsecond(i)
  4642. refreshScreen
  4643.  
  4644. end
  4645.  
  4646. end
  4647.  
  4648. tcase << TestAction.new(:pausevideo) do
  4649. $ruiObj = RUIObject.new.with('objectid', 1760472289).with('selfid', -1751474194).with('textdescid', -1538603918).with('uniqueparentid', 542296211)
  4650. .with('uitreeindex', 2)
  4651. .with('classname', 'ImageButton')
  4652. .with('resource-id', 'com.google.android.apps.photos:id/photos_videoplayer_pause_button')
  4653. .with('content-desc', 'Pause video')
  4654.  
  4655. $ruiObj.click
  4656.  
  4657. waitsecond(2)
  4658. end
  4659.  
  4660. tcase << TestAction.new(:stoplog) do
  4661. $myTestResult = checkLastExistResult
  4662.  
  4663. logStopTest("05_01_07_02_MultiMedia")
  4664.  
  4665.  
  4666.  
  4667. waitsecond(0)
  4668. end
  4669.  
  4670. tcase << TestAction.new(:pressBack_4) do
  4671. pressBack
  4672.  
  4673. waitsecond(0)
  4674. end
  4675.  
  4676. tcase << TestAction.new(:pressBack_6) do
  4677. pressBack
  4678.  
  4679. waitsecond(0)
  4680. end
  4681.  
  4682. tcase << TestAction.new(:pressHome_7) do
  4683. pressHome
  4684.  
  4685. waitsecond(0)
  4686. end
  4687.  
  4688. tcase.run(loopTime)
  4689.  
  4690. end
  4691.  
  4692. def self.Multimedia_5_1_7_3(loopTime)
  4693.  
  4694. tcase = TestCase.new("Multimedia_5_1_7_3")
  4695.  
  4696. tcase << TestAction.new(:logstart) do
  4697. logStartTest("05_01_07_03_MultiMedia")
  4698.  
  4699. waitsecond(0)
  4700. end
  4701.  
  4702. tcase << TestAction.new(:gotoPhotos) do
  4703. gotoAppPixel("Photos")
  4704.  
  4705. waitsecond(2)
  4706. end
  4707.  
  4708. tcase << TestAction.new(:gotovideo) do
  4709. click(166.5,666)
  4710.  
  4711. waitsecond(2)
  4712. end
  4713.  
  4714. tcase << TestAction.new(:clicktheview) do
  4715. $ruiObj = RUIObject.new.with('objectid', 969208524).with('selfid', 1815484335).with('textdescid', -19306796).with('uniqueparentid', -87074755)
  4716. .with('uitreeindex', 0)
  4717. .with('classname', 'android.view.View')
  4718.  
  4719. $ruiObj.click
  4720.  
  4721. waitsecond(0)
  4722. end
  4723.  
  4724. tcase << TestAction.new(:refreshscreen) do
  4725. refreshScreen
  4726.  
  4727. waitsecond(0)
  4728. end
  4729.  
  4730. tcase << TestAction.new(:deletebuttonexist) do
  4731. $ruiObj = RUIObject.new.with('objectid', -1328088200).with('selfid', 1434121712).with('textdescid', 864436336).with('uniqueparentid', -2095656440)
  4732. .with('uitreeindex', 14)
  4733. .with('classname', 'ImageView')
  4734. .with('resource-id', 'com.google.android.apps.photos:id/trash')
  4735. .with('content-desc', 'Trash')
  4736.  
  4737. $ruiObj.isExist
  4738.  
  4739. waitsecond(2)
  4740. end
  4741.  
  4742. tcase << TestAction.new(:deletethevideo) do
  4743. $ruiObj = RUIObject.new.with('objectid', -1328088200).with('selfid', 1434121712).with('textdescid', 864436336).with('uniqueparentid', -2095656440)
  4744. .with('uitreeindex', 14)
  4745. .with('classname', 'ImageView')
  4746. .with('resource-id', 'com.google.android.apps.photos:id/trash')
  4747. .with('content-desc', 'Trash')
  4748.  
  4749. $ruiObj.click
  4750.  
  4751. waitsecond(2)
  4752. end
  4753.  
  4754. tcase << TestAction.new(:confirmdelete) do
  4755. $ruiObj = RUIObject.new.with('objectid', -767191037).with('selfid', 2007729818).with('textdescid', -414128773).with('uniqueparentid', 158965951).with('classresourceid', 1834539358)
  4756. .with('uitreeindex', 7)
  4757. .with('classname', 'Button')
  4758. .with('resource-id', 'android:id/button1')
  4759. .with('text', 'MOVE TO TRASH')
  4760.  
  4761. $ruiObj.click
  4762.  
  4763. waitsecond(2)
  4764. end
  4765.  
  4766. tcase << TestAction.new(:confirmdelete_2) do
  4767. $ruiObj = RUIObject.new.with('objectid', -767191037).with('selfid', -1194431314).with('textdescid', -875578979).with('uniqueparentid', 1357736153).with('classresourceid', 1834539358)
  4768. .with('uitreeindex', 4)
  4769. .with('classname', 'Button')
  4770. .with('resource-id', 'android:id/button1')
  4771. .with('text', 'DELETE PERMANENTLY')
  4772.  
  4773. $ruiObj.click
  4774.  
  4775. waitsecond(2)
  4776. end
  4777.  
  4778. tcase << TestAction.new(:logstop) do
  4779. $myTestResult = checkLastExistResult
  4780.  
  4781. if $myTestResult == false
  4782. $myFailReason == "Video fail to delete"
  4783.  
  4784. end
  4785. logStopTest("05_01_07_03_MultiMedia")
  4786.  
  4787.  
  4788. waitsecond(0)
  4789. end
  4790.  
  4791. tcase << TestAction.new(:pressBack_11) do
  4792. pressBack
  4793.  
  4794. waitsecond(0)
  4795. end
  4796.  
  4797. tcase << TestAction.new(:pressBack_12) do
  4798. pressBack
  4799.  
  4800. waitsecond(0)
  4801. end
  4802.  
  4803. tcase << TestAction.new(:pressHome_13) do
  4804. pressHome
  4805.  
  4806. waitsecond(0)
  4807. end
  4808.  
  4809. tcase.run(loopTime)
  4810.  
  4811. end
  4812.  
  4813. def self.Multimedia_5_1_7_4(loopTime)
  4814.  
  4815. tcase = TestCase.new("Multimedia_5_1_7_4")
  4816.  
  4817. tcase << TestAction.new(:logstart) do
  4818. logStartTest("05_01_07_04_MultiMedia")
  4819.  
  4820. waitsecond(0)
  4821. end
  4822.  
  4823. tcase << TestAction.new(:scriptAction_2) do
  4824. gotoAppPixel("Camera")
  4825.  
  4826. waitsecond(2)
  4827. end
  4828.  
  4829. tcase << TestAction.new(:swipeLeft_2) do
  4830. swipe_horizontal_back 50
  4831.  
  4832. waitsecond(2)
  4833. end
  4834.  
  4835. tcase << TestAction.new(:selectCamera) do
  4836. $ruiObj = RUIObject.new.with('objectid', -1418579728).with('selfid', 2055244041).with('textdescid', 1854346827).with('uniqueparentid', 1620279486)
  4837. .with('uitreeindex', 7)
  4838. .with('classname', 'TextView')
  4839. .with('resource-id', 'com.android.camera2:id/selector_text')
  4840. .with('text', 'Camera')
  4841.  
  4842. $ruiObj.click
  4843.  
  4844. waitsecond(2)
  4845. end
  4846.  
  4847. tcase << TestAction.new(:takeaphoto) do
  4848. $ruiObj = RUIObject.new.with('objectid', -1444537032).with('selfid', 111453042).with('textdescid', 1162006437).with('uniqueparentid', -1154361882)
  4849. .with('uitreeindex', 15)
  4850. .with('classname', 'ImageView')
  4851. .with('resource-id', 'com.android.camera2:id/shutter_button')
  4852. .with('content-desc', 'Shutter')
  4853.  
  4854. $ruiObj.click
  4855.  
  4856. waitsecond(3)
  4857. end
  4858.  
  4859. tcase << TestAction.new(:roundedthumnailexist) do
  4860. $ruiObj = RUIObject.new.with('objectid', 1941509669).with('selfid', -1804265706).with('textdescid', 57257627).with('uniqueparentid', 1550231552)
  4861. .with('uitreeindex', 5)
  4862. .with('classname', 'android.view.View')
  4863. .with('resource-id', 'com.android.camera2:id/rounded_thumbnail_view')
  4864.  
  4865. $ruiObj.isExist
  4866.  
  4867. waitsecond(2)
  4868. end
  4869.  
  4870. tcase << TestAction.new(:logstop) do
  4871. $myTestResult = checkLastExistResult
  4872.  
  4873. if $myTestResult == false
  4874. $myFailReason == "Take picture FAILED"
  4875. end
  4876. logStopTest("05_01_07_04_MultiMedia")
  4877.  
  4878.  
  4879. waitsecond(0)
  4880. end
  4881.  
  4882. tcase << TestAction.new(:pressBack_8) do
  4883. pressBack
  4884.  
  4885. waitsecond(0)
  4886. end
  4887.  
  4888. tcase << TestAction.new(:pressHome_9) do
  4889. pressHome
  4890.  
  4891. waitsecond(0)
  4892. end
  4893.  
  4894. tcase.run(loopTime)
  4895.  
  4896. end
  4897.  
  4898. def self.Multimedia_5_1_7_5(loopTime)
  4899.  
  4900. tcase = TestCase.new("Multimedia_5_1_7_5")
  4901.  
  4902. tcase << TestAction.new(:logstart) do
  4903. logStartTest("05_01_07_05_MultiMedia")
  4904.  
  4905. waitsecond(0)
  4906. end
  4907.  
  4908. tcase << TestAction.new(:gotoGallery) do
  4909. gotoAppPixel("Photos")
  4910.  
  4911. waitsecond(2)
  4912. end
  4913.  
  4914. tcase << TestAction.new(:clickmostcurrentphoto) do
  4915. $ruiObj = RUIObject.new.with('objectid', -740392950).with('selfid', -155877827).with('textdescid', 1337650749).with('uniqueparentid', -720638774)
  4916. .with('uitreeindex', 1)
  4917. .with('pretext', 'Camera')
  4918. .with('classname', 'android.view.ViewGroup')
  4919. .with('content-desc', 'Photo taken on May 10, 2017 8:55:20 PM.')
  4920.  
  4921. $ruiObj.click
  4922.  
  4923. waitsecond(2)
  4924. end
  4925.  
  4926. tcase << TestAction.new(:ifsharebuttonexist) do
  4927. $ruiObj = RUIObject.new.with('objectid', -1982964278).with('selfid', 1056003612).with('textdescid', 1336202944).with('uniqueparentid', 1291383994)
  4928. .with('uitreeindex', 6)
  4929. .with('classname', 'ImageView')
  4930. .with('resource-id', 'com.google.android.apps.photos:id/edit')
  4931. .with('content-desc', 'Edit')
  4932.  
  4933. $ruiObj.isExist
  4934.  
  4935. waitsecond(0)
  4936. end
  4937.  
  4938. tcase << TestAction.new(:logstop) do
  4939. $myTestResult = checkLastExistResult
  4940. if $myTestResult == false
  4941. $myFailReason == "Take picture FAILED"
  4942. end
  4943. logStopTest("05_01_07_05_MultiMedia")
  4944.  
  4945.  
  4946. waitsecond(0)
  4947. end
  4948.  
  4949. tcase << TestAction.new(:pressBack_7) do
  4950. pressBack
  4951.  
  4952. waitsecond(0)
  4953. end
  4954.  
  4955. tcase << TestAction.new(:pressBack_8) do
  4956. pressBack
  4957.  
  4958. waitsecond(0)
  4959. end
  4960.  
  4961. tcase << TestAction.new(:pressHome_8) do
  4962. pressHome
  4963.  
  4964. waitsecond(0)
  4965. end
  4966.  
  4967. tcase.run(loopTime)
  4968.  
  4969. end
  4970.  
  4971. def self.Multimedia_5_1_7_6(loopTime)
  4972.  
  4973. tcase = TestCase.new("Multimedia_5_1_7_6")
  4974.  
  4975. tcase << TestAction.new(:logstart) do
  4976. logStartTest("05_01_07_06_MultiMedia")
  4977.  
  4978. waitsecond(0)
  4979. end
  4980.  
  4981. tcase << TestAction.new(:gotoGallery) do
  4982. gotoAppPixel("Photos")
  4983.  
  4984. waitsecond(2)
  4985. end
  4986.  
  4987. tcase << TestAction.new(:clickmostrecentfile) do
  4988. click(184.5,648)
  4989.  
  4990. waitsecond(2)
  4991. end
  4992.  
  4993. tcase << TestAction.new(:deletebuttonexist) do
  4994. $ruiObj = RUIObject.new.with('objectid', -1328088200).with('selfid', 1434121712).with('textdescid', 864436336).with('uniqueparentid', -2095656440)
  4995. .with('uitreeindex', 7)
  4996. .with('classname', 'ImageView')
  4997. .with('resource-id', 'com.google.android.apps.photos:id/trash')
  4998. .with('content-desc', 'Trash')
  4999.  
  5000. $ruiObj.isExist
  5001.  
  5002. waitsecond(0)
  5003. end
  5004.  
  5005. tcase << TestAction.new(:deletethepicture) do
  5006. $ruiObj = RUIObject.new.with('objectid', -1328088200).with('selfid', 1434121712).with('textdescid', 864436336).with('uniqueparentid', -2095656440)
  5007. .with('uitreeindex', 8)
  5008. .with('classname', 'ImageView')
  5009. .with('resource-id', 'com.google.android.apps.photos:id/trash')
  5010. .with('content-desc', 'Trash')
  5011.  
  5012. $ruiObj.click
  5013.  
  5014. waitsecond(2)
  5015. end
  5016.  
  5017. tcase << TestAction.new(:logstop) do
  5018. $myTestResult = checkLastExistResult
  5019. if $myTestResult == false
  5020. $myFailReason == "Picture is not deleted."
  5021. end
  5022. logStopTest("05_01_07_06_MultiMedia")
  5023.  
  5024.  
  5025. waitsecond(2)
  5026. end
  5027.  
  5028. tcase << TestAction.new(:pressBack_7) do
  5029. pressBack
  5030.  
  5031. waitsecond(0)
  5032. end
  5033.  
  5034. tcase << TestAction.new(:pressBack_8) do
  5035. pressBack
  5036.  
  5037. waitsecond(0)
  5038. end
  5039.  
  5040. tcase << TestAction.new(:pressHome_8) do
  5041. pressHome
  5042.  
  5043. waitsecond(0)
  5044. end
  5045.  
  5046. tcase.run(loopTime)
  5047.  
  5048. end
  5049.  
  5050. def self.Multimedia_5_1_7_7(loopTime)
  5051.  
  5052. tcase = TestCase.new("Multimedia_5_1_7_7")
  5053.  
  5054. tcase << TestAction.new(:logstart) do
  5055. logStartTest("05_01_07_07_MultiMedia")
  5056.  
  5057. waitsecond(0)
  5058. end
  5059.  
  5060. tcase << TestAction.new(:gotomessages) do
  5061. gotoAppPixel("Messages")
  5062.  
  5063. waitsecond(2)
  5064. end
  5065.  
  5066. tcase << TestAction.new(:Startnewmessage) do
  5067. $ruiObj = RUIObject.new.with('objectid', 764419066).with('selfid', 916878134).with('textdescid', 48640071).with('uniqueparentid', 1408873138)
  5068. .with('uitreeindex', 6)
  5069. .with('classname', 'ImageView')
  5070. .with('resource-id', 'com.google.android.apps.messaging:id/start_new_conversation_button')
  5071. .with('content-desc', 'Start new conversation')
  5072.  
  5073. $ruiObj.click
  5074.  
  5075. waitsecond(2)
  5076. end
  5077.  
  5078. tcase << TestAction.new(:TextView_Skip_2) do
  5079. $ruiObj = RUIObject.new.with('objectid', 774774376).with('selfid', 692625717).with('textdescid', 125277897).with('uniqueparentid', 1739951846)
  5080. .with('uitreeindex', 3)
  5081. .with('classname', 'TextView')
  5082. .with('resource-id', 'com.google.android.apps.messaging:id/skip')
  5083. .with('text', 'SKIP')
  5084.  
  5085. $ruiObj.click
  5086.  
  5087. waitsecond(2)
  5088. end
  5089.  
  5090. tcase << TestAction.new(:TextView_Next_4) do
  5091. $ruiObj = RUIObject.new.with('objectid', 774620124).with('selfid', -737737443).with('textdescid', -1309712823).with('uniqueparentid', -1145423395)
  5092. .with('uitreeindex', 5)
  5093. .with('classname', 'TextView')
  5094. .with('resource-id', 'com.google.android.apps.messaging:id/next')
  5095. .with('text', 'NEXT')
  5096.  
  5097. $ruiObj.click
  5098.  
  5099. waitsecond(2)
  5100. end
  5101.  
  5102. tcase << TestAction.new(:Button_PermissionAllowButton_6) do
  5103. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  5104. .with('uitreeindex', 4)
  5105. .with('classname', 'Button')
  5106. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  5107. .with('text', 'ALLOW')
  5108.  
  5109. $ruiObj.click
  5110.  
  5111. waitsecond(2)
  5112. end
  5113.  
  5114. tcase << TestAction.new(:Button_PermissionAllowButton_8) do
  5115. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  5116. .with('uitreeindex', 4)
  5117. .with('classname', 'Button')
  5118. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  5119. .with('text', 'ALLOW')
  5120.  
  5121. $ruiObj.click
  5122.  
  5123. waitsecond(2)
  5124. end
  5125.  
  5126. tcase << TestAction.new(:Button_PermissionAllowButton_10) do
  5127. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  5128. .with('uitreeindex', 2)
  5129. .with('classname', 'Button')
  5130. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  5131. .with('text', 'ALLOW')
  5132.  
  5133. $ruiObj.click
  5134.  
  5135. waitsecond(2)
  5136. end
  5137.  
  5138. tcase << TestAction.new(:put_recipientnumber) do
  5139. $ruiObj = RUIObject.new.with('objectid', -1173212947).with('selfid', 1163803387).with('textdescid', -2009862957).with('uniqueparentid', 955347666).with('classresourceid', 461007471)
  5140. .with('uitreeindex', 1)
  5141. .with('classname', 'MultiAutoCompleteTextView')
  5142. .with('resource-id', 'com.google.android.apps.messaging:id/recipient_text_view')
  5143.  
  5144. $ruiObj.inputtext('4048612355')
  5145.  
  5146. waitsecond(2)
  5147. end
  5148.  
  5149. tcase << TestAction.new(:nextwindow) do
  5150. click(1354.5,2605.5)
  5151.  
  5152. waitsecond(2)
  5153. end
  5154.  
  5155. tcase << TestAction.new(:gotooption) do
  5156. $ruiObj = RUIObject.new.with('objectid', -1360420814).with('selfid', -952088716).with('textdescid', 1847611113).with('uniqueparentid', 1251875640)
  5157. .with('uitreeindex', 7)
  5158. .with('classname', 'ImageButton')
  5159. .with('resource-id', 'com.google.android.apps.messaging:id/attach_media_button')
  5160. .with('content-desc', 'Add an attachment')
  5161.  
  5162. $ruiObj.click
  5163.  
  5164. waitsecond(2)
  5165. end
  5166.  
  5167. tcase << TestAction.new(:changetorecordoption) do
  5168. $ruiObj = RUIObject.new.with('objectid', 1408822083).with('selfid', -645200276).with('textdescid', -334363612).with('uniqueparentid', -1874692983)
  5169. .with('uitreeindex', 28)
  5170. .with('classname', 'ImageButton')
  5171. .with('content-desc', 'Record audio')
  5172.  
  5173. $ruiObj.click
  5174.  
  5175. waitsecond(2)
  5176. end
  5177.  
  5178. tcase << TestAction.new(:clickallow) do
  5179. $ruiObj = RUIObject.new.with('objectid', -655699299).with('selfid', -1852985786).with('textdescid', -1480420102).with('uniqueparentid', -1331106569)
  5180. .with('uitreeindex', 13)
  5181. .with('classname', 'TextView')
  5182. .with('resource-id', 'com.google.android.apps.messaging:id/missing_permission_enable')
  5183. .with('text', 'ALLOW')
  5184.  
  5185. $ruiObj.click
  5186.  
  5187. waitsecond(2)
  5188. end
  5189.  
  5190. tcase << TestAction.new(:clickPermissionAllowButton) do
  5191. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  5192. .with('uitreeindex', 3)
  5193. .with('classname', 'Button')
  5194. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  5195. .with('text', 'ALLOW')
  5196.  
  5197. $ruiObj.click
  5198.  
  5199. waitsecond(2)
  5200. end
  5201.  
  5202. tcase << TestAction.new(:record5secondsmessage) do
  5203. swipe(597, 2053, 842, 2298, 500)
  5204.  
  5205. waitsecond(2)
  5206. end
  5207.  
  5208. tcase << TestAction.new(:playbuttonexist) do
  5209. $ruiObj = RUIObject.new.with('objectid', 28335571).with('selfid', 801742907).with('textdescid', -1823989396).with('uniqueparentid', 1321193562)
  5210. .with('uitreeindex', 7)
  5211. .with('classname', 'ImageView')
  5212. .with('resource-id', 'com.google.android.apps.messaging:id/play_button')
  5213. .with('content-desc', 'Play audio attachment')
  5214.  
  5215. $ruiObj.isExist
  5216.  
  5217. waitsecond(0)
  5218. end
  5219.  
  5220. tcase << TestAction.new(:logstop) do
  5221. $myTestResult = checkLastExistResult
  5222. if $myTestResult == false
  5223. $myFailReason == "Message is not recorded"
  5224. end
  5225. logStopTest("05_01_07_07_MultiMedia")
  5226.  
  5227.  
  5228. waitsecond(0)
  5229. end
  5230.  
  5231. tcase << TestAction.new(:pressBack_34) do
  5232. pressBack
  5233.  
  5234. waitsecond(0)
  5235. end
  5236.  
  5237. tcase << TestAction.new(:pressBack_35) do
  5238. pressBack
  5239.  
  5240. waitsecond(0)
  5241. end
  5242.  
  5243. tcase << TestAction.new(:pressBack_36) do
  5244. pressBack
  5245.  
  5246. waitsecond(0)
  5247. end
  5248.  
  5249. tcase << TestAction.new(:pressHome_37) do
  5250. pressHome
  5251.  
  5252. waitsecond(0)
  5253. end
  5254.  
  5255. tcase.run(loopTime)
  5256.  
  5257. end
  5258.  
  5259. def self.Multimedia_5_1_7_8(loopTime)
  5260.  
  5261. tcase = TestCase.new("Multimedia_5_1_7_8")
  5262.  
  5263. tcase << TestAction.new(:logstart) do
  5264. logStartTest("05_01_07_08_MultiMedia")
  5265.  
  5266. waitsecond(0)
  5267. end
  5268.  
  5269. tcase << TestAction.new(:gotomessages) do
  5270. gotoAppPixel("Messages")
  5271.  
  5272. waitsecond(2)
  5273. end
  5274.  
  5275. tcase << TestAction.new(:Startnewmessage) do
  5276. $ruiObj = RUIObject.new.with('objectid', 764419066).with('selfid', 916878134).with('textdescid', 48640071).with('uniqueparentid', 1408873138)
  5277. .with('uitreeindex', 6)
  5278. .with('classname', 'ImageView')
  5279. .with('resource-id', 'com.google.android.apps.messaging:id/start_new_conversation_button')
  5280. .with('content-desc', 'Start new conversation')
  5281.  
  5282. $ruiObj.click
  5283.  
  5284. waitsecond(2)
  5285. end
  5286.  
  5287. tcase << TestAction.new(:put_recipientnumber) do
  5288. $ruiObj = RUIObject.new.with('objectid', -1173212947).with('selfid', 1163803387).with('textdescid', -2009862957).with('uniqueparentid', 955347666).with('classresourceid', 461007471)
  5289. .with('uitreeindex', 1)
  5290. .with('classname', 'MultiAutoCompleteTextView')
  5291. .with('resource-id', 'com.google.android.apps.messaging:id/recipient_text_view')
  5292.  
  5293. $ruiObj.inputtext('8582499970')
  5294.  
  5295. waitsecond(2)
  5296. end
  5297.  
  5298. tcase << TestAction.new(:nextwindow) do
  5299. click(1354.5,2605.5)
  5300.  
  5301. waitsecond(2)
  5302. end
  5303.  
  5304. tcase << TestAction.new(:gotooption) do
  5305. $ruiObj = RUIObject.new.with('objectid', -1360420814).with('selfid', -952088716).with('textdescid', 1847611113).with('uniqueparentid', 1251875640)
  5306. .with('uitreeindex', 7)
  5307. .with('classname', 'ImageButton')
  5308. .with('resource-id', 'com.google.android.apps.messaging:id/attach_media_button')
  5309. .with('content-desc', 'Add an attachment')
  5310.  
  5311. $ruiObj.click
  5312.  
  5313. waitsecond(2)
  5314. end
  5315.  
  5316. tcase << TestAction.new(:changetorecordoption) do
  5317. $ruiObj = RUIObject.new.with('objectid', 1408822083).with('selfid', -645200276).with('textdescid', -334363612).with('uniqueparentid', -1874692983)
  5318. .with('uitreeindex', 28)
  5319. .with('classname', 'ImageButton')
  5320. .with('content-desc', 'Record audio')
  5321.  
  5322. $ruiObj.click
  5323.  
  5324. waitsecond(2)
  5325. end
  5326.  
  5327. tcase << TestAction.new(:clickallow) do
  5328. $ruiObj = RUIObject.new.with('objectid', -655699299).with('selfid', -1852985786).with('textdescid', -1480420102).with('uniqueparentid', -1331106569)
  5329. .with('uitreeindex', 13)
  5330. .with('classname', 'TextView')
  5331. .with('resource-id', 'com.google.android.apps.messaging:id/missing_permission_enable')
  5332. .with('text', 'ALLOW')
  5333.  
  5334. $ruiObj.click
  5335.  
  5336. waitsecond(2)
  5337. end
  5338.  
  5339. tcase << TestAction.new(:clickPermissionAllowButton) do
  5340. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  5341. .with('uitreeindex', 3)
  5342. .with('classname', 'Button')
  5343. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  5344. .with('text', 'ALLOW')
  5345.  
  5346. $ruiObj.click
  5347.  
  5348. waitsecond(2)
  5349. end
  5350.  
  5351. tcase << TestAction.new(:record5secondsmessage) do
  5352. swipe(597, 2053, 842, 2298, 500)
  5353.  
  5354. waitsecond(2)
  5355. end
  5356.  
  5357. tcase << TestAction.new(:playbuttonis_exist_1) do
  5358. $ruiObj = RUIObject.new.with('objectid', 28335571).with('selfid', 801742907).with('textdescid', -1823989396).with('uniqueparentid', 1321193562)
  5359. .with('uitreeindex', 7)
  5360. .with('classname', 'ImageView')
  5361. .with('resource-id', 'com.google.android.apps.messaging:id/play_button')
  5362. .with('content-desc', 'Play audio attachment')
  5363.  
  5364. $ruiObj.isExist
  5365.  
  5366. waitsecond(0)
  5367. end
  5368.  
  5369. tcase << TestAction.new(:playtherecord) do
  5370. $ruiObj = RUIObject.new.with('objectid', 28335571).with('selfid', 801742907).with('textdescid', -1823989396).with('uniqueparentid', 1321193562)
  5371. .with('uitreeindex', 7)
  5372. .with('classname', 'ImageView')
  5373. .with('resource-id', 'com.google.android.apps.messaging:id/play_button')
  5374. .with('content-desc', 'Play audio attachment')
  5375.  
  5376. $ruiObj.click
  5377.  
  5378. waitsecond(2)
  5379. end
  5380.  
  5381. tcase << TestAction.new(:logstop) do
  5382. $myTestResult = checkLastExistResult
  5383. if $myTestResult == false
  5384. $myFailReason == "Record is not played"
  5385. end
  5386. logStopTest("05_01_07_08_MultiMedia")
  5387.  
  5388.  
  5389. waitsecond(0)
  5390. end
  5391.  
  5392. tcase << TestAction.new(:pressBack_34) do
  5393. pressBack
  5394.  
  5395. waitsecond(0)
  5396. end
  5397.  
  5398. tcase << TestAction.new(:pressBack_35) do
  5399. pressBack
  5400.  
  5401. waitsecond(0)
  5402. end
  5403.  
  5404. tcase << TestAction.new(:pressBack_36) do
  5405. pressBack
  5406.  
  5407. waitsecond(0)
  5408. end
  5409.  
  5410. tcase << TestAction.new(:pressHome_37) do
  5411. pressHome
  5412.  
  5413. waitsecond(0)
  5414. end
  5415.  
  5416. tcase.run(loopTime)
  5417.  
  5418. end
  5419.  
  5420. def self.Multimedia_5_1_7_9(loopTime)
  5421.  
  5422. tcase = TestCase.new("Multimedia_5_1_7_9")
  5423.  
  5424. tcase << TestAction.new(:logstart) do
  5425. logStartTest("05_01_07_09_MultiMedia")
  5426.  
  5427. waitsecond(0)
  5428. end
  5429.  
  5430. tcase << TestAction.new(:gotomessages) do
  5431. gotoAppPixel("Messages")
  5432.  
  5433. waitsecond(2)
  5434. end
  5435.  
  5436. tcase << TestAction.new(:Startnewmessage) do
  5437. $ruiObj = RUIObject.new.with('objectid', 764419066).with('selfid', 916878134).with('textdescid', 48640071).with('uniqueparentid', 1408873138)
  5438. .with('uitreeindex', 6)
  5439. .with('classname', 'ImageView')
  5440. .with('resource-id', 'com.google.android.apps.messaging:id/start_new_conversation_button')
  5441. .with('content-desc', 'Start new conversation')
  5442.  
  5443. $ruiObj.click
  5444.  
  5445. waitsecond(2)
  5446. end
  5447.  
  5448. tcase << TestAction.new(:put_recipientnumber) do
  5449. $ruiObj = RUIObject.new.with('objectid', -1173212947).with('selfid', 1163803387).with('textdescid', -2009862957).with('uniqueparentid', 955347666).with('classresourceid', 461007471)
  5450. .with('uitreeindex', 1)
  5451. .with('classname', 'MultiAutoCompleteTextView')
  5452. .with('resource-id', 'com.google.android.apps.messaging:id/recipient_text_view')
  5453.  
  5454. $ruiObj.inputtext('8582499970')
  5455.  
  5456. waitsecond(2)
  5457. end
  5458.  
  5459. tcase << TestAction.new(:nextwindow) do
  5460. click(1354.5,2605.5)
  5461.  
  5462. waitsecond(2)
  5463. end
  5464.  
  5465. tcase << TestAction.new(:gotooption) do
  5466. $ruiObj = RUIObject.new.with('objectid', -1360420814).with('selfid', -952088716).with('textdescid', 1847611113).with('uniqueparentid', 1251875640)
  5467. .with('uitreeindex', 7)
  5468. .with('classname', 'ImageButton')
  5469. .with('resource-id', 'com.google.android.apps.messaging:id/attach_media_button')
  5470. .with('content-desc', 'Add an attachment')
  5471.  
  5472. $ruiObj.click
  5473.  
  5474. waitsecond(2)
  5475. end
  5476.  
  5477. tcase << TestAction.new(:changetorecordoption) do
  5478. $ruiObj = RUIObject.new.with('objectid', 1408822083).with('selfid', -645200276).with('textdescid', -334363612).with('uniqueparentid', -1874692983)
  5479. .with('uitreeindex', 28)
  5480. .with('classname', 'ImageButton')
  5481. .with('content-desc', 'Record audio')
  5482.  
  5483. $ruiObj.click
  5484.  
  5485. waitsecond(2)
  5486. end
  5487.  
  5488. tcase << TestAction.new(:clickallow) do
  5489. $ruiObj = RUIObject.new.with('objectid', -655699299).with('selfid', -1852985786).with('textdescid', -1480420102).with('uniqueparentid', -1331106569)
  5490. .with('uitreeindex', 13)
  5491. .with('classname', 'TextView')
  5492. .with('resource-id', 'com.google.android.apps.messaging:id/missing_permission_enable')
  5493. .with('text', 'ALLOW')
  5494.  
  5495. $ruiObj.click
  5496.  
  5497. waitsecond(2)
  5498. end
  5499.  
  5500. tcase << TestAction.new(:clickPermissionAllowButton) do
  5501. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  5502. .with('uitreeindex', 3)
  5503. .with('classname', 'Button')
  5504. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  5505. .with('text', 'ALLOW')
  5506.  
  5507. $ruiObj.click
  5508.  
  5509. waitsecond(2)
  5510. end
  5511.  
  5512. tcase << TestAction.new(:record5secondsmessage) do
  5513. swipe(597, 2053, 842, 2298, 500)
  5514.  
  5515. waitsecond(2)
  5516. end
  5517.  
  5518. tcase << TestAction.new(:ImageButton_CloseButton_3) do
  5519. $ruiObj = RUIObject.new.with('objectid', -8145267).with('selfid', -966281882).with('textdescid', 812421240).with('uniqueparentid', 108696351)
  5520. .with('uitreeindex', 8)
  5521. .with('classname', 'ImageButton')
  5522. .with('resource-id', 'com.google.android.apps.messaging:id/close_button')
  5523. .with('content-desc', 'Discard attachment')
  5524.  
  5525. $ruiObj.click
  5526.  
  5527. waitsecond(2)
  5528. end
  5529.  
  5530. tcase << TestAction.new(:ImageButton_CloseButton_5) do
  5531. $ruiObj = RUIObject.new.with('objectid', -8145267).with('selfid', -966281882).with('textdescid', 812421240).with('uniqueparentid', 108696351)
  5532. .with('uitreeindex', 8)
  5533. .with('classname', 'ImageButton')
  5534. .with('resource-id', 'com.google.android.apps.messaging:id/close_button')
  5535. .with('content-desc', 'Discard attachment')
  5536.  
  5537. $ruiObj.isExist
  5538.  
  5539. waitsecond(0)
  5540. end
  5541.  
  5542. tcase << TestAction.new(:logstop) do
  5543. $myTestResult = !checkLastExistResult
  5544. if $myTestResult == false
  5545. $myFailReason == "Record is not deleted"
  5546. end
  5547. logStopTest("05_01_07_09_MultiMedia")
  5548.  
  5549.  
  5550. waitsecond(0)
  5551. end
  5552.  
  5553. tcase << TestAction.new(:pressBack_34) do
  5554. pressBack
  5555.  
  5556. waitsecond(0)
  5557. end
  5558.  
  5559. tcase << TestAction.new(:pressBack_35) do
  5560. pressBack
  5561.  
  5562. waitsecond(0)
  5563. end
  5564.  
  5565. tcase << TestAction.new(:pressBack_36) do
  5566. pressBack
  5567.  
  5568. waitsecond(0)
  5569. end
  5570.  
  5571. tcase << TestAction.new(:pressHome_37) do
  5572. pressHome
  5573.  
  5574. waitsecond(0)
  5575. end
  5576.  
  5577. tcase.run(loopTime)
  5578.  
  5579. end
  5580.  
  5581. def self.NFC_5_1_11_1(loopTime)
  5582.  
  5583. tcase = TestCase.new("NFC_5_1_11_1")
  5584.  
  5585. tcase << TestAction.new(:Home) do
  5586. pressHome
  5587.  
  5588. waitsecond(2)
  5589. end
  5590.  
  5591. tcase << TestAction.new(:logStart) do
  5592. logStartTest("NFC_5_1_11_1")
  5593.  
  5594. waitsecond(0)
  5595. end
  5596.  
  5597. tcase << TestAction.new(:GotoSettings) do
  5598. gotoAppPixel('Settings')
  5599.  
  5600.  
  5601. waitsecond(2)
  5602. end
  5603.  
  5604. tcase << TestAction.new(:ConnectedDevice) do
  5605. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', -2089735067).with('textdescid', 48216771).with('uniqueparentid', -1387883596)
  5606. .with('uitreeindex', 13)
  5607. .with('classname', 'TextView')
  5608. .with('resource-id', 'android:id/title')
  5609. .with('text', 'Connected devices')
  5610.  
  5611. $ruiObj.click
  5612.  
  5613. waitsecond(2)
  5614. end
  5615.  
  5616. tcase << TestAction.new(:Off1) do
  5617. $NFCon = RUIObject.new.with('objectid', 104348776).with('selfid', 411050777).with('textdescid', 2105771625).with('uniqueparentid', 1207404591)
  5618. .with('uitreeindex', 14)
  5619. .with('classname', 'Switch')
  5620. .with('resource-id', 'android:id/switch_widget')
  5621. .with('text', 'ON')
  5622.  
  5623. if $NFCon.isExist
  5624. $NFCon.click
  5625. end
  5626.  
  5627. waitsecond(2)
  5628. end
  5629.  
  5630. tcase << TestAction.new(:On) do
  5631. $NFCoff = RUIObject.new.with('objectid', 104348776).with('selfid', -142327979).with('textdescid', 854404457).with('uniqueparentid', -1225169821)
  5632. .with('uitreeindex', 13)
  5633. .with('classname', 'Switch')
  5634. .with('resource-id', 'android:id/switch_widget')
  5635. .with('text', 'OFF')
  5636.  
  5637. if $NFCoff.isExist
  5638. $NFCoff.click
  5639. end
  5640.  
  5641. waitsecond(2)
  5642. end
  5643.  
  5644. tcase << TestAction.new(:Wait10Sec) do
  5645. waitsecond(10)
  5646.  
  5647. waitsecond(2)
  5648. end
  5649.  
  5650. tcase << TestAction.new(:FailCheck) do
  5651. $ruiObj = RUIObject.new.with('objectid', 104348776).with('selfid', 411050777).with('textdescid', 2105771625).with('uniqueparentid', 1207404591)
  5652. .with('uitreeindex', 13)
  5653. .with('classname', 'Switch')
  5654. .with('resource-id', 'android:id/switch_widget')
  5655. .with('text', 'ON')
  5656.  
  5657. $ruiObj.isExist
  5658.  
  5659. waitsecond(0)
  5660. end
  5661.  
  5662. tcase << TestAction.new(:Result) do
  5663. $myTestResult = checkLastExistResult
  5664.  
  5665. waitsecond(0)
  5666. end
  5667.  
  5668. tcase << TestAction.new(:Off2) do
  5669. $NFCon = RUIObject.new.with('objectid', 104348776).with('selfid', 411050777).with('textdescid', 2105771625).with('uniqueparentid', 1207404591)
  5670. .with('uitreeindex', 14)
  5671. .with('classname', 'Switch')
  5672. .with('resource-id', 'android:id/switch_widget')
  5673. .with('text', 'ON')
  5674.  
  5675. if $NFCon.isExist
  5676. $NFCon.click
  5677. end
  5678.  
  5679. waitsecond(2)
  5680. end
  5681.  
  5682. tcase << TestAction.new(:logStop) do
  5683. logStopTest("NFC_5_1_11_1")
  5684.  
  5685. waitsecond(0)
  5686. end
  5687.  
  5688. tcase.run(loopTime)
  5689.  
  5690. end
  5691.  
  5692. def self.PIM_05_01_06_01(loopTime)
  5693.  
  5694. tcase = TestCase.new("PIM_05_01_06_01")
  5695.  
  5696. tcase << TestAction.new(:scriptAction_StartTestLog) do
  5697. logStartTest("05_01_06_01_PIM")
  5698. end
  5699.  
  5700. tcase << TestAction.new(:gotoApp_4) do
  5701. gotoApp('Calendar')
  5702.  
  5703. waitsecond(2)
  5704. end
  5705.  
  5706. tcase << TestAction.new(:ImageView_3) do
  5707. $ruiObj = RUIObject.new.with('objectid', -30724256).with('selfid', 1125864064).with('textdescid', -952451904).with('uniqueparentid', 0)
  5708. .with('uitreeindex', 23)
  5709. .with('pretext', 'SAT')
  5710. .with('classname', 'ImageView')
  5711.  
  5712. $ruiObj.click
  5713.  
  5714. waitsecond(2)
  5715. end
  5716.  
  5717. tcase << TestAction.new(:EditText_Title_7) do
  5718. $ruiObj = RUIObject.new.with('objectid', -308497519).with('selfid', 2023914653).with('textdescid', -973488465).with('uniqueparentid', 0).with('classresourceid', 1943514993)
  5719. .with('uitreeindex', 4)
  5720. .with('classname', 'EditText')
  5721. .with('resource-id', 'com.android.calendar:id/title')
  5722.  
  5723. $ruiObj.inputtext('Event')
  5724.  
  5725. waitsecond(2)
  5726. end
  5727.  
  5728. tcase << TestAction.new(:Button_BtnDone_9) do
  5729. $ruiObj = RUIObject.new.with('objectid', 2099795980).with('selfid', 2133354936).with('textdescid', -644044497).with('uniqueparentid', 0)
  5730. .with('uitreeindex', 32)
  5731. .with('classname', 'Button')
  5732. .with('resource-id', 'com.android.calendar:id/btn_done')
  5733. .with('text', 'SAVE')
  5734.  
  5735. $ruiObj.click
  5736.  
  5737. waitsecond(2)
  5738. end
  5739.  
  5740. tcase << TestAction.new(:wait1second_11) do
  5741. waitsecond(1)
  5742. end
  5743.  
  5744. tcase << TestAction.new(:scriptAction_LogStopTest) do
  5745. $myTestResult = checkLastExistResult
  5746.  
  5747. if $myTestResult == false
  5748. $myFailReason = "End button not found"
  5749. end
  5750. logStopTest("05_01_06_01_PIM")
  5751. end
  5752.  
  5753. tcase << TestAction.new(:pressBack_14) do
  5754. pressBack
  5755. end
  5756.  
  5757. tcase << TestAction.new(:pressBack_16) do
  5758. pressBack
  5759. end
  5760.  
  5761. tcase << TestAction.new(:pressHome_2) do
  5762. pressHome
  5763. end
  5764.  
  5765. tcase.run(loopTime)
  5766.  
  5767. end
  5768.  
  5769. def self.PIM_5_1_6_1(loopTime)
  5770.  
  5771. tcase = TestCase.new("PIM_5_1_6_1")
  5772.  
  5773. tcase << TestAction.new(:scriptAction_1) do
  5774. i = 0
  5775. n = 0
  5776.  
  5777. gotoAppPixel("Calendar")
  5778.  
  5779. waitsecond(3)
  5780.  
  5781. while n < 3 do
  5782. RUIObject.new.with('objectid', 1039155013).with('selfid', -773553589).with('textdescid', -1562943423).with('uniqueparentid', 1761562046)
  5783. .with('uitreeindex', 4)
  5784. .with('classname', 'ImageView')
  5785. .with('resource-id', 'com.google.android.calendar:id/right_arrow')
  5786. .with('content-desc', 'next page').click
  5787.  
  5788. waitsecond(3)
  5789.  
  5790. n += 1
  5791. end
  5792.  
  5793. RUIObject.new.with('objectid', -1343654405).with('selfid', -1828804226).with('textdescid', 769111461).with('uniqueparentid', 1254931512)
  5794. .with('uitreeindex', 4)
  5795. .with('classname', 'Button')
  5796. .with('resource-id', 'com.google.android.calendar:id/done_button')
  5797. .with('content-desc', 'Got it')
  5798. .with('text', 'GOT IT').click
  5799.  
  5800. waitsecond(3)
  5801.  
  5802. while i < 5 do
  5803.  
  5804. logStartTest("PIM_5_1_6_1")
  5805.  
  5806. RUIObject.new.with('objectid', -173740453).with('selfid', 220763148).with('textdescid', 356821123).with('uniqueparentid', -1214616113)
  5807. .with('uitreeindex', 0)
  5808. .with('classname', 'ImageButton')
  5809. .with('resource-id', 'com.google.android.calendar:id/floating_action_button')
  5810. .with('content-desc', 'Create new event and more').click
  5811.  
  5812. waitsecond(3)
  5813.  
  5814. RUIObject.new.with('objectid', 127015164).with('selfid', 498557039).with('textdescid', 42594724).with('uniqueparentid', -1133067901)
  5815. .with('uitreeindex', 4)
  5816. .with('pretext', 'Event')
  5817. .with('classname', 'ImageView')
  5818. .with('resource-id', 'com.google.android.calendar:id/speed_dial_icon')
  5819. .with('content-desc', '').click
  5820.  
  5821. waitsecond(3)
  5822.  
  5823. RUIObject.new.with('objectid', -2070965006).with('selfid', -1061118606).with('textdescid', 1487763652).with('uniqueparentid', 1410610442).with('classresourceid', 395678146)
  5824. .with('uitreeindex', 7)
  5825. .with('classname', 'TextView')
  5826. .with('resource-id', 'com.google.android.calendar:id/start_date').click
  5827.  
  5828. waitsecond(3)
  5829.  
  5830. RUIObject.new.with('objectid', -241964648).with('selfid', -834019104).with('textdescid', 1286379225).with('uniqueparentid', 507709356).with('classresourceid', 1815484335)
  5831. .with('uitreeindex', 2)
  5832. .with('classname', 'android.view.View')
  5833. .with('content-desc', '0'+db("Calendar")[i]+' May 2017')
  5834. .with('text', 'db("Calendar")[1]').click
  5835.  
  5836. waitsecond(3)
  5837.  
  5838. RUIObject.new.with('objectid', 1424815732).with('selfid', -1318451484).with('textdescid', -1879811560).with('uniqueparentid', -2069065518).with('classresourceid', 1834539358)
  5839. .with('uitreeindex', 36)
  5840. .with('classname', 'Button')
  5841. .with('resource-id', 'android:id/button1')
  5842. .with('text', 'OK').click
  5843.  
  5844. waitsecond(3)
  5845.  
  5846.  
  5847.  
  5848. RUIObject.new.with('objectid', -1341455097).with('selfid', 870535911).with('textdescid', 1753902570).with('uniqueparentid', -1107284276)
  5849. .with('uitreeindex', 2)
  5850. .with('classname', 'Button')
  5851. .with('resource-id', 'com.google.android.calendar:id/save')
  5852. .with('text', 'SAVE').click
  5853.  
  5854. waitsecond(3)
  5855.  
  5856. RUIObject.new.with('objectid', -173740453).with('selfid', 220763148).with('textdescid', 356821123).with('uniqueparentid', -1214616113)
  5857. .with('uitreeindex', 0)
  5858. .with('classname', 'ImageButton')
  5859. .with('resource-id', 'com.google.android.calendar:id/floating_action_button')
  5860. .with('content-desc', 'Create new event and more').isExist
  5861.  
  5862. waitsecond(3)
  5863.  
  5864. $myTestResult = checkLastExistResult
  5865.  
  5866. logStopTest("PIM_5_1_6_1")
  5867.  
  5868.  
  5869. i += 1
  5870. end
  5871.  
  5872. pressBack
  5873. pressHome
  5874.  
  5875. waitsecond(2)
  5876. end
  5877.  
  5878. tcase.run(loopTime)
  5879.  
  5880. end
  5881.  
  5882. def self.PIM_5_1_6_2(loopTime)
  5883.  
  5884. tcase = TestCase.new("PIM_5_1_6_2")
  5885.  
  5886. tcase << TestAction.new(:Start_Log) do
  5887. logStartTest("PIM_5_1_6_2")
  5888.  
  5889. waitsecond(0)
  5890. end
  5891.  
  5892. tcase << TestAction.new(:Clock) do
  5893. gotoAppPixel("Clock")
  5894.  
  5895. waitsecond(2)
  5896. end
  5897.  
  5898. tcase << TestAction.new(:Click_AlarmTab) do
  5899. $ruiObj = RUIObject.new.with('objectid', 1398250823).with('selfid', 1155694879).with('textdescid', -2067701496).with('uniqueparentid', 1343446106)
  5900. .with('uitreeindex', 0)
  5901. .with('classname', 'TextView')
  5902. .with('text', 'ALARM')
  5903.  
  5904. $ruiObj.click
  5905.  
  5906. waitsecond(2)
  5907. end
  5908.  
  5909. tcase << TestAction.new(:Create_Alarm) do
  5910. $ruiObj = RUIObject.new.with('objectid', -675199108).with('selfid', 1376996000).with('textdescid', -42904882).with('uniqueparentid', -647720292)
  5911. .with('uitreeindex', 16)
  5912. .with('classname', 'ImageButton')
  5913. .with('resource-id', 'com.google.android.deskclock:id/fab')
  5914. .with('content-desc', 'Add alarm')
  5915.  
  5916. $ruiObj.click
  5917.  
  5918. waitsecond(2)
  5919. end
  5920.  
  5921. tcase << TestAction.new(:Click_OK) do
  5922. $ruiObj = RUIObject.new.with('objectid', 1329788078).with('selfid', -1318451484).with('textdescid', 1447865170).with('uniqueparentid', 1005760344).with('classresourceid', 1834539358)
  5923. .with('uitreeindex', 19)
  5924. .with('classname', 'Button')
  5925. .with('resource-id', 'android:id/button1')
  5926. .with('text', 'OK')
  5927.  
  5928. $ruiObj.click
  5929.  
  5930. waitsecond(2)
  5931. end
  5932.  
  5933. tcase << TestAction.new(:Check_Delete) do
  5934. $ruiObj = RUIObject.new.with('objectid', 30134492).with('selfid', 16045296).with('textdescid', -946628495).with('uniqueparentid', -579144048)
  5935. .with('uitreeindex', 23)
  5936. .with('classname', 'Button')
  5937. .with('resource-id', 'com.google.android.deskclock:id/delete')
  5938. .with('text', 'Delete')
  5939.  
  5940. $ruiObj.isExist
  5941.  
  5942. waitsecond(0)
  5943. end
  5944.  
  5945. tcase << TestAction.new(:Alarm_Off) do
  5946. $ruiObj = RUIObject.new.with('objectid', 1189886877).with('selfid', -1968976493).with('textdescid', 957014814).with('uniqueparentid', 1693277107)
  5947. .with('uitreeindex', 7)
  5948. .with('classname', 'Switch')
  5949. .with('resource-id', 'com.google.android.deskclock:id/onoff')
  5950. .with('text', 'ON')
  5951.  
  5952. $ruiObj.click
  5953.  
  5954. waitsecond(2)
  5955. end
  5956.  
  5957. tcase << TestAction.new(:End_Log) do
  5958. $myTestResult = checkLastExistResult
  5959.  
  5960. logStopTest("PIM_5_1_6_2")
  5961.  
  5962. waitsecond(0)
  5963. end
  5964.  
  5965. tcase << TestAction.new(:pressBack_11) do
  5966. pressBack
  5967.  
  5968. waitsecond(0)
  5969. end
  5970.  
  5971. tcase << TestAction.new(:pressHome_12) do
  5972. pressHome
  5973.  
  5974. waitsecond(0)
  5975. end
  5976.  
  5977. tcase.run(loopTime)
  5978.  
  5979. end
  5980.  
  5981. def self.PIM_5_1_6_3(loopTime)
  5982.  
  5983. tcase = TestCase.new("PIM_5_1_6_3")
  5984.  
  5985. tcase << TestAction.new(:scriptAction_1) do
  5986. i = 0
  5987.  
  5988. gotoAppPixel("Calendar")
  5989.  
  5990. waitsecond(3)
  5991.  
  5992. RUIObject.new.with('objectid', -947681391).with('selfid', -2132232079).with('textdescid', 1447189041).with('uniqueparentid', -648635418)
  5993. .with('uitreeindex', 1)
  5994. .with('classname', 'ImageButton')
  5995. .with('content-desc', 'Show Calendar List and Settings drawer').click
  5996.  
  5997. waitsecond(3)
  5998.  
  5999. RUIObject.new.with('objectid', 1940182694).with('selfid', -657992039).with('textdescid', -1445067654).with('uniqueparentid', 1633433281).with('classresourceid', -498129859)
  6000. .with('uitreeindex', 31)
  6001. .with('classname', 'TextView')
  6002. .with('resource-id', 'com.google.android.calendar:id/label')
  6003. .with('text', 'Month').click
  6004.  
  6005. waitsecond(3)
  6006.  
  6007. uitree.q("android.view.View@@0@").click
  6008.  
  6009. waitsecond(3)
  6010.  
  6011. while i < 5 do
  6012.  
  6013. logStartTest("PIM_5_1_6_3")
  6014.  
  6015. waitsecond(3)
  6016.  
  6017. if i > 0
  6018.  
  6019. uitree.q("android.view.View@@0@").click
  6020.  
  6021. waitsecond(3)
  6022.  
  6023. swipe_horizontal 50
  6024.  
  6025. uitree.q("android.view.View@@0@").click
  6026.  
  6027. waitsecond(3)
  6028.  
  6029. uitree.q("android.view.View@@0@").click
  6030.  
  6031. waitsecond(3)
  6032.  
  6033. uitree.q("android.view.View@@0@").click
  6034.  
  6035. waitsecond(3)
  6036.  
  6037. else
  6038.  
  6039. uitree.q("android.view.View@@0@").click
  6040.  
  6041. waitsecond(3)
  6042.  
  6043. uitree.q("android.view.View@@0@").click
  6044.  
  6045. waitsecond(3)
  6046.  
  6047. end
  6048.  
  6049. RUIObject.new.with('objectid', -1337459766).with('selfid', 1290820192).with('textdescid', -1829626039).with('uniqueparentid', -1060096944)
  6050. .with('uitreeindex', 1)
  6051. .with('classname', 'ImageButton')
  6052. .with('content-desc', 'More options').click
  6053.  
  6054. waitsecond(3)
  6055.  
  6056. RUIObject.new.with('objectid', 1212207054).with('selfid', -342341268).with('textdescid', 1759216995).with('uniqueparentid', -382238014).with('classresourceid', 490183159)
  6057. .with('uitreeindex', 0)
  6058. .with('classname', 'TextView')
  6059. .with('resource-id', 'android:id/title')
  6060. .with('text', 'Delete').click
  6061.  
  6062. waitsecond(3)
  6063.  
  6064. RUIObject.new.with('objectid', 1424815732).with('selfid', 982364851).with('textdescid', 502569513).with('uniqueparentid', -102833181).with('classresourceid', 1834539358)
  6065. .with('uitreeindex', 3)
  6066. .with('classname', 'Button')
  6067. .with('resource-id', 'android:id/button1')
  6068. .with('text', 'DELETE').isExist
  6069.  
  6070. waitsecond(3)
  6071.  
  6072. RUIObject.new.with('objectid', 1424815732).with('selfid', 982364851).with('textdescid', 502569513).with('uniqueparentid', -102833181).with('classresourceid', 1834539358)
  6073. .with('uitreeindex', 3)
  6074. .with('classname', 'Button')
  6075. .with('resource-id', 'android:id/button1')
  6076. .with('text', 'DELETE').click
  6077.  
  6078. waitsecond(3)
  6079.  
  6080. uitree.q("android.view.View@@0@").click
  6081.  
  6082. waitsecond(3)
  6083.  
  6084. $myTestResult = checkLastExistResult
  6085.  
  6086. logStopTest("PIM_5_1_6_3")
  6087.  
  6088.  
  6089. i += 1
  6090. end
  6091.  
  6092. pressBack
  6093. pressHome
  6094.  
  6095. waitsecond(2)
  6096. end
  6097.  
  6098. tcase.run(loopTime)
  6099.  
  6100. end
  6101.  
  6102. def self.PIM_5_1_6_4(loopTime)
  6103.  
  6104. tcase = TestCase.new("PIM_5_1_6_4")
  6105.  
  6106. tcase << TestAction.new(:Start_Log) do
  6107. logStartTest("PIM_5_1_6_4")
  6108.  
  6109. waitsecond(0)
  6110. end
  6111.  
  6112. tcase << TestAction.new(:Clock) do
  6113. gotoAppPixel("Clock")
  6114.  
  6115. waitsecond(2)
  6116. end
  6117.  
  6118. tcase << TestAction.new(:Click_AlarmTab) do
  6119. $ruiObj = RUIObject.new.with('objectid', 1398250823).with('selfid', 1155694879).with('textdescid', -2067701496).with('uniqueparentid', 1343446106)
  6120. .with('uitreeindex', 0)
  6121. .with('classname', 'TextView')
  6122. .with('text', 'ALARM')
  6123.  
  6124. $ruiObj.click
  6125.  
  6126. waitsecond(2)
  6127. end
  6128.  
  6129. tcase << TestAction.new(:Check_Alarm) do
  6130. $ruiObj = RUIObject.new.with('objectid', -1717301025).with('selfid', -1665247246).with('textdescid', -993494140).with('uniqueparentid', 2079641362)
  6131. .with('uitreeindex', 8)
  6132. .with('classname', 'CheckBox')
  6133. .with('resource-id', 'com.google.android.deskclock:id/repeat_onoff')
  6134. .with('text', 'Repeat')
  6135.  
  6136. $ruiObj.isNotExist
  6137. ifFailJumpTo(:Click_Delete)
  6138.  
  6139. waitsecond(0)
  6140. end
  6141.  
  6142. tcase << TestAction.new(:Expand_Alarm) do
  6143. $ruiObj = RUIObject.new.with('objectid', -553129188).with('selfid', 380069409).with('textdescid', 1044151343).with('uniqueparentid', 792291641)
  6144. .with('uitreeindex', 9)
  6145. .with('classname', 'ImageButton')
  6146. .with('resource-id', 'com.google.android.deskclock:id/arrow')
  6147. .with('content-desc', 'Expand alarm')
  6148.  
  6149. $ruiObj.click
  6150.  
  6151. waitsecond(2)
  6152. end
  6153.  
  6154. tcase << TestAction.new(:Click_Delete) do
  6155. $ruiObj = RUIObject.new.with('objectid', 30134492).with('selfid', 16045296).with('textdescid', -946628495).with('uniqueparentid', -53158187)
  6156. .with('uitreeindex', 13)
  6157. .with('classname', 'Button')
  6158. .with('resource-id', 'com.google.android.deskclock:id/delete')
  6159. .with('text', 'Delete')
  6160.  
  6161. $ruiObj.click
  6162.  
  6163. waitsecond(2)
  6164. end
  6165.  
  6166. tcase << TestAction.new(:Check_Delete_DNE) do
  6167. $ruiObj = RUIObject.new.with('objectid', 30134492).with('selfid', 16045296).with('textdescid', -946628495).with('uniqueparentid', -53158187)
  6168. .with('uitreeindex', 13)
  6169. .with('classname', 'Button')
  6170. .with('resource-id', 'com.google.android.deskclock:id/delete')
  6171. .with('text', 'Delete')
  6172.  
  6173. $ruiObj.isExist
  6174.  
  6175. waitsecond(0)
  6176. end
  6177.  
  6178. tcase << TestAction.new(:End_Log) do
  6179. $myTestResult = !checkLastExistResult
  6180.  
  6181. logStopTest("PIM_5_1_6_4")
  6182.  
  6183. waitsecond(0)
  6184. end
  6185.  
  6186. tcase << TestAction.new(:pressBack_10) do
  6187. pressBack
  6188.  
  6189. waitsecond(0)
  6190. end
  6191.  
  6192. tcase << TestAction.new(:pressHome_11) do
  6193. pressHome
  6194.  
  6195. waitsecond(0)
  6196. end
  6197.  
  6198. tcase.run(loopTime)
  6199.  
  6200. end
  6201.  
  6202. def self.mainLoop(loopTime)
  6203.  
  6204. WebSocketXServer.setAutoUpdate(false)
  6205.  
  6206. index = $mainResumeMainLoop
  6207. $mainResumeMainLoop = 0
  6208.  
  6209. writelog("mainLoop::#{index}::Resume") if index > 0
  6210.  
  6211. while index < loopTime
  6212.  
  6213. $curMainLoopNum = index
  6214.  
  6215. $actionParamInput = "none"
  6216. startTest 1
  6217.  
  6218. waitsecond(2)
  6219.  
  6220. $actionParamInput = "none"
  6221. Telephony_5_1_1_1 20
  6222.  
  6223. waitsecond(2)
  6224.  
  6225. $actionParamInput = "none"
  6226. Telephony_5_1_1_2 60
  6227.  
  6228. waitsecond(2)
  6229.  
  6230. $actionParamInput = "none"
  6231. Telephony_5_1_1_3 20
  6232.  
  6233. waitsecond(2)
  6234.  
  6235. $actionParamInput = "none"
  6236. Telephony_5_1_1_4 60
  6237.  
  6238. waitsecond(2)
  6239.  
  6240. $actionParamInput = "none"
  6241. Telephony_5_1_1_6_7 20
  6242.  
  6243. waitsecond(2)
  6244.  
  6245. $actionParamInput = "none"
  6246. Messaging_5_1_2_3 50
  6247.  
  6248. waitsecond(2)
  6249.  
  6250. $actionParamInput = "none"
  6251. Messaging_5_1_2_5 50
  6252.  
  6253. waitsecond(2)
  6254.  
  6255. $actionParamInput = "none"
  6256. Messaging_5_1_2_6 50
  6257.  
  6258. waitsecond(2)
  6259.  
  6260. $actionParamInput = "none"
  6261. Store_Front_5_1_5_1 20
  6262.  
  6263. waitsecond(2)
  6264.  
  6265. $actionParamInput = "none"
  6266. Store_Front_5_1_5_2 10
  6267.  
  6268. waitsecond(2)
  6269.  
  6270. $actionParamInput = "none"
  6271. Store_Front_5_1_5_3 10
  6272.  
  6273. waitsecond(2)
  6274.  
  6275. $actionParamInput = "none"
  6276. PIM_5_1_6_1 1
  6277.  
  6278. waitsecond(2)
  6279.  
  6280. $actionParamInput = "none"
  6281. PIM_5_1_6_2 1
  6282.  
  6283. waitsecond(2)
  6284.  
  6285. $actionParamInput = "none"
  6286. PIM_5_1_6_3 1
  6287.  
  6288. waitsecond(2)
  6289.  
  6290. $actionParamInput = "none"
  6291. PIM_5_1_6_4 1
  6292.  
  6293. waitsecond(2)
  6294.  
  6295. $actionParamInput = "none"
  6296. Multimedia_5_1_7_1 1
  6297.  
  6298. waitsecond(2)
  6299.  
  6300. $actionParamInput = "none"
  6301. Multimedia_5_1_7_2 1
  6302.  
  6303. waitsecond(2)
  6304.  
  6305. $actionParamInput = "none"
  6306. Multimedia_5_1_7_3 1
  6307.  
  6308. waitsecond(2)
  6309.  
  6310. $actionParamInput = "none"
  6311. Multimedia_5_1_7_4 20
  6312.  
  6313. waitsecond(2)
  6314.  
  6315. $actionParamInput = "none"
  6316. Multimedia_5_1_7_5 20
  6317.  
  6318. waitsecond(2)
  6319.  
  6320. $actionParamInput = "none"
  6321. Multimedia_5_1_7_6 20
  6322.  
  6323. waitsecond(2)
  6324.  
  6325. $actionParamInput = "none"
  6326. Multimedia_5_1_7_7 1
  6327.  
  6328. waitsecond(2)
  6329.  
  6330. $actionParamInput = "none"
  6331. Multimedia_5_1_7_8 1
  6332.  
  6333. waitsecond(2)
  6334.  
  6335. $actionParamInput = "none"
  6336. Multimedia_5_1_7_9 1
  6337.  
  6338. waitsecond(2)
  6339.  
  6340. $actionParamInput = "none"
  6341. Multimedia_5_1_7_10 10
  6342.  
  6343. waitsecond(2)
  6344.  
  6345. $actionParamInput = "none"
  6346. Multimedia_5_1_7_11 20
  6347.  
  6348. waitsecond(2)
  6349.  
  6350. $actionParamInput = "none"
  6351. Multimedia_5_1_7_12 50
  6352.  
  6353. waitsecond(2)
  6354.  
  6355. $actionParamInput = "none"
  6356. Multimedia_5_1_7_13 1
  6357.  
  6358. waitsecond(2)
  6359.  
  6360. $actionParamInput = "none"
  6361. MultiTasking_5_1_8_1 1
  6362.  
  6363. waitsecond(2)
  6364.  
  6365. $actionParamInput = "none"
  6366. MultiTasking_5_1_8_2 50
  6367.  
  6368. waitsecond(2)
  6369.  
  6370. $actionParamInput = "none"
  6371. MultiTasking_5_1_8_3 1
  6372.  
  6373. waitsecond(2)
  6374.  
  6375. $actionParamInput = "none"
  6376. MultiTasking_5_1_8_4 1
  6377.  
  6378. waitsecond(2)
  6379.  
  6380. $actionParamInput = "none"
  6381. MultiTasking_5_1_8_5 50
  6382.  
  6383. waitsecond(2)
  6384.  
  6385. $actionParamInput = "none"
  6386. MultiTasking_5_1_8_6 1
  6387.  
  6388. waitsecond(2)
  6389.  
  6390. $actionParamInput = "none"
  6391. MenuNav_5_1_9_1 1
  6392.  
  6393. waitsecond(2)
  6394.  
  6395. $actionParamInput = "none"
  6396. WiFi_5_1_10_1 20
  6397.  
  6398. waitsecond(2)
  6399.  
  6400. $actionParamInput = "none"
  6401. WiFi_5_1_10_2 20
  6402.  
  6403. waitsecond(2)
  6404.  
  6405. $actionParamInput = "none"
  6406. IPME_5_1_15_2 75
  6407.  
  6408. waitsecond(2)
  6409.  
  6410. $actionParamInput = "none"
  6411. IPME_5_1_15_4 75
  6412.  
  6413. waitsecond(2)
  6414.  
  6415.  
  6416. if rand(100) < 0
  6417.  
  6418. $actionParamInput = "none"
  6419. Email_Precondition 1
  6420.  
  6421. waitsecond(2)
  6422.  
  6423. end
  6424.  
  6425.  
  6426. $actionParamInput = "none"
  6427. EMAIL_5_1_3_1 50
  6428.  
  6429. waitsecond(2)
  6430.  
  6431. $actionParamInput = "none"
  6432. EMAIL_5_1_3_2 50
  6433.  
  6434. waitsecond(2)
  6435.  
  6436.  
  6437. if rand(100) < 0
  6438.  
  6439. $actionParamInput = "none"
  6440. Browser_Precondition 1
  6441.  
  6442. waitsecond(2)
  6443.  
  6444. end
  6445.  
  6446.  
  6447. $actionParamInput = "none"
  6448. Browser_5_1_4_1 50
  6449.  
  6450. waitsecond(2)
  6451.  
  6452. $actionParamInput = "none"
  6453. Browser_5_1_4_2 50
  6454.  
  6455. waitsecond(2)
  6456.  
  6457. $actionParamInput = "none"
  6458. Browser_5_1_4_3 10
  6459.  
  6460. waitsecond(2)
  6461.  
  6462. $actionParamInput = "none"
  6463. NFC_5_1_11_1 20
  6464.  
  6465. waitsecond(2)
  6466.  
  6467.  
  6468. sendStatus("Done::mainLoop::Loop::#{index}")
  6469.  
  6470.  
  6471. writelog("Finish::Loop::#{$curMainLoopNum}")
  6472.  
  6473.  
  6474. saveLogFileToGist if $saveLogToGist
  6475.  
  6476. index += 1
  6477.  
  6478. end
  6479.  
  6480. $engineStatus = "Idle"
  6481. resetStatus
  6482. sendStatus("Finish::mainLoop::END")
  6483.  
  6484. end
  6485.  
  6486. def self.Store_Front_5_1_5_1(loopTime)
  6487.  
  6488. tcase = TestCase.new("Store_Front_5_1_5_1")
  6489.  
  6490. tcase << TestAction.new(:Start_Log) do
  6491. logStartTest("Store_Front_5_1_5_1")
  6492.  
  6493. waitsecond(0)
  6494. end
  6495.  
  6496. tcase << TestAction.new(:Play_Store) do
  6497. gotoAppPixel("Play Store")
  6498.  
  6499. waitsecond(2)
  6500. end
  6501.  
  6502. tcase << TestAction.new(:AppSearch_Check) do
  6503. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 42455286)
  6504. .with('uitreeindex', 49)
  6505. .with('classname', 'ImageView')
  6506. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  6507. .with('content-desc', 'Search')
  6508.  
  6509. $ruiObj.isExist
  6510.  
  6511. waitsecond(2)
  6512. end
  6513.  
  6514. tcase << TestAction.new(:pressHome_6) do
  6515. pressHome
  6516.  
  6517. waitsecond(0)
  6518. end
  6519.  
  6520. tcase << TestAction.new(:End_Log) do
  6521. $myTestResult = checkLastExistResult
  6522.  
  6523. logStopTest("Store_Front_5_1_5_1")
  6524.  
  6525. waitsecond(0)
  6526. end
  6527.  
  6528. tcase.run(loopTime)
  6529.  
  6530. end
  6531.  
  6532. def self.Store_Front_5_1_5_2(loopTime)
  6533.  
  6534. tcase = TestCase.new("Store_Front_5_1_5_2")
  6535.  
  6536. tcase << TestAction.new(:Start_Log_5_1_5_2) do
  6537. logStartTest("Store_Front_5_1_5_2")
  6538.  
  6539. waitsecond(0)
  6540. end
  6541.  
  6542. tcase << TestAction.new(:Play_Store_1) do
  6543. gotoAppPixel('Play Store')
  6544.  
  6545. waitsecond(2)
  6546. end
  6547.  
  6548. tcase << TestAction.new(:Click_Search) do
  6549. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 42455286)
  6550. .with('uitreeindex', 49)
  6551. .with('classname', 'ImageView')
  6552. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  6553. .with('content-desc', 'Search')
  6554.  
  6555. $ruiObj.click
  6556.  
  6557. waitsecond(2)
  6558. end
  6559.  
  6560. tcase << TestAction.new(:Input_Search) do
  6561. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 1316281134)
  6562. .with('uitreeindex', 50)
  6563. .with('classname', 'EditText')
  6564. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  6565.  
  6566. $ruiObj.inputtext('Clash Royale')
  6567.  
  6568. waitsecond(2)
  6569. end
  6570.  
  6571. tcase << TestAction.new(:pressEnter_3) do
  6572. pressEnter
  6573.  
  6574. waitsecond(2)
  6575. end
  6576.  
  6577. tcase << TestAction.new(:Click_Clash_Royale) do
  6578. $ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', 911224488).with('textdescid', 1328898808).with('uniqueparentid', 944556771)
  6579. .with('uitreeindex', 1)
  6580. .with('classname', 'TextView')
  6581. .with('resource-id', 'com.android.vending:id/li_title')
  6582. .with('content-desc', 'App: Clash Royale')
  6583. .with('text', 'Clash Royale')
  6584.  
  6585. $ruiObj.click
  6586.  
  6587. waitsecond(2)
  6588. end
  6589.  
  6590. tcase << TestAction.new(:Click_Install) do
  6591. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 998476585).with('textdescid', 915934888).with('uniqueparentid', -349714783)
  6592. .with('uitreeindex', 11)
  6593. .with('classname', 'Button')
  6594. .with('text', 'INSTALL')
  6595.  
  6596. $ruiObj.click
  6597.  
  6598. waitsecond(2)
  6599. end
  6600.  
  6601. tcase << TestAction.new(:Confirm_Install) do
  6602. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1471442810).with('textdescid', 2077853872).with('uniqueparentid', -1070189422)
  6603. .with('uitreeindex', 4)
  6604. .with('classname', 'Button')
  6605. .with('resource-id', 'android:id/button1')
  6606. .with('text', 'PROCEED')
  6607.  
  6608. $ruiObj.click
  6609.  
  6610. waitsecond(2)
  6611. end
  6612.  
  6613. tcase << TestAction.new(:Wait_Loop) do
  6614. count = 0
  6615. waitsecond(4)
  6616. $UninstallStatus = RUIObject.new.with('classname', 'Button').with('text', 'UNINSTALL')
  6617.  
  6618. while ($UninstallStatus.isNotExist) && count < 30 do
  6619. waitsecond(5)
  6620. count += 1
  6621. end
  6622.  
  6623.  
  6624.  
  6625.  
  6626.  
  6627. waitsecond(2)
  6628. end
  6629.  
  6630. tcase << TestAction.new(:Uninstall_Check) do
  6631. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 1103650544).with('textdescid', 926077825).with('uniqueparentid', 488799519)
  6632. .with('uitreeindex', 10)
  6633. .with('classname', 'Button')
  6634. .with('text', 'UNINSTALL')
  6635.  
  6636. $ruiObj.isExist
  6637.  
  6638. waitsecond(0)
  6639. end
  6640.  
  6641. tcase << TestAction.new(:End_Log_5_1_5_2) do
  6642. $myTestResult = checkLastExistResult
  6643.  
  6644. logStopTest("Store_Front_5_1_5_2")
  6645.  
  6646. waitsecond(2)
  6647. end
  6648.  
  6649. tcase << TestAction.new(:Start_Log_5_1_5_5) do
  6650. logStartTest("Store_Front_5_1_5_5")
  6651.  
  6652. waitsecond(2)
  6653. end
  6654.  
  6655. tcase << TestAction.new(:Click_Open) do
  6656. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 343626588).with('textdescid', -876702381).with('uniqueparentid', 488799519)
  6657. .with('uitreeindex', 14)
  6658. .with('classname', 'Button')
  6659. .with('text', 'OPEN')
  6660.  
  6661. $ruiObj.click
  6662.  
  6663. waitsecond(2)
  6664. end
  6665.  
  6666. tcase << TestAction.new(:wait_1) do
  6667. waitsecond(6)
  6668. end
  6669.  
  6670. tcase << TestAction.new(:App_Loop) do
  6671. count = 0
  6672. waitsecond(4)
  6673. $AppStatus = RUIObject.new.with('classname', 'Button').with('resource-id', 'android:id/button1').with('text', 'INSTALL')
  6674.  
  6675. while ($AppStatus.isNotExist) && count < 30 do
  6676. waitsecond(5)
  6677. count += 1
  6678. end
  6679.  
  6680.  
  6681. waitsecond(2)
  6682. end
  6683.  
  6684. tcase << TestAction.new(:Check_App) do
  6685. $ruiObj = RUIObject.new.with('classname', 'Button').with('resource-id', 'android:id/button1').with('text', 'INSTALL')
  6686.  
  6687. $ruiObj.isExist
  6688.  
  6689. waitsecond(0)
  6690. end
  6691.  
  6692. tcase << TestAction.new(:pressHome_10) do
  6693. pressHome
  6694.  
  6695. waitsecond(2)
  6696. end
  6697.  
  6698. tcase << TestAction.new(:End_Log_5_1_5_5) do
  6699. $myTestResult = checkLastExistResult
  6700.  
  6701. logStopTest("Store_Front_5_1_5_5")
  6702.  
  6703. waitsecond(2)
  6704. end
  6705.  
  6706. tcase << TestAction.new(:Start_Log_5_1_5_7) do
  6707. logStartTest("Store_Front_5_1_5_7")
  6708.  
  6709. waitsecond(2)
  6710. end
  6711.  
  6712. tcase << TestAction.new(:Play_Store_2) do
  6713. gotoAppPixel('Play Store')
  6714.  
  6715. waitsecond(2)
  6716. end
  6717.  
  6718. tcase << TestAction.new(:Click_Uninstall) do
  6719. $ruiObj = RUIObject.new.with('objectid', 82686867).with('selfid', -895718918).with('textdescid', 1814403659).with('uniqueparentid', 1781270761)
  6720. .with('uitreeindex', 9)
  6721. .with('classname', 'Button')
  6722. .with('resource-id', 'com.android.vending:id/uninstall_button')
  6723. .with('text', 'UNINSTALL')
  6724.  
  6725. $ruiObj.click
  6726.  
  6727. waitsecond(2)
  6728. end
  6729.  
  6730. tcase << TestAction.new(:Confirm_Uninstall) do
  6731. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', -1645912444)
  6732. .with('uitreeindex', 2)
  6733. .with('classname', 'Button')
  6734. .with('resource-id', 'android:id/button1')
  6735. .with('text', 'OK')
  6736.  
  6737. $ruiObj.click
  6738.  
  6739. waitsecond(2)
  6740. end
  6741.  
  6742. tcase << TestAction.new(:Check_Install) do
  6743. $ruiObj = RUIObject.new.with('objectid', -329901969).with('selfid', -652886121).with('textdescid', 992432790).with('uniqueparentid', -1937838608)
  6744. .with('uitreeindex', 9)
  6745. .with('classname', 'Button')
  6746. .with('resource-id', 'com.android.vending:id/buy_button')
  6747. .with('text', 'INSTALL')
  6748.  
  6749. $ruiObj.isExist
  6750.  
  6751. waitsecond(0)
  6752. end
  6753.  
  6754. tcase << TestAction.new(:End_Log_5_1_5_7) do
  6755. $myTestResult = checkLastExistResult
  6756.  
  6757. logStopTest("Store_Front_5_1_5_7")
  6758.  
  6759. waitsecond(0)
  6760. end
  6761.  
  6762. tcase << TestAction.new(:pressBack_14) do
  6763. pressBack
  6764.  
  6765. waitsecond(0)
  6766. end
  6767.  
  6768. tcase << TestAction.new(:pressBack_14_1) do
  6769. pressBack
  6770.  
  6771. waitsecond(0)
  6772. end
  6773.  
  6774. tcase << TestAction.new(:pressBack_14_1_1) do
  6775. pressBack
  6776.  
  6777. waitsecond(0)
  6778. end
  6779.  
  6780. tcase << TestAction.new(:pressHome_18) do
  6781. pressHome
  6782.  
  6783. waitsecond(0)
  6784. end
  6785.  
  6786. tcase.run(loopTime)
  6787.  
  6788. end
  6789.  
  6790. def self.Store_Front_5_1_5_3(loopTime)
  6791.  
  6792. tcase = TestCase.new("Store_Front_5_1_5_3")
  6793.  
  6794. tcase << TestAction.new(:Start_Log_5_1_5_3) do
  6795. logStartTest("Store_Front_5_1_5_3")
  6796.  
  6797. waitsecond(0)
  6798. end
  6799.  
  6800. tcase << TestAction.new(:Play_Store_1) do
  6801. gotoAppPixel('Play Store')
  6802.  
  6803. waitsecond(2)
  6804. end
  6805.  
  6806. tcase << TestAction.new(:Click_Search) do
  6807. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 42455286)
  6808. .with('uitreeindex', 49)
  6809. .with('classname', 'ImageView')
  6810. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  6811. .with('content-desc', 'Search')
  6812.  
  6813. $ruiObj.click
  6814.  
  6815. waitsecond(2)
  6816. end
  6817.  
  6818. tcase << TestAction.new(:Input_Search) do
  6819. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 1316281134)
  6820. .with('uitreeindex', 50)
  6821. .with('classname', 'EditText')
  6822. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  6823.  
  6824. $ruiObj.inputtext('ColorNote')
  6825.  
  6826. waitsecond(2)
  6827. end
  6828.  
  6829. tcase << TestAction.new(:pressEnter_3) do
  6830. pressEnter
  6831.  
  6832. waitsecond(2)
  6833. end
  6834.  
  6835. tcase << TestAction.new(:Click_Install) do
  6836. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 998476585).with('textdescid', 915934888).with('uniqueparentid', -349714783)
  6837. .with('uitreeindex', 11)
  6838. .with('classname', 'Button')
  6839. .with('text', 'INSTALL')
  6840.  
  6841. $ruiObj.click
  6842.  
  6843. waitsecond(2)
  6844. end
  6845.  
  6846. tcase << TestAction.new(:Confirm_Install) do
  6847. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1471442810).with('textdescid', 2077853872).with('uniqueparentid', -1070189422)
  6848. .with('uitreeindex', 4)
  6849. .with('classname', 'Button')
  6850. .with('resource-id', 'android:id/button1')
  6851. .with('text', 'PROCEED')
  6852.  
  6853. $ruiObj.click
  6854.  
  6855. waitsecond(2)
  6856. end
  6857.  
  6858. tcase << TestAction.new(:scriptAction_2) do
  6859. count = 0
  6860. waitsecond(4)
  6861. $UninstallStatus = RUIObject.new.with('classname', 'Button').with('text', 'UNINSTALL')
  6862.  
  6863. while ($UninstallStatus.isNotExist) && count < 30 do
  6864. waitsecond(5)
  6865. count += 1
  6866. end
  6867.  
  6868. waitsecond(2)
  6869. end
  6870.  
  6871. tcase << TestAction.new(:Check_Unisntall) do
  6872. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 1103650544).with('textdescid', 926077825).with('uniqueparentid', 488799519)
  6873. .with('uitreeindex', 10)
  6874. .with('classname', 'Button')
  6875. .with('text', 'UNINSTALL')
  6876.  
  6877. $ruiObj.isExist
  6878.  
  6879. waitsecond(2)
  6880. end
  6881.  
  6882. tcase << TestAction.new(:End_Log_5_1_5_3) do
  6883. $myTestResult = checkLastExistResult
  6884.  
  6885. logStopTest("Store_Front_5_1_5_3")
  6886.  
  6887. waitsecond(0)
  6888. end
  6889.  
  6890. tcase << TestAction.new(:Start_Log_5_1_5_6) do
  6891. logStartTest("Store_Front_5_1_5_6")
  6892.  
  6893. waitsecond(0)
  6894. end
  6895.  
  6896. tcase << TestAction.new(:Click_Open) do
  6897. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 343626588).with('textdescid', -876702381).with('uniqueparentid', 488799519)
  6898. .with('uitreeindex', 14)
  6899. .with('classname', 'Button')
  6900. .with('text', 'OPEN')
  6901.  
  6902. $ruiObj.click
  6903.  
  6904. waitsecond(2)
  6905. end
  6906.  
  6907. tcase << TestAction.new(:wait_1) do
  6908. waitsecond(4)
  6909. end
  6910.  
  6911. tcase << TestAction.new(:Check_ColorNote) do
  6912. $ruiObj = RUIObject.new.with('objectid', 39336378).with('selfid', -1815503323).with('textdescid', -1889368720).with('uniqueparentid', 2031216929).with('classresourceid', 71951079)
  6913. .with('uitreeindex', 1)
  6914. .with('classname', 'TextView')
  6915. .with('resource-id', 'com.android.packageinstaller:id/permission_message')
  6916. .with('text', 'Allow ColorNote to access photos media and files on your device')
  6917.  
  6918. $ruiObj.isExist
  6919.  
  6920. waitsecond(2)
  6921. end
  6922.  
  6923. tcase << TestAction.new(:pressHome_10) do
  6924. pressHome
  6925.  
  6926. waitsecond(2)
  6927. end
  6928.  
  6929. tcase << TestAction.new(:End_Log_5_1_5_6) do
  6930. $myTestResult = checkLastExistResult
  6931.  
  6932. logStopTest("Store_Front_5_1_5_6")
  6933.  
  6934. waitsecond(0)
  6935. end
  6936.  
  6937. tcase << TestAction.new(:Start_Log_5_1_5_8) do
  6938. logStartTest("Store_Front_5_1_5_8")
  6939.  
  6940. waitsecond(0)
  6941. end
  6942.  
  6943. tcase << TestAction.new(:Play_Store_2) do
  6944. gotoAppPixel('Play Store')
  6945.  
  6946. waitsecond(2)
  6947. end
  6948.  
  6949. tcase << TestAction.new(:Click_Uninstall) do
  6950. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 1103650544).with('textdescid', 926077825).with('uniqueparentid', 488799519)
  6951. .with('uitreeindex', 10)
  6952. .with('classname', 'Button')
  6953. .with('text', 'UNINSTALL')
  6954.  
  6955. $ruiObj.click
  6956.  
  6957. waitsecond(2)
  6958. end
  6959.  
  6960. tcase << TestAction.new(:Confirm_Uninstall) do
  6961. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', -1645912444)
  6962. .with('uitreeindex', 2)
  6963. .with('classname', 'Button')
  6964. .with('resource-id', 'android:id/button1')
  6965. .with('text', 'OK')
  6966.  
  6967. $ruiObj.click
  6968.  
  6969. waitsecond(2)
  6970. end
  6971.  
  6972. tcase << TestAction.new(:Check_Install) do
  6973. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 998476585).with('textdescid', 915934888).with('uniqueparentid', -349714783)
  6974. .with('uitreeindex', 11)
  6975. .with('classname', 'Button')
  6976. .with('text', 'INSTALL')
  6977.  
  6978. $ruiObj.isExist
  6979.  
  6980. waitsecond(2)
  6981. end
  6982.  
  6983. tcase << TestAction.new(:End_Log_5_1_5_8) do
  6984. $myTestResult = checkLastExistResult
  6985.  
  6986. logStopTest("Store_Front_5_1_5_8")
  6987.  
  6988. waitsecond(0)
  6989. end
  6990.  
  6991. tcase << TestAction.new(:pressBack_14) do
  6992. pressBack
  6993.  
  6994. waitsecond(0)
  6995. end
  6996.  
  6997. tcase << TestAction.new(:pressBack_14_1) do
  6998. pressBack
  6999.  
  7000. waitsecond(0)
  7001. end
  7002.  
  7003. tcase << TestAction.new(:pressBack_14_1_1) do
  7004. pressBack
  7005.  
  7006. waitsecond(0)
  7007. end
  7008.  
  7009. tcase << TestAction.new(:pressHome_18) do
  7010. pressHome
  7011.  
  7012. waitsecond(0)
  7013. end
  7014.  
  7015. tcase.run(loopTime)
  7016.  
  7017. end
  7018.  
  7019. def self.Telephony_5_1_1_1(loopTime)
  7020.  
  7021. tcase = TestCase.new("Telephony_5_1_1_1")
  7022.  
  7023. tcase << TestAction.new(:Start_Log) do
  7024. logStartTest("Telephony_5_1_1_1")
  7025.  
  7026. waitsecond(0)
  7027. end
  7028.  
  7029. tcase << TestAction.new(:Settings) do
  7030. gotoSettings
  7031.  
  7032. waitsecond(2)
  7033. end
  7034.  
  7035. tcase << TestAction.new(:Network) do
  7036. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', 1379611054).with('textdescid', 223764122).with('uniqueparentid', 1077985656)
  7037. .with('uitreeindex', 16)
  7038. .with('classname', 'TextView')
  7039. .with('resource-id', 'android:id/title')
  7040. .with('text', 'Network Internet')
  7041.  
  7042. $ruiObj.click
  7043.  
  7044. waitsecond(2)
  7045. end
  7046.  
  7047. tcase << TestAction.new(:Click_MobileNetwork) do
  7048. $ruiObj = RUIObject.new.with('objectid', 1887322852).with('selfid', -194627727).with('textdescid', -38060012).with('uniqueparentid', -1915761805)
  7049. .with('uitreeindex', 10)
  7050. .with('classname', 'TextView')
  7051. .with('resource-id', 'android:id/title')
  7052. .with('text', 'Mobile network')
  7053.  
  7054. $ruiObj.click
  7055.  
  7056. waitsecond(2)
  7057. end
  7058.  
  7059. tcase << TestAction.new(:Click_Preferred) do
  7060. $ruiObj = RUIObject.new.with('objectid', 559310926).with('selfid', 517165292).with('textdescid', 482560099).with('uniqueparentid', -1016225766).with('classresourceid', 490183159)
  7061. .with('uitreeindex', 5)
  7062. .with('classname', 'TextView')
  7063. .with('resource-id', 'android:id/title')
  7064. .with('text', 'Preferred network type')
  7065.  
  7066. $ruiObj.click
  7067.  
  7068. waitsecond(2)
  7069. end
  7070.  
  7071. tcase << TestAction.new(:Click_3G_TMUS) do
  7072. $ruiObj = RUIObject.new.with('objectid', -442050023).with('selfid', 969723944).with('textdescid', -1541834331).with('uniqueparentid', -990483570).with('classresourceid', 2074814108)
  7073. .with('uitreeindex', 3)
  7074. .with('classname', 'CheckedTextView')
  7075. .with('resource-id', 'android:id/text1')
  7076. .with('text', '3G')
  7077.  
  7078. $ruiObj.click
  7079.  
  7080. waitsecond(2)
  7081. end
  7082.  
  7083. tcase << TestAction.new(:Click_LTE_VZW) do
  7084. $ruiObj = RUIObject.new.with('objectid', -442050023).with('selfid', -738079874).with('textdescid', -578669803).with('uniqueparentid', 9112671).with('classresourceid', 2074814108)
  7085. .with('uitreeindex', 3)
  7086. .with('classname', 'CheckedTextView')
  7087. .with('resource-id', 'android:id/text1')
  7088. .with('text', 'LTE CDMA')
  7089.  
  7090. $ruiObj.click
  7091.  
  7092. waitsecond(2)
  7093. end
  7094.  
  7095. tcase << TestAction.new(:Phone) do
  7096. gotoAppPixel("Phone")
  7097.  
  7098. waitsecond(2)
  7099. end
  7100.  
  7101. tcase << TestAction.new(:Check_Send) do
  7102. $ruiObj = RUIObject.new.with('objectid', 633567).with('selfid', -361167454).with('textdescid', -433420335).with('uniqueparentid', -308205312)
  7103. .with('uitreeindex', 27)
  7104. .with('classname', 'ImageButton')
  7105. .with('resource-id', 'com.android.dialer:id/dialpad_floating_action_button')
  7106. .with('content-desc', 'dial')
  7107.  
  7108. $ruiObj.isExist
  7109. ifFailJumpTo(:Click_SearchContacts)
  7110.  
  7111. waitsecond(2)
  7112. end
  7113.  
  7114. tcase << TestAction.new(:pressBack_7) do
  7115. pressBack
  7116.  
  7117. waitsecond(2)
  7118. end
  7119.  
  7120. tcase << TestAction.new(:Click_SearchContacts) do
  7121. $ruiObj = RUIObject.new.with('objectid', 923652289).with('selfid', -1151038352).with('textdescid', 1007284052).with('uniqueparentid', 183054914)
  7122. .with('uitreeindex', 40)
  7123. .with('classname', 'TextView')
  7124. .with('resource-id', 'com.android.dialer:id/search_box_start_search')
  7125. .with('text', 'Search contacts')
  7126.  
  7127. $ruiObj.click
  7128.  
  7129. waitsecond(2)
  7130. end
  7131.  
  7132. tcase << TestAction.new(:Input_A01_A01) do
  7133. $ruiObj = RUIObject.new.with('objectid', 633166156).with('selfid', -1518126622).with('textdescid', -1846685612).with('uniqueparentid', 1793823206)
  7134. .with('uitreeindex', 1)
  7135. .with('classname', 'EditText')
  7136. .with('resource-id', 'com.android.dialer:id/search_view')
  7137.  
  7138. $ruiObj.inputtext('A01 a01')
  7139.  
  7140. waitsecond(2)
  7141. end
  7142.  
  7143. tcase << TestAction.new(:Call_A01_A01) do
  7144. $ruiObj = RUIObject.new.with('objectid', 126478027).with('selfid', -43585994).with('textdescid', -849543187).with('uniqueparentid', 583684266).with('classresourceid', -695489144)
  7145. .with('uitreeindex', 1)
  7146. .with('classname', 'TextView')
  7147. .with('resource-id', 'com.android.dialer:id/cliv_name_textview')
  7148. .with('content-desc', 'A01 a01')
  7149. .with('text', 'A01 a01')
  7150.  
  7151. $ruiObj.click
  7152.  
  7153. waitsecond(8)
  7154. end
  7155.  
  7156. tcase << TestAction.new(:Send_CMD_Answer) do
  7157. sendBTCmd("answerCall")
  7158.  
  7159. waitsecond(8)
  7160. end
  7161.  
  7162. tcase << TestAction.new(:Check_End) do
  7163. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', -1522843237)
  7164. .with('uitreeindex', 13)
  7165. .with('pretext', 'Hold')
  7166. .with('classname', 'ImageButton')
  7167. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  7168. .with('content-desc', 'End call')
  7169.  
  7170. $ruiObj.isExist
  7171.  
  7172. waitsecond(0)
  7173. end
  7174.  
  7175. tcase << TestAction.new(:Click_End) do
  7176. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', 899620027)
  7177. .with('uitreeindex', 13)
  7178. .with('classname', 'ImageButton')
  7179. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  7180. .with('content-desc', 'End call')
  7181.  
  7182. $ruiObj.click
  7183.  
  7184. waitsecond(2)
  7185. end
  7186.  
  7187. tcase << TestAction.new(:Send_CMD_End) do
  7188. sendBTCmd("endCall")
  7189.  
  7190. waitsecond(2)
  7191. end
  7192.  
  7193. tcase << TestAction.new(:End_Log) do
  7194. $myTestResult = checkLastExistResult
  7195.  
  7196. logStopTest("Telephony_5_1_1_1")
  7197.  
  7198. waitsecond(0)
  7199. end
  7200.  
  7201. tcase << TestAction.new(:pressBack_2) do
  7202. pressBack
  7203.  
  7204. waitsecond(2)
  7205. end
  7206.  
  7207. tcase << TestAction.new(:pressBack_2_1) do
  7208. pressBack
  7209.  
  7210. waitsecond(2)
  7211. end
  7212.  
  7213. tcase.run(loopTime)
  7214.  
  7215. end
  7216.  
  7217. def self.Telephony_5_1_1_2(loopTime)
  7218.  
  7219. tcase = TestCase.new("Telephony_5_1_1_2")
  7220.  
  7221. tcase << TestAction.new(:Start_Log) do
  7222. logStartTest("Telephony_5_1_1_2")
  7223.  
  7224. waitsecond(0)
  7225. end
  7226.  
  7227. tcase << TestAction.new(:Settings) do
  7228. gotoSettings
  7229.  
  7230. waitsecond(2)
  7231. end
  7232.  
  7233. tcase << TestAction.new(:Click_Network) do
  7234. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', 1379611054).with('textdescid', 223764122).with('uniqueparentid', 1077985656)
  7235. .with('uitreeindex', 16)
  7236. .with('classname', 'TextView')
  7237. .with('resource-id', 'android:id/title')
  7238. .with('text', 'Network Internet')
  7239.  
  7240. $ruiObj.click
  7241.  
  7242. waitsecond(2)
  7243. end
  7244.  
  7245. tcase << TestAction.new(:Click_Mobile_Network) do
  7246. $ruiObj = RUIObject.new.with('objectid', 1887322852).with('selfid', -194627727).with('textdescid', -38060012).with('uniqueparentid', -1915761805)
  7247. .with('uitreeindex', 10)
  7248. .with('classname', 'TextView')
  7249. .with('resource-id', 'android:id/title')
  7250. .with('text', 'Mobile network')
  7251.  
  7252. $ruiObj.click
  7253.  
  7254. waitsecond(2)
  7255. end
  7256.  
  7257. tcase << TestAction.new(:Click_Preferred) do
  7258. $ruiObj = RUIObject.new.with('objectid', 559310926).with('selfid', 517165292).with('textdescid', 482560099).with('uniqueparentid', -1016225766).with('classresourceid', 490183159)
  7259. .with('uitreeindex', 5)
  7260. .with('classname', 'TextView')
  7261. .with('resource-id', 'android:id/title')
  7262. .with('text', 'Preferred network type')
  7263.  
  7264. $ruiObj.click
  7265.  
  7266. waitsecond(2)
  7267. end
  7268.  
  7269. tcase << TestAction.new(:Click_LTE_TMUS) do
  7270. $ruiObj = RUIObject.new.with('objectid', -442050023).with('selfid', 1679268164).with('textdescid', 1652493263).with('uniqueparentid', -990483570).with('classresourceid', 2074814108)
  7271. .with('uitreeindex', 2)
  7272. .with('classname', 'CheckedTextView')
  7273. .with('resource-id', 'android:id/text1')
  7274. .with('text', 'LTE recommended')
  7275.  
  7276. $ruiObj.click
  7277.  
  7278. waitsecond(2)
  7279. end
  7280.  
  7281. tcase << TestAction.new(:Click_LTE_VZW) do
  7282. $ruiObj = RUIObject.new.with('objectid', -442050023).with('selfid', -196746481).with('textdescid', 587737118).with('uniqueparentid', 9112671).with('classresourceid', 2074814108)
  7283. .with('uitreeindex', 4)
  7284. .with('classname', 'CheckedTextView')
  7285. .with('resource-id', 'android:id/text1')
  7286. .with('text', 'LTE GSM UMTS')
  7287.  
  7288. $ruiObj.click
  7289.  
  7290. waitsecond(2)
  7291. end
  7292.  
  7293. tcase << TestAction.new(:Phone) do
  7294. gotoAppPixel("Phone")
  7295.  
  7296. waitsecond(2)
  7297. end
  7298.  
  7299. tcase << TestAction.new(:Check_Send) do
  7300. $ruiObj = RUIObject.new.with('objectid', 633567).with('selfid', -361167454).with('textdescid', -433420335).with('uniqueparentid', -308205312)
  7301. .with('uitreeindex', 27)
  7302. .with('classname', 'ImageButton')
  7303. .with('resource-id', 'com.android.dialer:id/dialpad_floating_action_button')
  7304. .with('content-desc', 'dial')
  7305.  
  7306. $ruiObj.isExist
  7307. ifFailJumpTo(:Click_SearchContacts)
  7308.  
  7309. waitsecond(2)
  7310. end
  7311.  
  7312. tcase << TestAction.new(:pressBack_8) do
  7313. pressBack
  7314.  
  7315. waitsecond(2)
  7316. end
  7317.  
  7318. tcase << TestAction.new(:Click_SearchContacts) do
  7319. $ruiObj = RUIObject.new.with('objectid', 923652289).with('selfid', -1151038352).with('textdescid', 1007284052).with('uniqueparentid', 183054914)
  7320. .with('uitreeindex', 46)
  7321. .with('classname', 'TextView')
  7322. .with('resource-id', 'com.android.dialer:id/search_box_start_search')
  7323. .with('text', 'Search contacts')
  7324.  
  7325. $ruiObj.click
  7326.  
  7327. waitsecond(2)
  7328. end
  7329.  
  7330. tcase << TestAction.new(:Input_A01_A01) do
  7331. $ruiObj = RUIObject.new.with('objectid', 633166156).with('selfid', -1518126622).with('textdescid', -1846685612).with('uniqueparentid', 1793823206)
  7332. .with('uitreeindex', 1)
  7333. .with('classname', 'EditText')
  7334. .with('resource-id', 'com.android.dialer:id/search_view')
  7335.  
  7336. $ruiObj.inputtext('A01 a01')
  7337.  
  7338. waitsecond(2)
  7339. end
  7340.  
  7341. tcase << TestAction.new(:Click_A01_A01) do
  7342. $ruiObj = RUIObject.new.with('objectid', 126478027).with('selfid', -43585994).with('textdescid', -849543187).with('uniqueparentid', 583684266).with('classresourceid', -695489144)
  7343. .with('uitreeindex', 1)
  7344. .with('classname', 'TextView')
  7345. .with('resource-id', 'com.android.dialer:id/cliv_name_textview')
  7346. .with('content-desc', 'A01 a01')
  7347. .with('text', 'A01 a01')
  7348.  
  7349. $ruiObj.click
  7350.  
  7351. waitsecond(8)
  7352. end
  7353.  
  7354. tcase << TestAction.new(:Send_CMD_Answer) do
  7355. sendBTCmd("answerCall")
  7356.  
  7357. waitsecond(8)
  7358. end
  7359.  
  7360. tcase << TestAction.new(:Check_End) do
  7361. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', -316869413)
  7362. .with('uitreeindex', 13)
  7363. .with('classname', 'ImageButton')
  7364. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  7365. .with('content-desc', 'End call')
  7366.  
  7367. $ruiObj.isExist
  7368.  
  7369. waitsecond(0)
  7370. end
  7371.  
  7372. tcase << TestAction.new(:Click_End) do
  7373. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', 1195855675)
  7374. .with('uitreeindex', 13)
  7375. .with('classname', 'ImageButton')
  7376. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  7377. .with('content-desc', 'End call')
  7378.  
  7379. $ruiObj.click
  7380.  
  7381. waitsecond(2)
  7382. end
  7383.  
  7384. tcase << TestAction.new(:Send_CMD_End) do
  7385. sendBTCmd("endCall")
  7386.  
  7387. waitsecond(2)
  7388. end
  7389.  
  7390. tcase << TestAction.new(:End_Log) do
  7391. $myTestResult = checkLastExistResult
  7392.  
  7393. logStopTest("Telephony_5_1_1_2")
  7394.  
  7395. waitsecond(0)
  7396. end
  7397.  
  7398. tcase << TestAction.new(:pressBack_2) do
  7399. pressBack
  7400.  
  7401. waitsecond(2)
  7402. end
  7403.  
  7404. tcase << TestAction.new(:pressBack_2_1) do
  7405. pressBack
  7406.  
  7407. waitsecond(2)
  7408. end
  7409.  
  7410. tcase.run(loopTime)
  7411.  
  7412. end
  7413.  
  7414. def self.Telephony_5_1_1_3(loopTime)
  7415.  
  7416. tcase = TestCase.new("Telephony_5_1_1_3")
  7417.  
  7418. tcase << TestAction.new(:Start_Log) do
  7419. logStartTest("Telephony_5_1_1_3")
  7420.  
  7421. waitsecond(2)
  7422. end
  7423.  
  7424. tcase << TestAction.new(:Settings) do
  7425. gotoSettings
  7426.  
  7427. waitsecond(2)
  7428. end
  7429.  
  7430. tcase << TestAction.new(:Click_Network) do
  7431. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', 1379611054).with('textdescid', 223764122).with('uniqueparentid', 1077985656)
  7432. .with('uitreeindex', 16)
  7433. .with('classname', 'TextView')
  7434. .with('resource-id', 'android:id/title')
  7435. .with('text', 'Network Internet')
  7436.  
  7437. $ruiObj.click
  7438.  
  7439. waitsecond(2)
  7440. end
  7441.  
  7442. tcase << TestAction.new(:Click_Mobile_Network) do
  7443. $ruiObj = RUIObject.new.with('objectid', 1887322852).with('selfid', -194627727).with('textdescid', -38060012).with('uniqueparentid', -1915761805)
  7444. .with('uitreeindex', 10)
  7445. .with('classname', 'TextView')
  7446. .with('resource-id', 'android:id/title')
  7447. .with('text', 'Mobile network')
  7448.  
  7449. $ruiObj.click
  7450.  
  7451. waitsecond(2)
  7452. end
  7453.  
  7454. tcase << TestAction.new(:Click_Preferred) do
  7455. $ruiObj = RUIObject.new.with('objectid', 559310926).with('selfid', 517165292).with('textdescid', 482560099).with('uniqueparentid', -1016225766).with('classresourceid', 490183159)
  7456. .with('uitreeindex', 5)
  7457. .with('classname', 'TextView')
  7458. .with('resource-id', 'android:id/title')
  7459. .with('text', 'Preferred network type')
  7460.  
  7461. $ruiObj.click
  7462.  
  7463. waitsecond(2)
  7464. end
  7465.  
  7466. tcase << TestAction.new(:Click_3G_TMUS) do
  7467. $ruiObj = RUIObject.new.with('objectid', -442050023).with('selfid', 969723944).with('textdescid', -1541834331).with('uniqueparentid', -990483570).with('classresourceid', 2074814108)
  7468. .with('uitreeindex', 3)
  7469. .with('classname', 'CheckedTextView')
  7470. .with('resource-id', 'android:id/text1')
  7471. .with('text', '3G')
  7472.  
  7473. $ruiObj.click
  7474.  
  7475. waitsecond(2)
  7476. end
  7477.  
  7478. tcase << TestAction.new(:Click_CDMA_VZW) do
  7479. $ruiObj = RUIObject.new.with('objectid', -442050023).with('selfid', -738079874).with('textdescid', -578669803).with('uniqueparentid', 9112671).with('classresourceid', 2074814108)
  7480. .with('uitreeindex', 3)
  7481. .with('classname', 'CheckedTextView')
  7482. .with('resource-id', 'android:id/text1')
  7483. .with('text', 'LTE CDMA')
  7484.  
  7485. $ruiObj.click
  7486.  
  7487. waitsecond(2)
  7488. end
  7489.  
  7490. tcase << TestAction.new(:Phone) do
  7491. gotoAppPixel("Phone")
  7492.  
  7493. waitsecond(2)
  7494. end
  7495.  
  7496. tcase << TestAction.new(:Check_Send) do
  7497. $ruiObj = RUIObject.new.with('objectid', 633567).with('selfid', -361167454).with('textdescid', -433420335).with('uniqueparentid', -308205312)
  7498. .with('uitreeindex', 27)
  7499. .with('classname', 'ImageButton')
  7500. .with('resource-id', 'com.android.dialer:id/dialpad_floating_action_button')
  7501. .with('content-desc', 'dial')
  7502.  
  7503. $ruiObj.isExist
  7504. ifFailJumpTo(:Click_History)
  7505.  
  7506. waitsecond(2)
  7507. end
  7508.  
  7509. tcase << TestAction.new(:pressBack_4) do
  7510. pressBack
  7511.  
  7512. waitsecond(2)
  7513. end
  7514.  
  7515. tcase << TestAction.new(:Click_History) do
  7516. $ruiObj = RUIObject.new.with('objectid', 1729076897).with('selfid', 1544291637).with('textdescid', 126528520).with('uniqueparentid', -905047454)
  7517. .with('uitreeindex', 1)
  7518. .with('classname', 'ImageView')
  7519. .with('resource-id', 'com.android.dialer:id/icon')
  7520. .with('content-desc', 'Call History tab.')
  7521.  
  7522. $ruiObj.click
  7523.  
  7524. waitsecond(2)
  7525. end
  7526.  
  7527. tcase << TestAction.new(:Call_A01_A01) do
  7528. $ruiObj = RUIObject.new.with('objectid', -275416008).with('selfid', 1174798435).with('textdescid', 530045898).with('uniqueparentid', -1421306337)
  7529. .with('uitreeindex', 8)
  7530. .with('pretext', 'Mobile 2 min ago')
  7531. .with('classname', 'ImageView')
  7532. .with('resource-id', 'com.android.dialer:id/primary_action_button')
  7533. .with('content-desc', 'Call A01 a01')
  7534.  
  7535. $ruiObj.click
  7536.  
  7537. waitsecond(8)
  7538. end
  7539.  
  7540. tcase << TestAction.new(:Send_CMD_Answer) do
  7541. sendBTCmd("answerCall")
  7542.  
  7543. waitsecond(8)
  7544. end
  7545.  
  7546. tcase << TestAction.new(:Check_End) do
  7547. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', -1050162627)
  7548. .with('uitreeindex', 13)
  7549. .with('classname', 'ImageButton')
  7550. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  7551. .with('content-desc', 'End call')
  7552.  
  7553. $ruiObj.isExist
  7554.  
  7555. waitsecond(0)
  7556. end
  7557.  
  7558. tcase << TestAction.new(:Click_End) do
  7559. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', 0)
  7560. .with('uitreeindex', 13)
  7561. .with('classname', 'ImageButton')
  7562. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  7563. .with('content-desc', 'End call')
  7564.  
  7565. $ruiObj.click
  7566.  
  7567. waitsecond(2)
  7568. end
  7569.  
  7570. tcase << TestAction.new(:scriptAction_2) do
  7571. sendBTCmd("endCall")
  7572.  
  7573. waitsecond(2)
  7574. end
  7575.  
  7576. tcase << TestAction.new(:End_Log) do
  7577. $myTestResult = checkLastExistResult
  7578.  
  7579. logStopTest("Telephony_5_1_1_3")
  7580.  
  7581. waitsecond(2)
  7582. end
  7583.  
  7584. tcase << TestAction.new(:pressBack_6) do
  7585. pressBack
  7586.  
  7587. waitsecond(2)
  7588. end
  7589.  
  7590. tcase << TestAction.new(:pressBack_6_1) do
  7591. pressBack
  7592.  
  7593. waitsecond(2)
  7594. end
  7595.  
  7596. tcase.run(loopTime)
  7597.  
  7598. end
  7599.  
  7600. def self.Telephony_5_1_1_4(loopTime)
  7601.  
  7602. tcase = TestCase.new("Telephony_5_1_1_4")
  7603.  
  7604. tcase << TestAction.new(:Start_Log) do
  7605. logStartTest("Telephony_5_1_1_4")
  7606.  
  7607. waitsecond(0)
  7608. end
  7609.  
  7610. tcase << TestAction.new(:Settings) do
  7611. gotoSettings
  7612.  
  7613. waitsecond(2)
  7614. end
  7615.  
  7616. tcase << TestAction.new(:Click_Network) do
  7617. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', 1379611054).with('textdescid', 223764122).with('uniqueparentid', 1077985656)
  7618. .with('uitreeindex', 16)
  7619. .with('classname', 'TextView')
  7620. .with('resource-id', 'android:id/title')
  7621. .with('text', 'Network Internet')
  7622.  
  7623. $ruiObj.click
  7624.  
  7625. waitsecond(2)
  7626. end
  7627.  
  7628. tcase << TestAction.new(:Click_Mobile_Network) do
  7629. $ruiObj = RUIObject.new.with('objectid', 1887322852).with('selfid', -194627727).with('textdescid', -38060012).with('uniqueparentid', -1915761805)
  7630. .with('uitreeindex', 10)
  7631. .with('classname', 'TextView')
  7632. .with('resource-id', 'android:id/title')
  7633. .with('text', 'Mobile network')
  7634.  
  7635. $ruiObj.click
  7636.  
  7637. waitsecond(2)
  7638. end
  7639.  
  7640. tcase << TestAction.new(:Click_Preferred) do
  7641. $ruiObj = RUIObject.new.with('objectid', 559310926).with('selfid', 517165292).with('textdescid', 482560099).with('uniqueparentid', -1016225766).with('classresourceid', 490183159)
  7642. .with('uitreeindex', 5)
  7643. .with('classname', 'TextView')
  7644. .with('resource-id', 'android:id/title')
  7645. .with('text', 'Preferred network type')
  7646.  
  7647. $ruiObj.click
  7648.  
  7649. waitsecond(2)
  7650. end
  7651.  
  7652. tcase << TestAction.new(:Click_LTE_TMUS) do
  7653. $ruiObj = RUIObject.new.with('objectid', -442050023).with('selfid', 1679268164).with('textdescid', 1652493263).with('uniqueparentid', -990483570).with('classresourceid', 2074814108)
  7654. .with('uitreeindex', 2)
  7655. .with('classname', 'CheckedTextView')
  7656. .with('resource-id', 'android:id/text1')
  7657. .with('text', 'LTE recommended')
  7658.  
  7659. $ruiObj.click
  7660.  
  7661. waitsecond(2)
  7662. end
  7663.  
  7664. tcase << TestAction.new(:Click_LTE_VZW) do
  7665. $ruiObj = RUIObject.new.with('objectid', -442050023).with('selfid', -196746481).with('textdescid', 587737118).with('uniqueparentid', 9112671).with('classresourceid', 2074814108)
  7666. .with('uitreeindex', 4)
  7667. .with('classname', 'CheckedTextView')
  7668. .with('resource-id', 'android:id/text1')
  7669. .with('text', 'LTE GSM UMTS')
  7670.  
  7671. $ruiObj.click
  7672.  
  7673. waitsecond(2)
  7674. end
  7675.  
  7676. tcase << TestAction.new(:Phone) do
  7677. gotoAppPixel("Phone")
  7678.  
  7679. waitsecond(2)
  7680. end
  7681.  
  7682. tcase << TestAction.new(:Check_Send) do
  7683. $ruiObj = RUIObject.new.with('objectid', 633567).with('selfid', -361167454).with('textdescid', -433420335).with('uniqueparentid', -308205312)
  7684. .with('uitreeindex', 27)
  7685. .with('classname', 'ImageButton')
  7686. .with('resource-id', 'com.android.dialer:id/dialpad_floating_action_button')
  7687. .with('content-desc', 'dial')
  7688.  
  7689. $ruiObj.isExist
  7690. ifFailJumpTo(:Click_History)
  7691.  
  7692. waitsecond(2)
  7693. end
  7694.  
  7695. tcase << TestAction.new(:pressBack_10) do
  7696. pressBack
  7697.  
  7698. waitsecond(2)
  7699. end
  7700.  
  7701. tcase << TestAction.new(:Click_History) do
  7702. $ruiObj = RUIObject.new.with('objectid', 1729076897).with('selfid', 1544291637).with('textdescid', 126528520).with('uniqueparentid', -905047454)
  7703. .with('uitreeindex', 1)
  7704. .with('classname', 'ImageView')
  7705. .with('resource-id', 'com.android.dialer:id/icon')
  7706. .with('content-desc', 'Call History tab.')
  7707.  
  7708. $ruiObj.click
  7709.  
  7710. waitsecond(2)
  7711. end
  7712.  
  7713. tcase << TestAction.new(:Call_A01_A01) do
  7714. $ruiObj = RUIObject.new.with('objectid', -275416008).with('selfid', 1174798435).with('textdescid', 530045898).with('uniqueparentid', -1421306337)
  7715. .with('uitreeindex', 8)
  7716. .with('pretext', 'Mobile 2 min ago')
  7717. .with('classname', 'ImageView')
  7718. .with('resource-id', 'com.android.dialer:id/primary_action_button')
  7719. .with('content-desc', 'Call A01 a01')
  7720.  
  7721. $ruiObj.click
  7722.  
  7723. waitsecond(8)
  7724. end
  7725.  
  7726. tcase << TestAction.new(:Send_CMD_Answer) do
  7727. sendBTCmd("answerCall")
  7728.  
  7729. waitsecond(8)
  7730. end
  7731.  
  7732. tcase << TestAction.new(:Check_End) do
  7733. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', -1050162627)
  7734. .with('uitreeindex', 13)
  7735. .with('classname', 'ImageButton')
  7736. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  7737. .with('content-desc', 'End call')
  7738.  
  7739. $ruiObj.isExist
  7740.  
  7741. waitsecond(0)
  7742. end
  7743.  
  7744. tcase << TestAction.new(:Click_End) do
  7745. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', 0)
  7746. .with('uitreeindex', 13)
  7747. .with('classname', 'ImageButton')
  7748. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  7749. .with('content-desc', 'End call')
  7750.  
  7751. $ruiObj.click
  7752.  
  7753. waitsecond(2)
  7754. end
  7755.  
  7756. tcase << TestAction.new(:Send_CMD_End) do
  7757. sendBTCmd("endCall")
  7758.  
  7759. waitsecond(2)
  7760. end
  7761.  
  7762. tcase << TestAction.new(:End_Log) do
  7763. $myTestResult = checkLastExistResult
  7764.  
  7765. logStopTest("Telephony_5_1_1_4")
  7766.  
  7767. waitsecond(0)
  7768. end
  7769.  
  7770. tcase << TestAction.new(:pressBack_5) do
  7771. pressBack
  7772.  
  7773. waitsecond(2)
  7774. end
  7775.  
  7776. tcase << TestAction.new(:pressBack_5_1) do
  7777. pressBack
  7778.  
  7779. waitsecond(2)
  7780. end
  7781.  
  7782. tcase.run(loopTime)
  7783.  
  7784. end
  7785.  
  7786. def self.Telephony_5_1_1_5(loopTime)
  7787.  
  7788. tcase = TestCase.new("Telephony_5_1_1_5")
  7789.  
  7790. tcase << TestAction.new(:Start_Log) do
  7791. logStartTest("Telephony_5_1_1_5")
  7792.  
  7793. waitsecond(0)
  7794. end
  7795.  
  7796. tcase << TestAction.new(:Settings) do
  7797. gotoSettings
  7798.  
  7799. waitsecond(2)
  7800. end
  7801.  
  7802. tcase << TestAction.new(:Click_Network) do
  7803. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', 1379611054).with('textdescid', 223764122).with('uniqueparentid', 1077985656)
  7804. .with('uitreeindex', 16)
  7805. .with('classname', 'TextView')
  7806. .with('resource-id', 'android:id/title')
  7807. .with('text', 'Network Internet')
  7808.  
  7809. $ruiObj.click
  7810.  
  7811. waitsecond(2)
  7812. end
  7813.  
  7814. tcase << TestAction.new(:Click_Mobile_Network) do
  7815. $ruiObj = RUIObject.new.with('objectid', 1887322852).with('selfid', -194627727).with('textdescid', -38060012).with('uniqueparentid', -1915761805)
  7816. .with('uitreeindex', 10)
  7817. .with('classname', 'TextView')
  7818. .with('resource-id', 'android:id/title')
  7819. .with('text', 'Mobile network')
  7820.  
  7821. $ruiObj.click
  7822.  
  7823. waitsecond(2)
  7824. end
  7825.  
  7826. tcase << TestAction.new(:Click_Preferred) do
  7827. $ruiObj = RUIObject.new.with('objectid', 559310926).with('selfid', 517165292).with('textdescid', 482560099).with('uniqueparentid', -1016225766).with('classresourceid', 490183159)
  7828. .with('uitreeindex', 5)
  7829. .with('classname', 'TextView')
  7830. .with('resource-id', 'android:id/title')
  7831. .with('text', 'Preferred network type')
  7832.  
  7833. $ruiObj.click
  7834.  
  7835. waitsecond(2)
  7836. end
  7837.  
  7838. tcase << TestAction.new(:Click_LTE_TMUS) do
  7839. $ruiObj = RUIObject.new.with('objectid', -442050023).with('selfid', 1679268164).with('textdescid', 1652493263).with('uniqueparentid', -990483570).with('classresourceid', 2074814108)
  7840. .with('uitreeindex', 2)
  7841. .with('classname', 'CheckedTextView')
  7842. .with('resource-id', 'android:id/text1')
  7843. .with('text', 'LTE recommended')
  7844.  
  7845. $ruiObj.click
  7846.  
  7847. waitsecond(2)
  7848. end
  7849.  
  7850. tcase << TestAction.new(:Click_LTE_VZW) do
  7851. $ruiObj = RUIObject.new.with('objectid', -442050023).with('selfid', -196746481).with('textdescid', 587737118).with('uniqueparentid', 9112671).with('classresourceid', 2074814108)
  7852. .with('uitreeindex', 4)
  7853. .with('classname', 'CheckedTextView')
  7854. .with('resource-id', 'android:id/text1')
  7855. .with('text', 'LTE GSM UMTS')
  7856.  
  7857. $ruiObj.click
  7858.  
  7859. waitsecond(2)
  7860. end
  7861.  
  7862. tcase << TestAction.new(:Send_CMD_Phone) do
  7863. sendBTCmd("gotoApp('Phone')")
  7864.  
  7865. waitsecond(2)
  7866. end
  7867.  
  7868. tcase << TestAction.new(:Send_CMD_Click_Dialer) do
  7869. sendBTCmd("RUIObject.new.with('classname', 'TextView').with('text', 'Dial').click")
  7870.  
  7871. waitsecond(2)
  7872. end
  7873.  
  7874. tcase << TestAction.new(:Send_CMD_Input_DB) do
  7875. sendBTCmd("RUIObject.new.with('classname', 'EditText').inputtext('#{db('CallNumber')[0]}')")
  7876.  
  7877. waitsecond(2)
  7878. end
  7879.  
  7880. tcase << TestAction.new(:Send_CMD_Call) do
  7881. sendBTCmd("RUIObject.new.with('classname', 'ImageButton').with('content-desc', 'Call').click")
  7882.  
  7883. waitsecond(8)
  7884. end
  7885.  
  7886. tcase << TestAction.new(:Refresh) do
  7887. refreshScreen
  7888.  
  7889. waitsecond(2)
  7890. end
  7891.  
  7892. tcase << TestAction.new(:Answer_Call) do
  7893. click(1048.5,409.5)
  7894.  
  7895. waitsecond(8)
  7896. end
  7897.  
  7898. tcase << TestAction.new(:Check_End) do
  7899. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', -909340709)
  7900. .with('uitreeindex', 13)
  7901. .with('classname', 'ImageButton')
  7902. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  7903. .with('content-desc', 'End call')
  7904.  
  7905. $ruiObj.isExist
  7906.  
  7907. waitsecond(0)
  7908. end
  7909.  
  7910. tcase << TestAction.new(:Click_End) do
  7911. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', -909340709)
  7912. .with('uitreeindex', 13)
  7913. .with('classname', 'ImageButton')
  7914. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  7915. .with('content-desc', 'End call')
  7916.  
  7917. $ruiObj.click
  7918.  
  7919. waitsecond(2)
  7920. end
  7921.  
  7922. tcase << TestAction.new(:Send_CMD_End) do
  7923. sendBTCmd("endCall")
  7924.  
  7925. waitsecond(2)
  7926. end
  7927.  
  7928. tcase << TestAction.new(:Stop_Log) do
  7929. $myTestResult = checkLastExistResult
  7930.  
  7931. logStopTest("Telephony_5_1_1_5")
  7932.  
  7933. waitsecond(0)
  7934. end
  7935.  
  7936. tcase << TestAction.new(:pressBack_2) do
  7937. pressBack
  7938.  
  7939. waitsecond(2)
  7940. end
  7941.  
  7942. tcase << TestAction.new(:pressBack_2_1) do
  7943. pressBack
  7944.  
  7945. waitsecond(2)
  7946. end
  7947.  
  7948. tcase.run(loopTime)
  7949.  
  7950. end
  7951.  
  7952. def self.Telephony_5_1_1_6_7(loopTime)
  7953.  
  7954. tcase = TestCase.new("Telephony_5_1_1_6_7")
  7955.  
  7956. tcase << TestAction.new(:scriptAction_2) do
  7957. logStartTest("Telephony_5_1_1_7")
  7958.  
  7959. waitsecond(0)
  7960. end
  7961.  
  7962. tcase << TestAction.new(:scriptAction_1) do
  7963. gotoAppPixel("Phone")
  7964.  
  7965. waitsecond(2)
  7966. end
  7967.  
  7968. tcase << TestAction.new(:ImageView_Icon_29) do
  7969. $ruiObj = RUIObject.new.with('objectid', 1729076897).with('selfid', -1616608746).with('textdescid', -1107521081).with('uniqueparentid', -1902824159)
  7970. .with('uitreeindex', 2)
  7971. .with('classname', 'ImageView')
  7972. .with('resource-id', 'com.android.dialer:id/icon')
  7973. .with('content-desc', 'Contacts tab.')
  7974.  
  7975. $ruiObj.click
  7976.  
  7977. waitsecond(2)
  7978. end
  7979.  
  7980. tcase << TestAction.new(:ImageButton_FloatingActionButton_41) do
  7981. $ruiObj = RUIObject.new.with('objectid', -563620762).with('selfid', 586481042).with('textdescid', 1205026070).with('uniqueparentid', -529133278)
  7982. .with('uitreeindex', 28)
  7983. .with('classname', 'ImageButton')
  7984. .with('resource-id', 'com.android.dialer:id/floating_action_button')
  7985. .with('content-desc', 'Create new contact')
  7986.  
  7987. $ruiObj.click
  7988.  
  7989. waitsecond(2)
  7990. end
  7991.  
  7992. tcase << TestAction.new(:EditText_6) do
  7993. $ruiObj = RUIObject.new.with('objectid', 819811840).with('selfid', 1666676343).with('textdescid', -355636704).with('uniqueparentid', 1682676351).with('classresourceid', 1666676343)
  7994. .with('uitreeindex', 12)
  7995. .with('pretext', 'lgeqcttest4gmailcom?0')
  7996. .with('classname', 'EditText')
  7997.  
  7998. $ruiObj.inputtext('tn tn')
  7999.  
  8000. waitsecond(2)
  8001. end
  8002.  
  8003. tcase << TestAction.new(:ImageView_KindIcon_18) do
  8004. $ruiObj = RUIObject.new.with('objectid', 1187803482).with('selfid', 565066917).with('textdescid', -854093455).with('uniqueparentid', 833678705).with('classresourceid', -301662486)
  8005. .with('uitreeindex', 11)
  8006. .with('classname', 'ImageView')
  8007. .with('resource-id', 'com.google.android.contacts:id/kind_icon')
  8008. .with('content-desc', 'Name')
  8009.  
  8010. $ruiObj.click
  8011.  
  8012. waitsecond(2)
  8013. end
  8014.  
  8015. tcase << TestAction.new(:EditText_20) do
  8016. $ruiObj = RUIObject.new.with('objectid', 819811840).with('selfid', 1666676343).with('textdescid', -355636704).with('uniqueparentid', 301757543).with('classresourceid', 1666676343)
  8017. .with('uitreeindex', 16)
  8018. .with('pretext', 'lgeqcttest4gmailcom?2')
  8019. .with('classname', 'EditText')
  8020.  
  8021. $ruiObj.inputtext('0000000000')
  8022.  
  8023. waitsecond(2)
  8024. end
  8025.  
  8026. tcase << TestAction.new(:Button_EditorMenuSaveButton_22) do
  8027. $ruiObj = RUIObject.new.with('objectid', -1708784447).with('selfid', -1130240991).with('textdescid', -1687078364).with('uniqueparentid', 2006790125)
  8028. .with('uitreeindex', 2)
  8029. .with('classname', 'Button')
  8030. .with('resource-id', 'com.google.android.contacts:id/editor_menu_save_button')
  8031. .with('text', 'SAVE')
  8032.  
  8033. $ruiObj.isExist
  8034.  
  8035. waitsecond(0)
  8036. end
  8037.  
  8038. tcase << TestAction.new(:Button_EditorMenuSaveButton_22_1) do
  8039. $ruiObj = RUIObject.new.with('objectid', -1708784447).with('selfid', -1130240991).with('textdescid', -1687078364).with('uniqueparentid', 2006790125)
  8040. .with('uitreeindex', 2)
  8041. .with('classname', 'Button')
  8042. .with('resource-id', 'com.google.android.contacts:id/editor_menu_save_button')
  8043. .with('text', 'SAVE')
  8044.  
  8045. $ruiObj.click
  8046.  
  8047. waitsecond(2)
  8048. end
  8049.  
  8050. tcase << TestAction.new(:scriptAction_4) do
  8051. logStopTest("Telephony_5_1_1_7")
  8052.  
  8053. waitsecond(0)
  8054. end
  8055.  
  8056. tcase << TestAction.new(:scriptAction_2_1) do
  8057. logStartTest("Telephony_5_1_1_6")
  8058.  
  8059. waitsecond(0)
  8060. end
  8061.  
  8062. tcase << TestAction.new(:scriptAction_12) do
  8063. gotoAppPixel("Phone")
  8064.  
  8065. waitsecond(2)
  8066. end
  8067.  
  8068. tcase << TestAction.new(:ImageView_Icon_3) do
  8069. $ruiObj = RUIObject.new.with('objectid', 1729076897).with('selfid', -1616608746).with('textdescid', -1107521081).with('uniqueparentid', -1902824159)
  8070. .with('uitreeindex', 2)
  8071. .with('classname', 'ImageView')
  8072. .with('resource-id', 'com.android.dialer:id/icon')
  8073. .with('content-desc', 'Contacts tab.')
  8074.  
  8075. $ruiObj.click
  8076.  
  8077. waitsecond(2)
  8078. end
  8079.  
  8080. tcase << TestAction.new(:TextView_SearchBoxStartSearch_5) do
  8081. $ruiObj = RUIObject.new.with('objectid', 923652289).with('selfid', -1151038352).with('textdescid', 1007284052).with('uniqueparentid', 183054914)
  8082. .with('uitreeindex', 30)
  8083. .with('classname', 'TextView')
  8084. .with('resource-id', 'com.android.dialer:id/search_box_start_search')
  8085. .with('text', 'Search contacts')
  8086.  
  8087. $ruiObj.click
  8088.  
  8089. waitsecond(2)
  8090. end
  8091.  
  8092. tcase << TestAction.new(:EditText_SearchView_9) do
  8093. $ruiObj = RUIObject.new.with('objectid', 633166156).with('selfid', -1518126622).with('textdescid', -1846685612).with('uniqueparentid', 1793823206)
  8094. .with('uitreeindex', 1)
  8095. .with('classname', 'EditText')
  8096. .with('resource-id', 'com.android.dialer:id/search_view')
  8097.  
  8098. $ruiObj.inputtext('tn tn')
  8099.  
  8100. waitsecond(2)
  8101. end
  8102.  
  8103. tcase << TestAction.new(:clickXY_117_441_17) do
  8104. click(117,441)
  8105.  
  8106. waitsecond(2)
  8107. end
  8108.  
  8109. tcase << TestAction.new(:ImageButton_More_19) do
  8110. $ruiObj = RUIObject.new.with('objectid', 1906984818).with('selfid', 1290820192).with('textdescid', 1695157921).with('uniqueparentid', 1370851987)
  8111. .with('uitreeindex', 6)
  8112. .with('classname', 'ImageButton')
  8113. .with('content-desc', 'More options')
  8114.  
  8115. $ruiObj.click
  8116.  
  8117. waitsecond(2)
  8118. end
  8119.  
  8120. tcase << TestAction.new(:TextView_Title_21) do
  8121. $ruiObj = RUIObject.new.with('objectid', -374621661).with('selfid', -342341268).with('textdescid', -931837256).with('uniqueparentid', 749545879).with('classresourceid', 490183159)
  8122. .with('uitreeindex', 1)
  8123. .with('classname', 'TextView')
  8124. .with('resource-id', 'android:id/title')
  8125. .with('text', 'Delete')
  8126.  
  8127. $ruiObj.click
  8128.  
  8129. waitsecond(2)
  8130. end
  8131.  
  8132. tcase << TestAction.new(:Button_Button1_23) do
  8133. $ruiObj = RUIObject.new.with('objectid', 1890289855).with('selfid', 982364851).with('textdescid', 319664500).with('uniqueparentid', 864646072).with('classresourceid', 1834539358)
  8134. .with('uitreeindex', 3)
  8135. .with('classname', 'Button')
  8136. .with('resource-id', 'android:id/button1')
  8137. .with('text', 'DELETE')
  8138.  
  8139. $ruiObj.isExist
  8140.  
  8141. waitsecond(0)
  8142. end
  8143.  
  8144. tcase << TestAction.new(:Button_Button1_23_1) do
  8145. $ruiObj = RUIObject.new.with('objectid', 1890289855).with('selfid', 982364851).with('textdescid', 319664500).with('uniqueparentid', 864646072).with('classresourceid', 1834539358)
  8146. .with('uitreeindex', 3)
  8147. .with('classname', 'Button')
  8148. .with('resource-id', 'android:id/button1')
  8149. .with('text', 'DELETE')
  8150.  
  8151. $ruiObj.click
  8152.  
  8153. waitsecond(2)
  8154. end
  8155.  
  8156. tcase << TestAction.new(:scriptAction_4_1) do
  8157. logStopTest("Telephony_5_1_1_6")
  8158.  
  8159. waitsecond(0)
  8160. end
  8161.  
  8162. tcase.run(loopTime)
  8163.  
  8164. end
  8165.  
  8166. def self.WiFi_5_1_10_1(loopTime)
  8167.  
  8168. tcase = TestCase.new("WiFi_5_1_10_1")
  8169.  
  8170. tcase << TestAction.new(:logstart) do
  8171. logStartTest("05_01_10_01_WiFi")
  8172.  
  8173. waitsecond(0)
  8174. end
  8175.  
  8176. tcase << TestAction.new(:Settings) do
  8177. gotoAppPixel("Settings")
  8178.  
  8179. waitsecond(2)
  8180. end
  8181.  
  8182. tcase << TestAction.new(:clicknetwork) do
  8183. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', 1379611054).with('textdescid', 223764122).with('uniqueparentid', 1077985656)
  8184. .with('uitreeindex', 10)
  8185. .with('classname', 'TextView')
  8186. .with('resource-id', 'android:id/title')
  8187. .with('text', 'Network Internet')
  8188.  
  8189. $ruiObj.click
  8190.  
  8191. waitsecond(2)
  8192. end
  8193.  
  8194. tcase << TestAction.new(:clickwifi) do
  8195. $ruiObj = RUIObject.new.with('objectid', 1887322852).with('selfid', -589731018).with('textdescid', 1307010863).with('uniqueparentid', 2137399017)
  8196. .with('uitreeindex', 5)
  8197. .with('classname', 'TextView')
  8198. .with('resource-id', 'android:id/title')
  8199. .with('text', 'WiFi')
  8200.  
  8201. $ruiObj.click
  8202.  
  8203. waitsecond(2)
  8204. end
  8205.  
  8206. tcase << TestAction.new(:ifwifiison_turnoffwifi) do
  8207. $WiFiOn= RUIObject.new.with('objectid', -312510337).with('selfid', 1955659484).with('textdescid', -940514592).with('uniqueparentid', 2062568066)
  8208. .with('uitreeindex', 3)
  8209. .with('classname', 'TextView')
  8210. .with('resource-id', 'com.android.settings:id/switch_text')
  8211. .with('text', 'On')
  8212.  
  8213. if $WiFiOn.isExist
  8214. RUIObject.new.with('objectid', 1169510804).with('selfid', -1921366703).with('textdescid', -522574443).with('uniqueparentid', 2062568066)
  8215. .with('uitreeindex', 4)
  8216. .with('classname', 'Switch')
  8217. .with('resource-id', 'com.android.settings:id/switch_widget')
  8218. .with('text', 'ON').click
  8219. return true
  8220. end
  8221.  
  8222. waitsecond(2)
  8223. end
  8224.  
  8225. tcase << TestAction.new(:TurnOnWifi) do
  8226. $ruiObj = RUIObject.new.with('objectid', 1169510804).with('selfid', -1921366703).with('textdescid', -522574443).with('uniqueparentid', 2062568066)
  8227. .with('uitreeindex', 4)
  8228. .with('classname', 'Switch')
  8229. .with('resource-id', 'com.android.settings:id/switch_widget')
  8230. .with('text', 'ON')
  8231.  
  8232. $ruiObj.click
  8233.  
  8234. waitsecond(2)
  8235. end
  8236.  
  8237. tcase << TestAction.new(:wait10second_4) do
  8238. waitsecond(10)
  8239. end
  8240.  
  8241. tcase << TestAction.new(:ON_Exist) do
  8242. $ruiObj = RUIObject.new.with('objectid', -312510337).with('selfid', 1955659484).with('textdescid', -940514592).with('uniqueparentid', 2062568066)
  8243. .with('uitreeindex', 2)
  8244. .with('classname', 'TextView')
  8245. .with('resource-id', 'com.android.settings:id/switch_text')
  8246. .with('text', 'On')
  8247.  
  8248. $ruiObj.isExist
  8249.  
  8250. waitsecond(0)
  8251. end
  8252.  
  8253. tcase << TestAction.new(:TurnoffWifi) do
  8254. $ruiObj = RUIObject.new.with('objectid', 1169510804).with('selfid', -1921366703).with('textdescid', -522574443).with('uniqueparentid', 2062568066)
  8255. .with('uitreeindex', 3)
  8256. .with('classname', 'Switch')
  8257. .with('resource-id', 'com.android.settings:id/switch_widget')
  8258. .with('text', 'ON')
  8259.  
  8260. $ruiObj.click
  8261.  
  8262. waitsecond(2)
  8263. end
  8264.  
  8265. tcase << TestAction.new(:stoplog) do
  8266. $myTestResult = checkLastExistResult
  8267.  
  8268. if $myTestResult == false
  8269. $myFailReason = "WiFi cannot turn ON"
  8270. end
  8271. logStopTest("05_01_10_01_WiFi")
  8272.  
  8273.  
  8274. waitsecond(0)
  8275. end
  8276.  
  8277. tcase << TestAction.new(:pressBack_8) do
  8278. pressBack
  8279.  
  8280. waitsecond(0)
  8281. end
  8282.  
  8283. tcase << TestAction.new(:pressBack_9) do
  8284. pressBack
  8285.  
  8286. waitsecond(0)
  8287. end
  8288.  
  8289. tcase << TestAction.new(:pressBack_10) do
  8290. pressBack
  8291.  
  8292. waitsecond(0)
  8293. end
  8294.  
  8295. tcase << TestAction.new(:pressBack_11) do
  8296. pressBack
  8297.  
  8298. waitsecond(0)
  8299. end
  8300.  
  8301. tcase << TestAction.new(:pressHome_12) do
  8302. pressHome
  8303.  
  8304. waitsecond(0)
  8305. end
  8306.  
  8307. tcase.run(loopTime)
  8308.  
  8309. end
  8310.  
  8311. def self.WiFi_5_1_10_2(loopTime)
  8312.  
  8313. tcase = TestCase.new("WiFi_5_1_10_2")
  8314.  
  8315. tcase << TestAction.new(:logstart) do
  8316. logStartTest("05_01_10_02_WiFi")
  8317.  
  8318. waitsecond(0)
  8319. end
  8320.  
  8321. tcase << TestAction.new(:Settings) do
  8322. gotoAppPixel("Settings")
  8323.  
  8324. waitsecond(2)
  8325. end
  8326.  
  8327. tcase << TestAction.new(:clicknetwork) do
  8328. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', 1379611054).with('textdescid', 223764122).with('uniqueparentid', 1077985656)
  8329. .with('uitreeindex', 10)
  8330. .with('classname', 'TextView')
  8331. .with('resource-id', 'android:id/title')
  8332. .with('text', 'Network Internet')
  8333.  
  8334. $ruiObj.click
  8335.  
  8336. waitsecond(2)
  8337. end
  8338.  
  8339. tcase << TestAction.new(:clickwifi) do
  8340. $ruiObj = RUIObject.new.with('objectid', 1887322852).with('selfid', -589731018).with('textdescid', 1307010863).with('uniqueparentid', 2137399017)
  8341. .with('uitreeindex', 5)
  8342. .with('classname', 'TextView')
  8343. .with('resource-id', 'android:id/title')
  8344. .with('text', 'WiFi')
  8345.  
  8346. $ruiObj.click
  8347.  
  8348. waitsecond(2)
  8349. end
  8350.  
  8351. tcase << TestAction.new(:ifwifiison_turnoffwifi) do
  8352. $WiFiOn= RUIObject.new.with('objectid', -312510337).with('selfid', 1955659484).with('textdescid', -940514592).with('uniqueparentid', 2062568066)
  8353. .with('uitreeindex', 3)
  8354. .with('classname', 'TextView')
  8355. .with('resource-id', 'com.android.settings:id/switch_text')
  8356. .with('text', 'On')
  8357.  
  8358. if $WiFiOn.isExist
  8359. RUIObject.new.with('objectid', 1169510804).with('selfid', -1921366703).with('textdescid', -522574443).with('uniqueparentid', 2062568066)
  8360. .with('uitreeindex', 4)
  8361. .with('classname', 'Switch')
  8362. .with('resource-id', 'com.android.settings:id/switch_widget')
  8363. .with('text', 'ON').click
  8364. return true
  8365. end
  8366.  
  8367. waitsecond(2)
  8368. end
  8369.  
  8370. tcase << TestAction.new(:TurnOnWifi) do
  8371. $ruiObj = RUIObject.new.with('objectid', 1169510804).with('selfid', -1921366703).with('textdescid', -522574443).with('uniqueparentid', 2062568066)
  8372. .with('uitreeindex', 4)
  8373. .with('classname', 'Switch')
  8374. .with('resource-id', 'com.android.settings:id/switch_widget')
  8375. .with('text', 'ON')
  8376.  
  8377. $ruiObj.click
  8378.  
  8379. waitsecond(2)
  8380. end
  8381.  
  8382. tcase << TestAction.new(:wait5second_4) do
  8383. waitsecond(5)
  8384. end
  8385.  
  8386. tcase << TestAction.new(:clickMTBFATT24GHZ) do
  8387. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', -2006843326).with('textdescid', 445555028).with('uniqueparentid', -1447642125)
  8388. .with('uitreeindex', 21)
  8389. .with('classname', 'TextView')
  8390. .with('resource-id', 'android:id/title')
  8391. .with('text', 'MTBFATT24Ghz')
  8392.  
  8393. $ruiObj.click
  8394.  
  8395. waitsecond(2)
  8396. end
  8397.  
  8398. tcase << TestAction.new(:TurnoffWifi) do
  8399. $ruiObj = RUIObject.new.with('objectid', 1169510804).with('selfid', -1921366703).with('textdescid', -522574443).with('uniqueparentid', 2062568066)
  8400. .with('uitreeindex', 3)
  8401. .with('classname', 'Switch')
  8402. .with('resource-id', 'com.android.settings:id/switch_widget')
  8403. .with('text', 'ON')
  8404.  
  8405. $ruiObj.click
  8406.  
  8407. waitsecond(2)
  8408. end
  8409.  
  8410. tcase << TestAction.new(:putpassword) do
  8411. $ruiObj = RUIObject.new.with('objectid', 780695774).with('selfid', 8195995).with('textdescid', -1568234750).with('uniqueparentid', -1143128344).with('classresourceid', 1413676103)
  8412. .with('uitreeindex', 2)
  8413. .with('classname', 'EditText')
  8414. .with('resource-id', 'com.android.settings:id/password')
  8415.  
  8416. $ruiObj.inputtext('12abcdef34')
  8417.  
  8418. waitsecond(2)
  8419. end
  8420.  
  8421. tcase << TestAction.new(:pressEnter_13) do
  8422. pressEnter
  8423.  
  8424. waitsecond(2)
  8425. end
  8426.  
  8427. tcase << TestAction.new(:wait5second_15) do
  8428. waitsecond(5)
  8429. end
  8430.  
  8431. tcase << TestAction.new(:ifconnectedexist) do
  8432. $ruiObj = RUIObject.new.with('objectid', -2037966493).with('selfid', -404041766).with('textdescid', 656334132).with('uniqueparentid', 589819388)
  8433. .with('uitreeindex', 7)
  8434. .with('classname', 'TextView')
  8435. .with('resource-id', 'android:id/summary')
  8436. .with('text', 'Connected')
  8437.  
  8438. $ruiObj.isExist
  8439.  
  8440. waitsecond(2)
  8441. end
  8442.  
  8443. tcase << TestAction.new(:gotowifisetting) do
  8444. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', -2006843326).with('textdescid', 445555028).with('uniqueparentid', 589819388)
  8445. .with('uitreeindex', 6)
  8446. .with('classname', 'TextView')
  8447. .with('resource-id', 'android:id/title')
  8448. .with('text', 'MTBFATT24Ghz')
  8449.  
  8450. $ruiObj.click
  8451.  
  8452. waitsecond(2)
  8453. end
  8454.  
  8455. tcase << TestAction.new(:disconnectwifi) do
  8456. $ruiObj = RUIObject.new.with('objectid', 699987448).with('selfid', 2030417820).with('textdescid', 281870763).with('uniqueparentid', -1500304950)
  8457. .with('uitreeindex', 4)
  8458. .with('classname', 'Button')
  8459. .with('resource-id', 'com.android.settings:id/left_button')
  8460. .with('text', 'FORGET')
  8461.  
  8462. $ruiObj.click
  8463.  
  8464. waitsecond(2)
  8465. end
  8466.  
  8467. tcase << TestAction.new(:stoplog) do
  8468. $myTestResult = checkLastExistResult
  8469.  
  8470. if $myTestResult == false
  8471. $myFailReason == "WiFi cannot connected"
  8472. end
  8473. logStopTest("05_01_10_02_WiFi")
  8474.  
  8475.  
  8476. waitsecond(0)
  8477. end
  8478.  
  8479. tcase << TestAction.new(:pressBack_8) do
  8480. pressBack
  8481.  
  8482. waitsecond(0)
  8483. end
  8484.  
  8485. tcase << TestAction.new(:pressBack_9) do
  8486. pressBack
  8487.  
  8488. waitsecond(0)
  8489. end
  8490.  
  8491. tcase << TestAction.new(:pressBack_10) do
  8492. pressBack
  8493.  
  8494. waitsecond(0)
  8495. end
  8496.  
  8497. tcase << TestAction.new(:pressBack_11) do
  8498. pressBack
  8499.  
  8500. waitsecond(0)
  8501. end
  8502.  
  8503. tcase << TestAction.new(:pressHome_12) do
  8504. pressHome
  8505.  
  8506. waitsecond(0)
  8507. end
  8508.  
  8509. tcase.run(loopTime)
  8510.  
  8511. end
  8512.  
  8513. def self.startTest(loopTime)
  8514.  
  8515. tcase = TestCase.new("startTest")
  8516.  
  8517. tcase << TestAction.new(:blankaction) do
  8518. waitsecond(0)
  8519. end
  8520.  
  8521. tcase.run(loopTime)
  8522.  
  8523. end
  8524.  
  8525. def self.Messaging_5_1_2_6(loopTime)
  8526.  
  8527. tcase = TestCase.new("Messaging_5_1_2_6")
  8528.  
  8529. tcase << TestAction.new(:LogStart) do
  8530. logStartTest('Messaging_5_1_2_6')
  8531.  
  8532. waitsecond(0)
  8533. end
  8534.  
  8535. tcase << TestAction.new(:goto_Messages) do
  8536. gotoAppPixel('Messages')
  8537.  
  8538. waitsecond(2)
  8539. end
  8540.  
  8541. tcase << TestAction.new(:Open_New_Message) do
  8542. $ruiObj = RUIObject.new.with('objectid', 764419066).with('selfid', 916878134).with('textdescid', 48640071).with('uniqueparentid', 1408873138)
  8543. .with('uitreeindex', 6)
  8544. .with('classname', 'ImageView')
  8545. .with('resource-id', 'com.google.android.apps.messaging:id/start_new_conversation_button')
  8546. .with('content-desc', 'Start new conversation')
  8547.  
  8548. $ruiObj.click
  8549.  
  8550. waitsecond(2)
  8551. end
  8552.  
  8553. tcase << TestAction.new(:Select_Recipient) do
  8554. $ruiObj = RUIObject.new.with('objectid', 1212228391).with('selfid', 1084775715).with('textdescid', -604433803).with('uniqueparentid', 1087733730).with('classresourceid', -848607765)
  8555. .with('uitreeindex', 20)
  8556. .with('classname', 'TextView')
  8557. .with('resource-id', 'com.google.android.apps.messaging:id/contact_name')
  8558. .with('text', 'A01 a01')
  8559.  
  8560. $ruiObj.click
  8561.  
  8562. waitsecond(2)
  8563. end
  8564.  
  8565. tcase << TestAction.new(:Input_Message_Text) do
  8566. $inputText = RUIObject.new.with('objectid', 839697618).with('selfid', -1932318364).with('textdescid', 260822414).with('uniqueparentid', 1032254030)
  8567. .with('uitreeindex', 8)
  8568. .with('classname', 'EditText')
  8569. .with('resource-id', 'com.google.android.apps.messaging:id/compose_message_text')
  8570.  
  8571. $inputText.inputtext('Abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzaaaaaaaaaabbbbbbbbbbcccccccccc')
  8572.  
  8573. waitsecond(2)
  8574. end
  8575.  
  8576. tcase << TestAction.new(:Add_Attachment) do
  8577. $ruiObj = RUIObject.new.with('objectid', -1360420814).with('selfid', -952088716).with('textdescid', 1847611113).with('uniqueparentid', 1631420680)
  8578. .with('uitreeindex', 7)
  8579. .with('classname', 'ImageButton')
  8580. .with('resource-id', 'com.google.android.apps.messaging:id/attach_media_button')
  8581. .with('content-desc', 'Add an attachment')
  8582.  
  8583. $ruiObj.click
  8584.  
  8585. waitsecond(2)
  8586. end
  8587.  
  8588. tcase << TestAction.new(:Navigate_Pictures) do
  8589. $ruiObj = RUIObject.new.with('objectid', 1408822083).with('selfid', 538927602).with('textdescid', 531479902).with('uniqueparentid', -1874692983)
  8590. .with('uitreeindex', 19)
  8591. .with('classname', 'ImageButton')
  8592. .with('content-desc', 'Choose images from this device')
  8593.  
  8594. $ruiObj.click
  8595.  
  8596. waitsecond(2)
  8597. end
  8598.  
  8599. tcase << TestAction.new(:Allow_Permission) do
  8600. $ruiObj = RUIObject.new.with('objectid', -655699299).with('selfid', -1852985786).with('textdescid', -1480420102).with('uniqueparentid', -2002661991)
  8601. .with('uitreeindex', 13)
  8602. .with('classname', 'TextView')
  8603. .with('resource-id', 'com.google.android.apps.messaging:id/missing_permission_enable')
  8604. .with('text', 'ALLOW')
  8605.  
  8606. $ruiObj.click
  8607.  
  8608. waitsecond(2)
  8609. end
  8610.  
  8611. tcase << TestAction.new(:Accept_Permission) do
  8612. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  8613. .with('uitreeindex', 3)
  8614. .with('classname', 'Button')
  8615. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  8616. .with('text', 'ALLOW')
  8617.  
  8618. $ruiObj.click
  8619.  
  8620. waitsecond(2)
  8621. end
  8622.  
  8623. tcase << TestAction.new(:Expand_Attachments) do
  8624. swipe(getDisplayWidth/2, getDisplayHeight - 50, getDisplayWidth/2, getDisplayHeight/4, 10)
  8625.  
  8626. waitsecond(2)
  8627. end
  8628.  
  8629. tcase << TestAction.new(:Select_Picture) do
  8630. $ruiObj = RUIObject.new.with('objectid', 210721229).with('selfid', 372442942).with('textdescid', 1772734819).with('uniqueparentid', -153679189)
  8631. .with('uitreeindex', 16)
  8632. .with('classname', 'ImageView')
  8633. .with('resource-id', 'com.google.android.apps.messaging:id/image')
  8634. .with('content-desc', 'image January 1 2017 7 12 am')
  8635.  
  8636. $ruiObj.select('Similiar').click
  8637.  
  8638. waitsecond(2)
  8639. end
  8640.  
  8641. tcase << TestAction.new(:Collapse_Attachments) do
  8642. swipe(getDisplayWidth/2, getDisplayHeight/4, getDisplayWidth/2, getDisplayHeight, 10)
  8643. swipe(getDisplayWidth/2, getDisplayHeight/4, getDisplayWidth/2, getDisplayHeight, 10)
  8644.  
  8645. waitsecond(2)
  8646. end
  8647.  
  8648. tcase << TestAction.new(:Send_Message) do
  8649. $ruiObj = RUIObject.new.with('objectid', 874675584).with('selfid', -1214465728).with('textdescid', 1345139360).with('uniqueparentid', 1105097632)
  8650. .with('uitreeindex', 10)
  8651. .with('classname', 'ImageView')
  8652. .with('resource-id', 'com.google.android.apps.messaging:id/send_message_button_icon')
  8653.  
  8654. $ruiObj.click
  8655.  
  8656. waitsecond(2)
  8657. end
  8658.  
  8659. tcase << TestAction.new(:Wait_Sent_Confirmation) do
  8660. $sentMMS = RUIObject.new.with('objectid', -1223562103).with('selfid', 893316915).with('textdescid', 1281233763).with('uniqueparentid', 807778548)
  8661. .with('uitreeindex', 4)
  8662. .with('classname', 'TextView')
  8663. .with('text', 'Now MMS')
  8664.  
  8665. $count = 0
  8666.  
  8667. while $sentMMS.isNotExist && $count < 30
  8668. waitsecond(1)
  8669. $count += 1
  8670. puts $count
  8671. end
  8672.  
  8673. waitsecond(2)
  8674. end
  8675.  
  8676. tcase << TestAction.new(:Sent_Confirmation) do
  8677. $ruiObj = RUIObject.new.with('objectid', -1223562103).with('selfid', 893316915).with('textdescid', 1281233763).with('uniqueparentid', 807778548)
  8678. .with('uitreeindex', 4)
  8679. .with('classname', 'TextView')
  8680. .with('text', 'Now MMS')
  8681.  
  8682. $ruiObj.isExist
  8683.  
  8684. waitsecond(0)
  8685. end
  8686.  
  8687. tcase << TestAction.new(:Test_Result) do
  8688. $myTestResult = checkLastExistResult
  8689.  
  8690. waitsecond(0)
  8691. end
  8692.  
  8693. tcase << TestAction.new(:Press_Back) do
  8694. pressBack
  8695.  
  8696. waitsecond(2)
  8697. end
  8698.  
  8699. tcase << TestAction.new(:Exit_Conversation) do
  8700. $ruiObj = RUIObject.new.with('objectid', 1425651979).with('selfid', -123872605).with('textdescid', 1768877749).with('uniqueparentid', -1261979652)
  8701. .with('uitreeindex', 9)
  8702. .with('classname', 'ImageButton')
  8703. .with('content-desc', 'Navigate up')
  8704.  
  8705. $ruiObj.click
  8706.  
  8707. waitsecond(2)
  8708. end
  8709.  
  8710. tcase << TestAction.new(:Select_Conversation) do
  8711. $ruiObj = RUIObject.new.with('objectid', 201599363).with('selfid', -373146860).with('textdescid', 648115097).with('uniqueparentid', 138155849)
  8712. .with('uitreeindex', 6)
  8713. .with('classname', 'TextView')
  8714. .with('resource-id', 'com.google.android.apps.messaging:id/conversation_name')
  8715. .with('text', 'A01 a01')
  8716.  
  8717. $ruiObj.longClick
  8718.  
  8719. waitsecond(2)
  8720. end
  8721.  
  8722. tcase << TestAction.new(:Delete_Conversation) do
  8723. $ruiObj = RUIObject.new.with('objectid', 1400187979).with('selfid', -1174101288).with('textdescid', -1369143488).with('uniqueparentid', 112203385)
  8724. .with('uitreeindex', 2)
  8725. .with('classname', 'TextView')
  8726. .with('resource-id', 'com.google.android.apps.messaging:id/action_delete')
  8727. .with('content-desc', 'Delete')
  8728.  
  8729. $ruiObj.click
  8730.  
  8731. waitsecond(2)
  8732. end
  8733.  
  8734. tcase << TestAction.new(:Confirm_Delete_Conversation) do
  8735. $ruiObj = RUIObject.new.with('objectid', -968538326).with('selfid', 982364851).with('textdescid', -2103192353).with('uniqueparentid', -1643928723).with('classresourceid', 1834539358)
  8736. .with('uitreeindex', 2)
  8737. .with('classname', 'Button')
  8738. .with('resource-id', 'android:id/button1')
  8739. .with('text', 'DELETE')
  8740.  
  8741. $ruiObj.click
  8742.  
  8743. waitsecond(2)
  8744. end
  8745.  
  8746. tcase << TestAction.new(:LogStop) do
  8747. logStopTest('Messaging_5_1_2_6')
  8748.  
  8749. waitsecond(0)
  8750. end
  8751.  
  8752. tcase << TestAction.new(:Press_Back_1) do
  8753. pressBack
  8754. waitsecond(1)
  8755. pressBack
  8756.  
  8757. waitsecond(2)
  8758. end
  8759.  
  8760. tcase.run(loopTime)
  8761.  
  8762. end
  8763.  
  8764. def self.exception_handler
  8765. puts "Module Exception Hanlder..."
  8766. end
  8767.  
  8768. def self.run(loop)
  8769. mainLoop loop
  8770. end
  8771.  
  8772. end
  8773.  
  8774. $exceptionPackageNameList = []
  8775. $exceptionPackageNameList_exclude = []
  8776.  
  8777. def exception_handler
  8778. SNOWBIRD_MTBF.exception_handler
  8779. end
  8780.  
  8781. $curProjectLogFile = $useLastLogFile
  8782.  
  8783. $curProjectLogFile = "SNOWBIRD_MTBF_#{getTimeStamp}.log" if $useLastLogFile.nil?
  8784.  
  8785. $useLastLogFile = nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement