Advertisement
Guest User

Untitled

a guest
May 19th, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 246.80 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.MultiTasking_5_1_8_1(loopTime)
  3019.  
  3020. tcase = TestCase.new("MultiTasking_5_1_8_1")
  3021.  
  3022. tcase << TestAction.new(:LogStart) do
  3023. logStartTest("MultiTasking_5_1_8_1")
  3024.  
  3025. waitsecond(0)
  3026. end
  3027.  
  3028. tcase << TestAction.new(:goto_Phone) do
  3029. gotoAppPixel('Phone')
  3030.  
  3031. waitsecond(2)
  3032. end
  3033.  
  3034. tcase << TestAction.new(:View_Contacts) do
  3035. $ruiObj = RUIObject.new.with('objectid', 1729076897).with('selfid', -1616608746).with('textdescid', -1107521081).with('uniqueparentid', -1902824159)
  3036. .with('uitreeindex', 2)
  3037. .with('classname', 'ImageView')
  3038. .with('resource-id', 'com.android.dialer:id/icon')
  3039. .with('content-desc', 'Contacts tab.')
  3040.  
  3041. $ruiObj.click
  3042.  
  3043. waitsecond(2)
  3044. end
  3045.  
  3046. tcase << TestAction.new(:Search_A01) do
  3047. scrollAndSearchText('A01 a01', 1000)
  3048.  
  3049. waitsecond(2)
  3050. end
  3051.  
  3052. tcase << TestAction.new(:Select_Contact_A01a01) do
  3053. $ruiObj = RUIObject.new.with('objectid', -667564700).with('selfid', -43585994).with('textdescid', 89720436).with('uniqueparentid', -497841051).with('classresourceid', -695489144)
  3054. .with('uitreeindex', 6)
  3055. .with('classname', 'TextView')
  3056. .with('resource-id', 'com.android.dialer:id/cliv_name_textview')
  3057. .with('content-desc', 'A01 a01')
  3058. .with('text', 'A01 a01')
  3059.  
  3060. $ruiObj.click
  3061.  
  3062. waitsecond(2)
  3063. end
  3064.  
  3065. tcase << TestAction.new(:Start_Voice_Call) do
  3066. $ruiObj = RUIObject.new.with('objectid', 921547951).with('selfid', 692509261).with('textdescid', -1496784559).with('uniqueparentid', -1243726177).with('classresourceid', 457622547)
  3067. .with('uitreeindex', 8)
  3068. .with('classname', 'ImageView')
  3069. .with('resource-id', 'com.google.android.contacts:id/icon')
  3070.  
  3071. $ruiObj.click
  3072.  
  3073. waitsecond(8)
  3074. end
  3075.  
  3076. tcase << TestAction.new(:Slave_Answer_Call) do
  3077. sendBTCmd('answerCall')
  3078.  
  3079. waitsecond(2)
  3080. end
  3081.  
  3082. tcase << TestAction.new(:Check_End) do
  3083. $ruiObj = RUIObject.new.with('objectid', 2131066002).with('selfid', 279498384).with('textdescid', -733664719).with('uniqueparentid', 15085754)
  3084. .with('uitreeindex', 3)
  3085. .with('pretext', 'OK')
  3086. .with('classname', 'ImageButton')
  3087. .with('resource-id', 'com.google.android.dialer:id/incall_end_call')
  3088. .with('content-desc', 'End call')
  3089.  
  3090. $ruiObj.isExist
  3091.  
  3092. waitsecond(0)
  3093. end
  3094.  
  3095. tcase << TestAction.new(:LogStop) do
  3096. $myTestResult = checkLastExistResult
  3097.  
  3098. logStopTest("MultiTasking_5_1_8_1")
  3099.  
  3100. waitsecond(0)
  3101. end
  3102.  
  3103. tcase.run(loopTime)
  3104.  
  3105. end
  3106.  
  3107. def self.MultiTasking_5_1_8_2(loopTime)
  3108.  
  3109. tcase = TestCase.new("MultiTasking_5_1_8_2")
  3110.  
  3111. tcase << TestAction.new(:LogStart) do
  3112. logStartTest("MultiTasking_5_1_8_2")
  3113.  
  3114. waitsecond(0)
  3115. end
  3116.  
  3117. tcase << TestAction.new(:goto_Contacts) do
  3118. gotoAppPixel('Contacts')
  3119.  
  3120. waitsecond(5)
  3121. end
  3122.  
  3123. tcase << TestAction.new(:goto_Messages) do
  3124. gotoAppPixel('Messages')
  3125.  
  3126. waitsecond(5)
  3127. end
  3128.  
  3129. tcase << TestAction.new(:goto_Phone) do
  3130. gotoAppPixel('Phone')
  3131.  
  3132. waitsecond(5)
  3133. end
  3134.  
  3135. tcase << TestAction.new(:goto_PlayStore) do
  3136. gotoAppPixel("Play Store")
  3137.  
  3138. waitsecond(5)
  3139. end
  3140.  
  3141. tcase << TestAction.new(:goto_Camera) do
  3142. gotoAppPixel('Camera')
  3143.  
  3144. waitsecond(5)
  3145. end
  3146.  
  3147. tcase << TestAction.new(:goto_Chrome) do
  3148. gotoAppPixel('Chrome')
  3149.  
  3150. waitsecond(5)
  3151. end
  3152.  
  3153. tcase << TestAction.new(:Chrome_Check_Menu) do
  3154. $ruiObj = RUIObject.new.with('objectid', 286278959).with('selfid', -17041368).with('textdescid', 536559428).with('uniqueparentid', -1426174679)
  3155. .with('uitreeindex', 29)
  3156. .with('classname', 'ImageButton')
  3157. .with('resource-id', 'com.android.chrome:id/menu_button')
  3158. .with('content-desc', 'More options')
  3159.  
  3160. $ruiObj.isExist
  3161.  
  3162. waitsecond(0)
  3163. end
  3164.  
  3165. tcase << TestAction.new(:LogStop) do
  3166. $myTestResult = checkLastExistResult
  3167.  
  3168. logStopTest("MultiTasking_5_1_8_2")
  3169.  
  3170. waitsecond(0)
  3171. end
  3172.  
  3173. tcase.run(loopTime)
  3174.  
  3175. end
  3176.  
  3177. def self.MultiTasking_5_1_8_3(loopTime)
  3178.  
  3179. tcase = TestCase.new("MultiTasking_5_1_8_3")
  3180.  
  3181. tcase << TestAction.new(:LogStart) do
  3182. logStartTest("MultiTasking_5_1_8_3")
  3183.  
  3184. waitsecond(0)
  3185. end
  3186.  
  3187. tcase << TestAction.new(:goto_Phone) do
  3188. gotoAppPixel('Phone')
  3189.  
  3190. waitsecond(2)
  3191. end
  3192.  
  3193. tcase << TestAction.new(:Return_Call_Progress) do
  3194. $ruiObj = RUIObject.new.with('objectid', -1049390963).with('selfid', 938939901).with('textdescid', 420774450).with('uniqueparentid', 2054641712).with('classresourceid', -526721384)
  3195. .with('uitreeindex', 5)
  3196. .with('classname', 'TextView')
  3197. .with('resource-id', 'com.android.dialer:id/text')
  3198. .with('text', 'Return to call in progress')
  3199.  
  3200. $ruiObj.click
  3201.  
  3202. waitsecond(2)
  3203. end
  3204.  
  3205. tcase << TestAction.new(:End_Call) do
  3206. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', -2124691094)
  3207. .with('uitreeindex', 13)
  3208. .with('classname', 'ImageButton')
  3209. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  3210. .with('content-desc', 'End call')
  3211.  
  3212. $ruiObj.click
  3213.  
  3214. waitsecond(2)
  3215. end
  3216.  
  3217. tcase << TestAction.new(:Check_Test) do
  3218. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', -2124691094)
  3219. .with('uitreeindex', 13)
  3220. .with('classname', 'ImageButton')
  3221. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  3222. .with('content-desc', 'End call')
  3223.  
  3224. $ruiObj.isExist
  3225.  
  3226. waitsecond(0)
  3227. end
  3228.  
  3229. tcase << TestAction.new(:LogStop) do
  3230. $myTestResult = checkLastExistResult
  3231.  
  3232. logStopTest("MultiTasking_5_1_8_3")
  3233.  
  3234. waitsecond(0)
  3235. end
  3236.  
  3237. tcase.run(loopTime)
  3238.  
  3239. end
  3240.  
  3241. def self.MultiTasking_5_1_8_4(loopTime)
  3242.  
  3243. tcase = TestCase.new("MultiTasking_5_1_8_4")
  3244.  
  3245. tcase << TestAction.new(:LogStart) do
  3246. logStartTest("MultiTasking_5_1_8_4")
  3247.  
  3248. waitsecond(0)
  3249. end
  3250.  
  3251. tcase << TestAction.new(:goto_Chrome) do
  3252. gotoAppPixel('Chrome')
  3253.  
  3254. waitsecond(2)
  3255. end
  3256.  
  3257. tcase << TestAction.new(:Open_Tabs) do
  3258. $ruiObj = RUIObject.new.with('objectid', 1733100788).with('selfid', 1748673363).with('textdescid', -265864838).with('uniqueparentid', 1682079956)
  3259. .with('uitreeindex', 19)
  3260. .with('classname', 'ImageButton')
  3261. .with('resource-id', 'com.android.chrome:id/tab_switcher_button')
  3262.  
  3263. $ruiObj.click
  3264.  
  3265. waitsecond(2)
  3266. end
  3267.  
  3268. tcase << TestAction.new(:New_Tab) do
  3269. $ruiObj = RUIObject.new.with('objectid', -1772071808).with('selfid', 820590808).with('textdescid', 561000469).with('uniqueparentid', 1610570984)
  3270. .with('uitreeindex', 1)
  3271. .with('classname', 'Button')
  3272. .with('resource-id', 'com.android.chrome:id/new_tab_button')
  3273. .with('content-desc', 'New tab')
  3274.  
  3275. $ruiObj.click
  3276.  
  3277. waitsecond(2)
  3278. end
  3279.  
  3280. tcase << TestAction.new(:Chrome_Check_Menu) do
  3281. $ruiObj = RUIObject.new.with('objectid', 286278959).with('selfid', -17041368).with('textdescid', 536559428).with('uniqueparentid', -1426174679)
  3282. .with('uitreeindex', 29)
  3283. .with('classname', 'ImageButton')
  3284. .with('resource-id', 'com.android.chrome:id/menu_button')
  3285. .with('content-desc', 'More options')
  3286.  
  3287. $ruiObj.isExist
  3288.  
  3289. waitsecond(0)
  3290. end
  3291.  
  3292. tcase << TestAction.new(:LogStop) do
  3293. $myTestResult = checkLastExistResult
  3294.  
  3295. logStopTest("MultiTasking_5_1_8_4")
  3296.  
  3297. waitsecond(0)
  3298. end
  3299.  
  3300. tcase.run(loopTime)
  3301.  
  3302. end
  3303.  
  3304. def self.MultiTasking_5_1_8_5(loopTime)
  3305.  
  3306. tcase = TestCase.new("MultiTasking_5_1_8_5")
  3307.  
  3308. tcase << TestAction.new(:LogStart) do
  3309. logStartTest("MultiTasking_5_1_8_5")
  3310.  
  3311. waitsecond(0)
  3312. end
  3313.  
  3314. tcase << TestAction.new(:goto_Contacts) do
  3315. gotoAppPixel('Contacts')
  3316.  
  3317. waitsecond(5)
  3318. end
  3319.  
  3320. tcase << TestAction.new(:goto_Messages) do
  3321. gotoAppPixel('Messages')
  3322.  
  3323. waitsecond(5)
  3324. end
  3325.  
  3326. tcase << TestAction.new(:goto_Phone) do
  3327. gotoAppPixel('Phone')
  3328.  
  3329. waitsecond(5)
  3330. end
  3331.  
  3332. tcase << TestAction.new(:goto_PlayStore) do
  3333. gotoAppPixel("Play Store")
  3334.  
  3335. waitsecond(5)
  3336. end
  3337.  
  3338. tcase << TestAction.new(:goto_Camera) do
  3339. gotoAppPixel('Camera')
  3340.  
  3341. waitsecond(5)
  3342. end
  3343.  
  3344. tcase << TestAction.new(:goto_Chrome) do
  3345. gotoAppPixel('Chrome')
  3346.  
  3347. waitsecond(5)
  3348. end
  3349.  
  3350. tcase << TestAction.new(:Chrome_Check_Menu) do
  3351. $ruiObj = RUIObject.new.with('objectid', 286278959).with('selfid', -17041368).with('textdescid', 536559428).with('uniqueparentid', -1426174679)
  3352. .with('uitreeindex', 29)
  3353. .with('classname', 'ImageButton')
  3354. .with('resource-id', 'com.android.chrome:id/menu_button')
  3355. .with('content-desc', 'More options')
  3356.  
  3357. $ruiObj.isExist
  3358.  
  3359. waitsecond(2)
  3360. end
  3361.  
  3362. tcase << TestAction.new(:LogStop) do
  3363. $myTestResult = checkLastExistResult
  3364.  
  3365. logStopTest("MultiTasking_5_1_8_5")
  3366.  
  3367. waitsecond(0)
  3368. end
  3369.  
  3370. tcase.run(loopTime)
  3371.  
  3372. end
  3373.  
  3374. def self.MultiTasking_5_1_8_6(loopTime)
  3375.  
  3376. tcase = TestCase.new("MultiTasking_5_1_8_6")
  3377.  
  3378. tcase << TestAction.new(:LogStart) do
  3379. logStartTest("MultiTasking_5_1_8_6")
  3380.  
  3381. waitsecond(0)
  3382. end
  3383.  
  3384. tcase << TestAction.new(:Press_Back) do
  3385. pressBack
  3386.  
  3387. waitsecond(2)
  3388. end
  3389.  
  3390. tcase << TestAction.new(:Press_Back_1) do
  3391. pressBack
  3392.  
  3393. waitsecond(2)
  3394. end
  3395.  
  3396. tcase << TestAction.new(:Home_Check) do
  3397. $ruiObj = RUIObject.new.with('objectid', 1308040668).with('selfid', 1900891271).with('textdescid', 1801250344).with('uniqueparentid', 125426211)
  3398. .with('uitreeindex', 7)
  3399. .with('classname', 'ImageView')
  3400. .with('resource-id', 'com.google.android.apps.nexuslauncher:id/all_apps_handle')
  3401. .with('content-desc', 'Apps list')
  3402.  
  3403. $ruiObj.isExist
  3404.  
  3405. waitsecond(0)
  3406. end
  3407.  
  3408. tcase << TestAction.new(:LogStop) do
  3409. $myTestResult = checkLastExistResult
  3410.  
  3411. logStopTest("MultiTasking_5_1_8_6")
  3412.  
  3413. waitsecond(0)
  3414. end
  3415.  
  3416. tcase.run(loopTime)
  3417.  
  3418. end
  3419.  
  3420. def self.Multimedia_5_1_7_1(loopTime)
  3421.  
  3422. tcase = TestCase.new("Multimedia_5_1_7_1")
  3423.  
  3424. tcase << TestAction.new(:logstart) do
  3425. logStartTest("05_01_07_01_MultiMedia")
  3426.  
  3427. waitsecond(0)
  3428. end
  3429.  
  3430. tcase << TestAction.new(:scriptAction_2) do
  3431. gotoAppPixel("Camera")
  3432.  
  3433. waitsecond(2)
  3434. end
  3435.  
  3436. tcase << TestAction.new(:PermissionAllowButton) do
  3437. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  3438. .with('uitreeindex', 3)
  3439. .with('classname', 'Button')
  3440. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  3441. .with('text', 'ALLOW')
  3442.  
  3443. $ruiObj.click
  3444.  
  3445. waitsecond(2)
  3446. end
  3447.  
  3448. tcase << TestAction.new(:Button_ConfirmButton_2) do
  3449. $ruiObj = RUIObject.new.with('objectid', -1187921382).with('selfid', -1055162259).with('textdescid', 1673606663).with('uniqueparentid', -1678803509)
  3450. .with('uitreeindex', 3)
  3451. .with('classname', 'Button')
  3452. .with('resource-id', 'com.android.camera2:id/confirm_button')
  3453. .with('text', 'NEXT')
  3454.  
  3455. $ruiObj.click
  3456.  
  3457. waitsecond(2)
  3458. end
  3459.  
  3460. tcase << TestAction.new(:allowpermission) do
  3461. $ruiObj = RUIObject.new.with('objectid', 1275766412).with('selfid', -1672772069).with('textdescid', -1293741455).with('uniqueparentid', -759816146)
  3462. .with('uitreeindex', 3)
  3463. .with('classname', 'Button')
  3464. .with('resource-id', 'com.google.android.GoogleCamera:id/ok_button')
  3465. .with('text', 'OK GOT IT')
  3466.  
  3467. $ruiObj.click
  3468.  
  3469. waitsecond(2)
  3470. end
  3471.  
  3472. tcase << TestAction.new(:swipeLeft_4) do
  3473. swipe_horizontal_back 50
  3474.  
  3475. waitsecond(2)
  3476. end
  3477.  
  3478. tcase << TestAction.new(:Videomode) do
  3479. $ruiObj = RUIObject.new.with('objectid', -1418579728).with('selfid', 361169431).with('textdescid', -1051676587).with('uniqueparentid', -725233796)
  3480. .with('uitreeindex', 9)
  3481. .with('classname', 'TextView')
  3482. .with('resource-id', 'com.android.camera2:id/selector_text')
  3483. .with('text', 'Video')
  3484.  
  3485. $ruiObj.click
  3486.  
  3487. waitsecond(2)
  3488. end
  3489.  
  3490. tcase << TestAction.new(:ChangetoVideomode) do
  3491. $ruiObj = RUIObject.new.with('objectid', -733699829).with('selfid', -2081355986).with('textdescid', -1269858187).with('uniqueparentid', 1962624833)
  3492. .with('uitreeindex', 17)
  3493. .with('classname', 'ImageView')
  3494. .with('resource-id', 'com.google.android.GoogleCamera:id/smooth_rotate_video_switch_icon')
  3495.  
  3496. $ruiObj.click
  3497.  
  3498. waitsecond(3)
  3499. end
  3500.  
  3501. tcase << TestAction.new(:recordvideo) do
  3502. $ruiObj = RUIObject.new.with('objectid', -1444537032).with('selfid', 111453042).with('textdescid', 1162006437).with('uniqueparentid', -1154361882)
  3503. .with('uitreeindex', 5)
  3504. .with('classname', 'ImageView')
  3505. .with('resource-id', 'com.android.camera2:id/shutter_button')
  3506. .with('content-desc', 'Shutter')
  3507.  
  3508. $ruiObj.click
  3509.  
  3510. waitsecond(2)
  3511. end
  3512.  
  3513. tcase << TestAction.new(:wait30seconds) do
  3514. waitsecond(32)
  3515. end
  3516.  
  3517. tcase << TestAction.new(:checkforthepausebutton) do
  3518. $ruiObj = RUIObject.new.with('objectid', -1444537032).with('selfid', 111453042).with('textdescid', 1162006437).with('uniqueparentid', -1154361882)
  3519. .with('uitreeindex', 5)
  3520. .with('classname', 'ImageView')
  3521. .with('resource-id', 'com.android.camera2:id/shutter_button')
  3522. .with('content-desc', 'Shutter')
  3523.  
  3524. $ruiObj.isExist
  3525.  
  3526. waitsecond(0)
  3527. end
  3528.  
  3529. tcase << TestAction.new(:stoprecord) do
  3530. $ruiObj = RUIObject.new.with('objectid', -1444537032).with('selfid', 111453042).with('textdescid', 1162006437).with('uniqueparentid', -1154361882)
  3531. .with('uitreeindex', 5)
  3532. .with('classname', 'ImageView')
  3533. .with('resource-id', 'com.android.camera2:id/shutter_button')
  3534. .with('content-desc', 'Shutter')
  3535.  
  3536. $ruiObj.click
  3537.  
  3538. waitsecond(2)
  3539. end
  3540.  
  3541. tcase << TestAction.new(:logstop) do
  3542. $myTestResult = checkLastExistResult
  3543.  
  3544. if $myTestResult == false
  3545. $myFailReason == "Video does not exist"
  3546. end
  3547.  
  3548. logStopTest("05_01_07_01_MultiMedia")
  3549.  
  3550.  
  3551. waitsecond(0)
  3552. end
  3553.  
  3554. tcase << TestAction.new(:pressBack) do
  3555. pressBack
  3556.  
  3557. waitsecond(0)
  3558. end
  3559.  
  3560. tcase << TestAction.new(:pressHome) do
  3561. pressBack
  3562.  
  3563.  
  3564. waitsecond(0)
  3565. end
  3566.  
  3567. tcase.run(loopTime)
  3568.  
  3569. end
  3570.  
  3571. def self.Multimedia_5_1_7_10(loopTime)
  3572.  
  3573. tcase = TestCase.new("Multimedia_5_1_7_10")
  3574.  
  3575. tcase << TestAction.new(:logstart) do
  3576. logStartTest("05_01_07_10_MultiMedia")
  3577.  
  3578. waitsecond(0)
  3579. end
  3580.  
  3581. tcase << TestAction.new(:scriptAction_2) do
  3582. gotoAppPixel("Chrome")
  3583.  
  3584. waitsecond(2)
  3585. end
  3586.  
  3587. tcase << TestAction.new(:ClickAccept) do
  3588. $ruiObj = RUIObject.new.with('objectid', 1131623741).with('selfid', 2073999009).with('textdescid', -212510162).with('uniqueparentid', -1930936534)
  3589. .with('uitreeindex', 4)
  3590. .with('classname', 'Button')
  3591. .with('resource-id', 'com.android.chrome:id/terms_accept')
  3592. .with('text', 'ACCEPT CONTINUE')
  3593.  
  3594. $ruiObj.click
  3595.  
  3596. waitsecond(2)
  3597. end
  3598.  
  3599. tcase << TestAction.new(:Clicknothanks) do
  3600. $ruiObj = RUIObject.new.with('objectid', -1069290294).with('selfid', 1665543358).with('textdescid', 14199854).with('uniqueparentid', -972892335)
  3601. .with('uitreeindex', 8)
  3602. .with('classname', 'Button')
  3603. .with('resource-id', 'com.android.chrome:id/negative_button')
  3604. .with('text', 'NO THANKS')
  3605.  
  3606. $ruiObj.click
  3607.  
  3608. waitsecond(2)
  3609. end
  3610.  
  3611. tcase << TestAction.new(:EditText_SearchBoxText_7) do
  3612. $ruiObj = RUIObject.new.with('objectid', -740560065).with('selfid', 1023920737).with('textdescid', -1482525503).with('uniqueparentid', -1010905038)
  3613. .with('uitreeindex', 0)
  3614. .with('classname', 'EditText')
  3615. .with('resource-id', 'com.android.chrome:id/search_box_text')
  3616.  
  3617. $ruiObj.inputtext('www.youtube.com')
  3618.  
  3619. waitsecond(2)
  3620. end
  3621.  
  3622. tcase << TestAction.new(:pressEnter_8) do
  3623. pressEnter
  3624.  
  3625. waitsecond(2)
  3626. end
  3627.  
  3628. tcase << TestAction.new(:wait15second_9) do
  3629. waitsecond(15)
  3630. end
  3631.  
  3632. tcase << TestAction.new(:Clickfirstvideo) do
  3633. click(724.5,1048.5)
  3634.  
  3635. waitsecond(6)
  3636. end
  3637.  
  3638. tcase << TestAction.new(:sharebuttonexist) do
  3639. $ruiObj = RUIObject.new.with('objectid', 537483260).with('selfid', -349777709).with('textdescid', 367962075).with('uniqueparentid', 1517455945)
  3640. .with('uitreeindex', 15)
  3641. .with('classname', 'Button')
  3642. .with('content-desc', 'Share')
  3643.  
  3644. $ruiObj.isExist
  3645.  
  3646. waitsecond(0)
  3647. end
  3648.  
  3649. tcase << TestAction.new(:logstop) do
  3650. $myTestResult = checkLastExistResult
  3651. if $myTestResult == false
  3652. $myFailReason == "Video Streaming does not work"
  3653. end
  3654. logStopTest("05_01_07_10_MultiMedia")
  3655.  
  3656.  
  3657. waitsecond(0)
  3658. end
  3659.  
  3660. tcase << TestAction.new(:pressBack_13) do
  3661. pressBack
  3662.  
  3663. waitsecond(0)
  3664. end
  3665.  
  3666. tcase << TestAction.new(:pressBack_14) do
  3667. pressBack
  3668.  
  3669. waitsecond(0)
  3670. end
  3671.  
  3672. tcase << TestAction.new(:pressBack_15) do
  3673. pressBack
  3674.  
  3675. waitsecond(0)
  3676. end
  3677.  
  3678. tcase << TestAction.new(:pressHome_16) do
  3679. pressHome
  3680.  
  3681. waitsecond(0)
  3682. end
  3683.  
  3684. tcase.run(loopTime)
  3685.  
  3686. end
  3687.  
  3688. def self.Multimedia_5_1_7_11(loopTime)
  3689.  
  3690. tcase = TestCase.new("Multimedia_5_1_7_11")
  3691.  
  3692. tcase << TestAction.new(:logstart) do
  3693. logStartTest("05_01_07_11_MultiMedia")
  3694.  
  3695. waitsecond(0)
  3696. end
  3697.  
  3698. tcase << TestAction.new(:scriptAction_2) do
  3699. gotoAppPixel("Play Music")
  3700.  
  3701. waitsecond(5)
  3702. end
  3703.  
  3704. tcase << TestAction.new(:Button_BtnDecline_4) do
  3705. $ruiObj = RUIObject.new.with('objectid', -1378300942).with('selfid', -1214082401).with('textdescid', -2120989690).with('uniqueparentid', -1218539231)
  3706. .with('uitreeindex', 12)
  3707. .with('classname', 'Button')
  3708. .with('resource-id', 'com.google.android.music:id/btn_decline')
  3709. .with('text', 'NO THANKS')
  3710.  
  3711. $ruiObj.click
  3712.  
  3713. waitsecond(2)
  3714. end
  3715.  
  3716. tcase << TestAction.new(:Button_Button0_2_1) do
  3717. $ruiObj = RUIObject.new.with('objectid', 1772672623).with('selfid', 1844568236).with('textdescid', 743697808).with('uniqueparentid', -1971983066)
  3718. .with('uitreeindex', 4)
  3719. .with('classname', 'Button')
  3720. .with('resource-id', 'com.google.android.music:id/button_0')
  3721. .with('text', 'SKIP')
  3722.  
  3723. $ruiObj.click
  3724.  
  3725. waitsecond(2)
  3726. end
  3727.  
  3728. tcase << TestAction.new(:ImageView_NavigationButton_6) do
  3729. $ruiObj = RUIObject.new.with('objectid', -1390467816).with('selfid', -959574335).with('textdescid', 2119483842).with('uniqueparentid', 672315111)
  3730. .with('uitreeindex', 0)
  3731. .with('classname', 'ImageView')
  3732. .with('resource-id', 'com.google.android.music:id/navigation_button')
  3733. .with('content-desc', 'Show navigation drawer')
  3734.  
  3735. $ruiObj.isExist
  3736.  
  3737. waitsecond(2)
  3738. end
  3739.  
  3740. tcase << TestAction.new(:logstop) do
  3741. $myTestResult = checkLastExistResult
  3742.  
  3743. if $myTestResult == false
  3744. $myFailReason == "Video Streaming does not work"
  3745. end
  3746. logStopTest("05_01_07_11_MultiMedia")
  3747.  
  3748.  
  3749. waitsecond(0)
  3750. end
  3751.  
  3752. tcase << TestAction.new(:pressBack_9) do
  3753. pressBack
  3754.  
  3755. waitsecond(0)
  3756. end
  3757.  
  3758. tcase << TestAction.new(:pressBack_10) do
  3759. pressBack
  3760.  
  3761. waitsecond(0)
  3762. end
  3763.  
  3764. tcase << TestAction.new(:pressHome_11) do
  3765. pressHome
  3766.  
  3767. waitsecond(0)
  3768. end
  3769.  
  3770. tcase << TestAction.new(:ImageButton_Show_1) do
  3771. $ruiObj = RUIObject.new.with('objectid', -16821482).with('selfid', -167844295).with('textdescid', 296856964).with('uniqueparentid', 1467430507)
  3772. .with('uitreeindex', 6)
  3773. .with('classname', 'ImageButton')
  3774. .with('content-desc', 'Show navigation drawer')
  3775.  
  3776. $ruiObj.click
  3777.  
  3778. waitsecond(2)
  3779. end
  3780.  
  3781. tcase.run(loopTime)
  3782.  
  3783. end
  3784.  
  3785. def self.Multimedia_5_1_7_12(loopTime)
  3786.  
  3787. tcase = TestCase.new("Multimedia_5_1_7_12")
  3788.  
  3789. tcase << TestAction.new(:logstart) do
  3790. logStartTest("05_01_07_12_MultiMedia")
  3791.  
  3792. waitsecond(0)
  3793. end
  3794.  
  3795. tcase << TestAction.new(:gotoplaymusic) do
  3796. gotoAppPixel("Play Music")
  3797.  
  3798. waitsecond(2)
  3799. end
  3800.  
  3801. tcase << TestAction.new(:Button_BtnDecline_4) do
  3802. $ruiObj = RUIObject.new.with('objectid', -1378300942).with('selfid', -1214082401).with('textdescid', -2120989690).with('uniqueparentid', -1218539231)
  3803. .with('uitreeindex', 12)
  3804. .with('classname', 'Button')
  3805. .with('resource-id', 'com.google.android.music:id/btn_decline')
  3806. .with('text', 'NO THANKS')
  3807.  
  3808. $ruiObj.click
  3809.  
  3810. waitsecond(2)
  3811. end
  3812.  
  3813. tcase << TestAction.new(:clicknavigationdrawer) do
  3814. $ruiObj = RUIObject.new.with('objectid', -1390467816).with('selfid', -959574335).with('textdescid', 2119483842).with('uniqueparentid', 672315111)
  3815. .with('uitreeindex', 0)
  3816. .with('classname', 'ImageView')
  3817. .with('resource-id', 'com.google.android.music:id/navigation_button')
  3818. .with('content-desc', 'Show navigation drawer')
  3819.  
  3820. $ruiObj.click
  3821.  
  3822. waitsecond(2)
  3823. end
  3824.  
  3825. tcase << TestAction.new(:musiclibrary) do
  3826. $ruiObj = RUIObject.new.with('objectid', 1337918942).with('selfid', -404350322).with('textdescid', -1209707262).with('uniqueparentid', 1865643829).with('classresourceid', -938935918)
  3827. .with('uitreeindex', 34)
  3828. .with('classname', 'TextView')
  3829. .with('text', 'Music library')
  3830.  
  3831. $ruiObj.click
  3832.  
  3833. waitsecond(2)
  3834. end
  3835.  
  3836. tcase << TestAction.new(:artist) do
  3837. $ruiObj = RUIObject.new.with('objectid', -741226326).with('selfid', -2050395810).with('textdescid', -294625686).with('uniqueparentid', -1232442324)
  3838. .with('uitreeindex', 5)
  3839. .with('classname', 'TextView')
  3840. .with('resource-id', 'com.google.android.music:id/title')
  3841. .with('text', 'ARTISTS')
  3842.  
  3843. $ruiObj.click
  3844.  
  3845. waitsecond(2)
  3846. end
  3847.  
  3848. tcase << TestAction.new(:clickthumbnail) do
  3849. $ruiObj = RUIObject.new.with('objectid', -146398081).with('selfid', -538001520).with('textdescid', -243373183).with('uniqueparentid', 1810546890).with('classresourceid', -1418125814)
  3850. .with('uitreeindex', 9)
  3851. .with('pretext', 'GENRES')
  3852. .with('classname', 'ImageView')
  3853. .with('resource-id', 'com.google.android.music:id/li_thumbnail_frame')
  3854.  
  3855. $ruiObj.click
  3856.  
  3857. waitsecond(2)
  3858. end
  3859.  
  3860. tcase << TestAction.new(:clickanotherthumnail) do
  3861. $ruiObj = RUIObject.new.with('objectid', 585237187).with('selfid', -538001520).with('textdescid', 962483645).with('uniqueparentid', 484936402)
  3862. .with('uitreeindex', 7)
  3863. .with('pretext', 'In my library')
  3864. .with('classname', 'ImageView')
  3865. .with('resource-id', 'com.google.android.music:id/li_thumbnail_frame')
  3866.  
  3867. $ruiObj.click
  3868.  
  3869. waitsecond(3)
  3870. end
  3871.  
  3872. tcase << TestAction.new(:clickplay) do
  3873. $ruiObj = RUIObject.new.with('objectid', 1267180639).with('selfid', -562829957).with('textdescid', -145594059).with('uniqueparentid', -1431364792).with('classresourceid', 554110641)
  3874. .with('uitreeindex', 8)
  3875. .with('classname', 'ImageButton')
  3876. .with('resource-id', 'com.google.android.music:id/fab_play')
  3877. .with('content-desc', 'Play')
  3878.  
  3879. $ruiObj.click
  3880.  
  3881. waitsecond(2)
  3882. end
  3883.  
  3884. tcase << TestAction.new(:wait12second_8) do
  3885. waitsecond(12)
  3886. end
  3887.  
  3888. tcase << TestAction.new(:pausebuttonexist) do
  3889. $ruiObj = RUIObject.new.with('objectid', 1487562708).with('selfid', 2054656518).with('textdescid', -1874588662).with('uniqueparentid', -317697394)
  3890. .with('uitreeindex', 34)
  3891. .with('classname', 'ImageButton')
  3892. .with('resource-id', 'com.google.android.music:id/play_pause_header')
  3893. .with('content-desc', 'Pause')
  3894.  
  3895. $ruiObj.isExist
  3896.  
  3897. waitsecond(2)
  3898. end
  3899.  
  3900. tcase << TestAction.new(:clickpausebutton) do
  3901. $ruiObj = RUIObject.new.with('objectid', 1487562708).with('selfid', 2054656518).with('textdescid', -1874588662).with('uniqueparentid', -317697394)
  3902. .with('uitreeindex', 34)
  3903. .with('classname', 'ImageButton')
  3904. .with('resource-id', 'com.google.android.music:id/play_pause_header')
  3905. .with('content-desc', 'Pause')
  3906.  
  3907. $ruiObj.click
  3908.  
  3909. waitsecond(3)
  3910. end
  3911.  
  3912. tcase << TestAction.new(:logstop) do
  3913. $myTestResult = checkLastExistResult
  3914.  
  3915. if $myTestResult == false
  3916. $myFailReason == "Music is not playing"
  3917. end
  3918. logStopTest("05_01_07_12_MultiMedia")
  3919.  
  3920.  
  3921. waitsecond(0)
  3922. end
  3923.  
  3924. tcase << TestAction.new(:goback) do
  3925. $ruiObj = RUIObject.new.with('objectid', -16821482).with('selfid', -123872605).with('textdescid', -2129880704).with('uniqueparentid', -272094647)
  3926. .with('uitreeindex', 0)
  3927. .with('classname', 'ImageButton')
  3928. .with('content-desc', 'Navigate up')
  3929.  
  3930. $ruiObj.click
  3931.  
  3932. waitsecond(2)
  3933. end
  3934.  
  3935. tcase << TestAction.new(:goback_1) do
  3936. $ruiObj = RUIObject.new.with('objectid', -16821482).with('selfid', -123872605).with('textdescid', -2129880704).with('uniqueparentid', -272094647)
  3937. .with('uitreeindex', 0)
  3938. .with('classname', 'ImageButton')
  3939. .with('content-desc', 'Navigate up')
  3940.  
  3941. $ruiObj.click
  3942.  
  3943. waitsecond(2)
  3944. end
  3945.  
  3946. tcase << TestAction.new(:gotomenunav) do
  3947. $ruiObj = RUIObject.new.with('objectid', -16821482).with('selfid', -167844295).with('textdescid', 296856964).with('uniqueparentid', 1467430507)
  3948. .with('uitreeindex', 6)
  3949. .with('classname', 'ImageButton')
  3950. .with('content-desc', 'Show navigation drawer')
  3951.  
  3952. $ruiObj.click
  3953.  
  3954. waitsecond(2)
  3955. end
  3956.  
  3957. tcase << TestAction.new(:gotohome) do
  3958. $ruiObj = RUIObject.new.with('objectid', 1337918942).with('selfid', 591713361).with('textdescid', -569085377).with('uniqueparentid', 1865643829).with('classresourceid', -938935918)
  3959. .with('uitreeindex', 27)
  3960. .with('classname', 'TextView')
  3961. .with('text', 'Home')
  3962.  
  3963. $ruiObj.click
  3964.  
  3965. waitsecond(2)
  3966. end
  3967.  
  3968. tcase << TestAction.new(:pressBack_9) do
  3969. pressBack
  3970.  
  3971. waitsecond(0)
  3972. end
  3973.  
  3974. tcase << TestAction.new(:pressBack_10) do
  3975. pressBack
  3976.  
  3977. waitsecond(0)
  3978. end
  3979.  
  3980. tcase << TestAction.new(:pressHome_11) do
  3981. pressHome
  3982.  
  3983. waitsecond(0)
  3984. end
  3985.  
  3986. tcase << TestAction.new(:swipenotificationbar) do
  3987. swipe(729,31.5,774,1500.5,100)
  3988.  
  3989. waitsecond(2)
  3990. end
  3991.  
  3992. tcase << TestAction.new(:swiperight) do
  3993. swipe(1102.5,679,100,679.5,100)
  3994.  
  3995. waitsecond(2)
  3996. end
  3997.  
  3998. tcase << TestAction.new(:pressHome_1) do
  3999. pressHome
  4000.  
  4001. waitsecond(2)
  4002. end
  4003.  
  4004. tcase.run(loopTime)
  4005.  
  4006. end
  4007.  
  4008. def self.Multimedia_5_1_7_13(loopTime)
  4009.  
  4010. tcase = TestCase.new("Multimedia_5_1_7_13")
  4011.  
  4012. tcase << TestAction.new(:logstart) do
  4013. logStartTest("05_01_07_13_MultiMedia")
  4014.  
  4015. waitsecond(0)
  4016. end
  4017.  
  4018. tcase << TestAction.new(:gotoplaymusic) do
  4019. gotoAppPixel("Play Music")
  4020.  
  4021. waitsecond(2)
  4022. end
  4023.  
  4024. tcase << TestAction.new(:Button_BtnDecline_4) do
  4025. $ruiObj = RUIObject.new.with('objectid', -1378300942).with('selfid', -1214082401).with('textdescid', -2120989690).with('uniqueparentid', -1218539231)
  4026. .with('uitreeindex', 12)
  4027. .with('classname', 'Button')
  4028. .with('resource-id', 'com.google.android.music:id/btn_decline')
  4029. .with('text', 'NO THANKS')
  4030.  
  4031. $ruiObj.click
  4032.  
  4033. waitsecond(2)
  4034. end
  4035.  
  4036. tcase << TestAction.new(:pressBack_9) do
  4037. pressBack
  4038.  
  4039. waitsecond(0)
  4040. end
  4041.  
  4042. tcase << TestAction.new(:pressBack_10) do
  4043. pressBack
  4044.  
  4045. waitsecond(0)
  4046. end
  4047.  
  4048. tcase << TestAction.new(:pressHome_11) do
  4049. pressHome
  4050.  
  4051. waitsecond(0)
  4052. end
  4053.  
  4054. tcase << TestAction.new(:swipenotificationbar) do
  4055. swipe(729,31.5,774,1500.5,100)
  4056.  
  4057. waitsecond(2)
  4058. end
  4059.  
  4060. tcase << TestAction.new(:pause) do
  4061. $ruiObj = RUIObject.new.with('objectid', 882076620).with('selfid', -1186380024).with('textdescid', -490366974).with('uniqueparentid', 1841961189).with('classresourceid', -343477762)
  4062. .with('uitreeindex', 18)
  4063. .with('classname', 'ImageButton')
  4064. .with('resource-id', 'android:id/action0')
  4065. .with('content-desc', 'Pause')
  4066.  
  4067. $ruiObj.isExist
  4068.  
  4069. waitsecond(3)
  4070. end
  4071.  
  4072. tcase << TestAction.new(:logstop_1) do
  4073. $myTestResult = !checkLastExistResult
  4074.  
  4075. if $myTestResult == false
  4076. $myFailReason == "Music is not closing."
  4077. end
  4078. logStopTest("05_01_07_13_MultiMedia")
  4079.  
  4080.  
  4081. waitsecond(0)
  4082. end
  4083.  
  4084. tcase << TestAction.new(:pressHome_1) do
  4085. pressHome
  4086.  
  4087. waitsecond(2)
  4088. end
  4089.  
  4090. tcase.run(loopTime)
  4091.  
  4092. end
  4093.  
  4094. def self.Multimedia_5_1_7_14(loopTime)
  4095.  
  4096. tcase = TestCase.new("Multimedia_5_1_7_14")
  4097.  
  4098. tcase << TestAction.new(:logstart) do
  4099. logStartTest("05_01_07_14_MultiMedia")
  4100.  
  4101. waitsecond(0)
  4102. end
  4103.  
  4104. tcase << TestAction.new(:gotosettings) do
  4105. gotoAppPixel("Settings")
  4106.  
  4107. waitsecond(2)
  4108. end
  4109.  
  4110. tcase << TestAction.new(:clickdisplay) do
  4111. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', -1901343455).with('textdescid', 1460376455).with('uniqueparentid', -349226723)
  4112. .with('uitreeindex', 22)
  4113. .with('classname', 'TextView')
  4114. .with('resource-id', 'android:id/title')
  4115. .with('text', 'Display')
  4116.  
  4117. $ruiObj.click
  4118.  
  4119. waitsecond(2)
  4120. end
  4121.  
  4122. tcase << TestAction.new(:advancedSettings) do
  4123. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', 183975843).with('textdescid', -1659217645).with('uniqueparentid', -512886282)
  4124. .with('uitreeindex', 13)
  4125. .with('classname', 'TextView')
  4126. .with('resource-id', 'android:id/title')
  4127. .with('text', 'Advanced')
  4128.  
  4129. $ruiObj.click
  4130.  
  4131. waitsecond(2)
  4132. end
  4133.  
  4134. tcase << TestAction.new(:swipeDown_6) do
  4135. swipe_vertical 500
  4136.  
  4137. waitsecond(2)
  4138. end
  4139.  
  4140. tcase << TestAction.new(:clicktheme) do
  4141. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', 80297600).with('textdescid', 722414294).with('uniqueparentid', 818307449)
  4142. .with('uitreeindex', 20)
  4143. .with('classname', 'TextView')
  4144. .with('resource-id', 'android:id/title')
  4145. .with('text', 'Device theme')
  4146.  
  4147. $ruiObj.click
  4148.  
  4149. waitsecond(2)
  4150. end
  4151.  
  4152. tcase << TestAction.new(:changetodark) do
  4153. $ruiObj = RUIObject.new.with('objectid', 374337900).with('selfid', -102657974).with('textdescid', 679433110).with('uniqueparentid', -290305997).with('classresourceid', 2074814108)
  4154. .with('uitreeindex', 4)
  4155. .with('classname', 'CheckedTextView')
  4156. .with('resource-id', 'android:id/text1')
  4157. .with('text', 'Dark')
  4158.  
  4159. $ruiObj.click
  4160.  
  4161. waitsecond(2)
  4162. end
  4163.  
  4164. tcase << TestAction.new(:clicktheme_1) do
  4165. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', 80297600).with('textdescid', 722414294).with('uniqueparentid', 818307449)
  4166. .with('uitreeindex', 20)
  4167. .with('classname', 'TextView')
  4168. .with('resource-id', 'android:id/title')
  4169. .with('text', 'Device theme')
  4170.  
  4171. $ruiObj.click
  4172.  
  4173. waitsecond(2)
  4174. end
  4175.  
  4176. tcase << TestAction.new(:changetoinverted) do
  4177. $ruiObj = RUIObject.new.with('objectid', 374337900).with('selfid', -797465143).with('textdescid', 1689955831).with('uniqueparentid', -290305997).with('classresourceid', 2074814108)
  4178. .with('uitreeindex', 3)
  4179. .with('classname', 'CheckedTextView')
  4180. .with('resource-id', 'android:id/text1')
  4181. .with('text', 'Inverted')
  4182.  
  4183. $ruiObj.click
  4184.  
  4185. waitsecond(2)
  4186. end
  4187.  
  4188. tcase << TestAction.new(:clicktheme_2) do
  4189. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', 80297600).with('textdescid', 722414294).with('uniqueparentid', 1677638763)
  4190. .with('uitreeindex', 20)
  4191. .with('classname', 'TextView')
  4192. .with('resource-id', 'android:id/title')
  4193. .with('text', 'Device theme')
  4194.  
  4195. $ruiObj.click
  4196.  
  4197. waitsecond(2)
  4198. end
  4199.  
  4200. tcase << TestAction.new(:clickPixel) do
  4201. $ruiObj = RUIObject.new.with('objectid', 374337900).with('selfid', 1123896370).with('textdescid', -61296722).with('uniqueparentid', -290305997).with('classresourceid', 2074814108)
  4202. .with('uitreeindex', 2)
  4203. .with('classname', 'CheckedTextView')
  4204. .with('resource-id', 'android:id/text1')
  4205. .with('text', 'Pixel')
  4206.  
  4207. $ruiObj.click
  4208.  
  4209. waitsecond(2)
  4210. end
  4211.  
  4212. tcase << TestAction.new(:Displayisexist) do
  4213. $ruiObj = RUIObject.new.with('objectid', 765775369).with('selfid', 1766108176).with('textdescid', 937308149).with('uniqueparentid', 1015447283)
  4214. .with('uitreeindex', 1)
  4215. .with('classname', 'TextView')
  4216. .with('text', 'Display')
  4217.  
  4218. $ruiObj.isExist
  4219.  
  4220. waitsecond(2)
  4221. end
  4222.  
  4223. tcase << TestAction.new(:logstop) do
  4224. $myTestResult = checkLastExistResult
  4225.  
  4226. if $myTestResult == false
  4227. $myFailReason == "Theme change not working"
  4228. end
  4229. logStopTest("05_01_07_14_MultiMedia")
  4230.  
  4231.  
  4232. waitsecond(0)
  4233. end
  4234.  
  4235. tcase << TestAction.new(:pressBack_19) do
  4236. pressBack
  4237.  
  4238. waitsecond(0)
  4239. end
  4240.  
  4241. tcase << TestAction.new(:pressBack_20) do
  4242. pressBack
  4243.  
  4244. waitsecond(0)
  4245. end
  4246.  
  4247. tcase << TestAction.new(:pressHome_22) do
  4248. pressHome
  4249.  
  4250. waitsecond(0)
  4251. end
  4252.  
  4253. tcase.run(loopTime)
  4254.  
  4255. end
  4256.  
  4257. def self.Multimedia_5_1_7_2(loopTime)
  4258.  
  4259. tcase = TestCase.new("Multimedia_5_1_7_2")
  4260.  
  4261. tcase << TestAction.new(:logstart) do
  4262. logStartTest("05_01_07_02_MultiMedia")
  4263.  
  4264. waitsecond(0)
  4265. end
  4266.  
  4267. tcase << TestAction.new(:gotophotos) do
  4268. gotoAppPixel("Photos")
  4269.  
  4270. waitsecond(2)
  4271. end
  4272.  
  4273. tcase << TestAction.new(:Switch_AutoBackupSwitch_2) do
  4274. $ruiObj = RUIObject.new.with('objectid', 1900129037).with('selfid', 1682285764).with('textdescid', 1396382350).with('uniqueparentid', -1851031688).with('classresourceid', -402277641)
  4275. .with('uitreeindex', 2)
  4276. .with('classname', 'Switch')
  4277. .with('resource-id', 'com.google.android.apps.photos:id/auto_backup_switch')
  4278. .with('text', 'ON')
  4279.  
  4280. $ruiObj.click
  4281.  
  4282. waitsecond(2)
  4283. end
  4284.  
  4285. tcase << TestAction.new(:Button_DoneButton_7) do
  4286. $ruiObj = RUIObject.new.with('objectid', 1857204703).with('selfid', -544460817).with('textdescid', -1623853219).with('uniqueparentid', -1190962124)
  4287. .with('uitreeindex', 9)
  4288. .with('classname', 'Button')
  4289. .with('resource-id', 'com.google.android.apps.photos:id/done_button')
  4290. .with('text', 'DONE')
  4291.  
  4292. $ruiObj.click
  4293.  
  4294. waitsecond(2)
  4295. end
  4296.  
  4297. tcase << TestAction.new(:Keepoff) do
  4298. $ruiObj = RUIObject.new.with('objectid', -767191036).with('selfid', 780820477).with('textdescid', 1663022928).with('uniqueparentid', -1776182139).with('classresourceid', 1834539359)
  4299. .with('uitreeindex', 3)
  4300. .with('classname', 'Button')
  4301. .with('resource-id', 'android:id/button2')
  4302. .with('text', 'KEEP OFF')
  4303.  
  4304. $ruiObj.click
  4305.  
  4306. waitsecond(2)
  4307. end
  4308.  
  4309. tcase << TestAction.new(:clickdone) do
  4310. $ruiObj = RUIObject.new.with('objectid', 1857204703).with('selfid', -544460817).with('textdescid', -1623853219).with('uniqueparentid', 1110794213)
  4311. .with('uitreeindex', 11)
  4312. .with('classname', 'Button')
  4313. .with('resource-id', 'com.google.android.apps.photos:id/done_button')
  4314. .with('text', 'DONE')
  4315.  
  4316. $ruiObj.click
  4317.  
  4318. waitsecond(2)
  4319. end
  4320.  
  4321. tcase << TestAction.new(:clickgotit) do
  4322. $ruiObj = RUIObject.new.with('objectid', -767191037).with('selfid', 1077689959).with('textdescid', 1333340036).with('uniqueparentid', 1950016636).with('classresourceid', 1834539358)
  4323. .with('uitreeindex', 3)
  4324. .with('classname', 'Button')
  4325. .with('resource-id', 'android:id/button1')
  4326. .with('text', 'GOT IT')
  4327.  
  4328. $ruiObj.click
  4329.  
  4330. waitsecond(2)
  4331. end
  4332.  
  4333. tcase << TestAction.new(:clickmostrecentvideo) do
  4334. click(180,792)
  4335.  
  4336. waitsecond(2)
  4337. end
  4338.  
  4339. tcase << TestAction.new(:clicktoallowfullscreen) do
  4340. $ruiObj = RUIObject.new.with('objectid', 421858869).with('selfid', 1817701202).with('textdescid', -941601866).with('uniqueparentid', -965863814)
  4341. .with('uitreeindex', 5)
  4342. .with('classname', 'Button')
  4343. .with('resource-id', 'android:id/ok')
  4344. .with('text', 'GOT IT')
  4345.  
  4346. $ruiObj.click
  4347.  
  4348. waitsecond(2)
  4349. end
  4350.  
  4351. tcase << TestAction.new(:View_Dismiss_10) do
  4352. $ruiObj = RUIObject.new.with('objectid', 1250577209).with('selfid', 2045596453).with('textdescid', 1467340739).with('uniqueparentid', -1059167548)
  4353. .with('uitreeindex', 3)
  4354. .with('classname', 'android.view.View')
  4355. .with('content-desc', 'Dismiss')
  4356.  
  4357. $ruiObj.click
  4358.  
  4359. waitsecond(2)
  4360. end
  4361.  
  4362. tcase << TestAction.new(:wait10seconds) do
  4363. for i in 1..4
  4364.  
  4365. waitsecond(i)
  4366. refreshScreen
  4367.  
  4368. end
  4369.  
  4370. end
  4371.  
  4372. tcase << TestAction.new(:clickthescreen) do
  4373. click(1080,1516.5)
  4374.  
  4375. waitsecond(2)
  4376. end
  4377.  
  4378. tcase << TestAction.new(:checkforpausebutton) do
  4379. $ruiObj = RUIObject.new.with('objectid', 1760472289).with('selfid', -1751474194).with('textdescid', -1538603918).with('uniqueparentid', 542296211)
  4380. .with('uitreeindex', 2)
  4381. .with('classname', 'ImageButton')
  4382. .with('resource-id', 'com.google.android.apps.photos:id/photos_videoplayer_pause_button')
  4383. .with('content-desc', 'Pause video')
  4384.  
  4385. $ruiObj.isExist
  4386.  
  4387. waitsecond(0)
  4388. end
  4389.  
  4390. tcase << TestAction.new(:refreshscreen) do
  4391. refreshScreen
  4392.  
  4393. waitsecond(0)
  4394. end
  4395.  
  4396. tcase << TestAction.new(:wait16second) do
  4397. for i in 1..5
  4398.  
  4399. waitsecond(i)
  4400. refreshScreen
  4401.  
  4402. end
  4403.  
  4404. end
  4405.  
  4406. tcase << TestAction.new(:pausevideo) do
  4407. $ruiObj = RUIObject.new.with('objectid', 1760472289).with('selfid', -1751474194).with('textdescid', -1538603918).with('uniqueparentid', 542296211)
  4408. .with('uitreeindex', 2)
  4409. .with('classname', 'ImageButton')
  4410. .with('resource-id', 'com.google.android.apps.photos:id/photos_videoplayer_pause_button')
  4411. .with('content-desc', 'Pause video')
  4412.  
  4413. $ruiObj.click
  4414.  
  4415. waitsecond(2)
  4416. end
  4417.  
  4418. tcase << TestAction.new(:stoplog) do
  4419. $myTestResult = checkLastExistResult
  4420.  
  4421. logStopTest("05_01_07_02_MultiMedia")
  4422.  
  4423.  
  4424.  
  4425. waitsecond(0)
  4426. end
  4427.  
  4428. tcase << TestAction.new(:pressBack_4) do
  4429. pressBack
  4430.  
  4431. waitsecond(0)
  4432. end
  4433.  
  4434. tcase << TestAction.new(:pressBack_6) do
  4435. pressBack
  4436.  
  4437. waitsecond(0)
  4438. end
  4439.  
  4440. tcase << TestAction.new(:pressHome_7) do
  4441. pressHome
  4442.  
  4443. waitsecond(0)
  4444. end
  4445.  
  4446. tcase.run(loopTime)
  4447.  
  4448. end
  4449.  
  4450. def self.Multimedia_5_1_7_3(loopTime)
  4451.  
  4452. tcase = TestCase.new("Multimedia_5_1_7_3")
  4453.  
  4454. tcase << TestAction.new(:logstart) do
  4455. logStartTest("05_01_07_03_MultiMedia")
  4456.  
  4457. waitsecond(0)
  4458. end
  4459.  
  4460. tcase << TestAction.new(:gotoPhotos) do
  4461. gotoAppPixel("Photos")
  4462.  
  4463. waitsecond(2)
  4464. end
  4465.  
  4466. tcase << TestAction.new(:gotovideo) do
  4467. click(166.5,666)
  4468.  
  4469. waitsecond(2)
  4470. end
  4471.  
  4472. tcase << TestAction.new(:clicktheview) do
  4473. $ruiObj = RUIObject.new.with('objectid', 969208524).with('selfid', 1815484335).with('textdescid', -19306796).with('uniqueparentid', -87074755)
  4474. .with('uitreeindex', 0)
  4475. .with('classname', 'android.view.View')
  4476.  
  4477. $ruiObj.click
  4478.  
  4479. waitsecond(0)
  4480. end
  4481.  
  4482. tcase << TestAction.new(:refreshscreen) do
  4483. refreshScreen
  4484.  
  4485. waitsecond(0)
  4486. end
  4487.  
  4488. tcase << TestAction.new(:deletebuttonexist) do
  4489. $ruiObj = RUIObject.new.with('objectid', -1328088200).with('selfid', 1434121712).with('textdescid', 864436336).with('uniqueparentid', -2095656440)
  4490. .with('uitreeindex', 14)
  4491. .with('classname', 'ImageView')
  4492. .with('resource-id', 'com.google.android.apps.photos:id/trash')
  4493. .with('content-desc', 'Trash')
  4494.  
  4495. $ruiObj.isExist
  4496.  
  4497. waitsecond(2)
  4498. end
  4499.  
  4500. tcase << TestAction.new(:deletethevideo) do
  4501. $ruiObj = RUIObject.new.with('objectid', -1328088200).with('selfid', 1434121712).with('textdescid', 864436336).with('uniqueparentid', -2095656440)
  4502. .with('uitreeindex', 14)
  4503. .with('classname', 'ImageView')
  4504. .with('resource-id', 'com.google.android.apps.photos:id/trash')
  4505. .with('content-desc', 'Trash')
  4506.  
  4507. $ruiObj.click
  4508.  
  4509. waitsecond(2)
  4510. end
  4511.  
  4512. tcase << TestAction.new(:confirmdelete) do
  4513. $ruiObj = RUIObject.new.with('objectid', -767191037).with('selfid', 2007729818).with('textdescid', -414128773).with('uniqueparentid', 158965951).with('classresourceid', 1834539358)
  4514. .with('uitreeindex', 7)
  4515. .with('classname', 'Button')
  4516. .with('resource-id', 'android:id/button1')
  4517. .with('text', 'MOVE TO TRASH')
  4518.  
  4519. $ruiObj.click
  4520.  
  4521. waitsecond(2)
  4522. end
  4523.  
  4524. tcase << TestAction.new(:confirmdelete_2) do
  4525. $ruiObj = RUIObject.new.with('objectid', -767191037).with('selfid', -1194431314).with('textdescid', -875578979).with('uniqueparentid', 1357736153).with('classresourceid', 1834539358)
  4526. .with('uitreeindex', 4)
  4527. .with('classname', 'Button')
  4528. .with('resource-id', 'android:id/button1')
  4529. .with('text', 'DELETE PERMANENTLY')
  4530.  
  4531. $ruiObj.click
  4532.  
  4533. waitsecond(2)
  4534. end
  4535.  
  4536. tcase << TestAction.new(:logstop) do
  4537. $myTestResult = checkLastExistResult
  4538.  
  4539. if $myTestResult == false
  4540. $myFailReason == "Video fail to delete"
  4541.  
  4542. end
  4543. logStopTest("05_01_07_03_MultiMedia")
  4544.  
  4545.  
  4546. waitsecond(0)
  4547. end
  4548.  
  4549. tcase << TestAction.new(:pressBack_11) do
  4550. pressBack
  4551.  
  4552. waitsecond(0)
  4553. end
  4554.  
  4555. tcase << TestAction.new(:pressBack_12) do
  4556. pressBack
  4557.  
  4558. waitsecond(0)
  4559. end
  4560.  
  4561. tcase << TestAction.new(:pressHome_13) do
  4562. pressHome
  4563.  
  4564. waitsecond(0)
  4565. end
  4566.  
  4567. tcase.run(loopTime)
  4568.  
  4569. end
  4570.  
  4571. def self.Multimedia_5_1_7_4(loopTime)
  4572.  
  4573. tcase = TestCase.new("Multimedia_5_1_7_4")
  4574.  
  4575. tcase << TestAction.new(:logstart) do
  4576. logStartTest("05_01_07_04_MultiMedia")
  4577.  
  4578. waitsecond(0)
  4579. end
  4580.  
  4581. tcase << TestAction.new(:scriptAction_2) do
  4582. gotoAppPixel("Camera")
  4583.  
  4584. waitsecond(2)
  4585. end
  4586.  
  4587. tcase << TestAction.new(:swipeLeft_2) do
  4588. swipe_horizontal_back 50
  4589.  
  4590. waitsecond(2)
  4591. end
  4592.  
  4593. tcase << TestAction.new(:selectCamera) do
  4594. $ruiObj = RUIObject.new.with('objectid', -1418579728).with('selfid', 2055244041).with('textdescid', 1854346827).with('uniqueparentid', 1620279486)
  4595. .with('uitreeindex', 7)
  4596. .with('classname', 'TextView')
  4597. .with('resource-id', 'com.android.camera2:id/selector_text')
  4598. .with('text', 'Camera')
  4599.  
  4600. $ruiObj.click
  4601.  
  4602. waitsecond(2)
  4603. end
  4604.  
  4605. tcase << TestAction.new(:takeaphoto) do
  4606. $ruiObj = RUIObject.new.with('objectid', -1444537032).with('selfid', 111453042).with('textdescid', 1162006437).with('uniqueparentid', -1154361882)
  4607. .with('uitreeindex', 15)
  4608. .with('classname', 'ImageView')
  4609. .with('resource-id', 'com.android.camera2:id/shutter_button')
  4610. .with('content-desc', 'Shutter')
  4611.  
  4612. $ruiObj.click
  4613.  
  4614. waitsecond(3)
  4615. end
  4616.  
  4617. tcase << TestAction.new(:roundedthumnailexist) do
  4618. $ruiObj = RUIObject.new.with('objectid', 1941509669).with('selfid', -1804265706).with('textdescid', 57257627).with('uniqueparentid', 1550231552)
  4619. .with('uitreeindex', 5)
  4620. .with('classname', 'android.view.View')
  4621. .with('resource-id', 'com.android.camera2:id/rounded_thumbnail_view')
  4622.  
  4623. $ruiObj.isExist
  4624.  
  4625. waitsecond(2)
  4626. end
  4627.  
  4628. tcase << TestAction.new(:logstop) do
  4629. $myTestResult = checkLastExistResult
  4630.  
  4631. if $myTestResult == false
  4632. $myFailReason == "Take picture FAILED"
  4633. end
  4634. logStopTest("05_01_07_04_MultiMedia")
  4635.  
  4636.  
  4637. waitsecond(0)
  4638. end
  4639.  
  4640. tcase << TestAction.new(:pressBack_8) do
  4641. pressBack
  4642.  
  4643. waitsecond(0)
  4644. end
  4645.  
  4646. tcase << TestAction.new(:pressHome_9) do
  4647. pressHome
  4648.  
  4649. waitsecond(0)
  4650. end
  4651.  
  4652. tcase.run(loopTime)
  4653.  
  4654. end
  4655.  
  4656. def self.Multimedia_5_1_7_5(loopTime)
  4657.  
  4658. tcase = TestCase.new("Multimedia_5_1_7_5")
  4659.  
  4660. tcase << TestAction.new(:logstart) do
  4661. logStartTest("05_01_07_05_MultiMedia")
  4662.  
  4663. waitsecond(0)
  4664. end
  4665.  
  4666. tcase << TestAction.new(:gotoGallery) do
  4667. gotoAppPixel("Photos")
  4668.  
  4669. waitsecond(2)
  4670. end
  4671.  
  4672. tcase << TestAction.new(:clickmostcurrentphoto) do
  4673. $ruiObj = RUIObject.new.with('objectid', -740392950).with('selfid', -155877827).with('textdescid', 1337650749).with('uniqueparentid', -720638774)
  4674. .with('uitreeindex', 1)
  4675. .with('pretext', 'Camera')
  4676. .with('classname', 'android.view.ViewGroup')
  4677. .with('content-desc', 'Photo taken on May 10, 2017 8:55:20 PM.')
  4678.  
  4679. $ruiObj.click
  4680.  
  4681. waitsecond(2)
  4682. end
  4683.  
  4684. tcase << TestAction.new(:ifsharebuttonexist) do
  4685. $ruiObj = RUIObject.new.with('objectid', -1982964278).with('selfid', 1056003612).with('textdescid', 1336202944).with('uniqueparentid', 1291383994)
  4686. .with('uitreeindex', 6)
  4687. .with('classname', 'ImageView')
  4688. .with('resource-id', 'com.google.android.apps.photos:id/edit')
  4689. .with('content-desc', 'Edit')
  4690.  
  4691. $ruiObj.isExist
  4692.  
  4693. waitsecond(0)
  4694. end
  4695.  
  4696. tcase << TestAction.new(:logstop) do
  4697. $myTestResult = checkLastExistResult
  4698. if $myTestResult == false
  4699. $myFailReason == "Take picture FAILED"
  4700. end
  4701. logStopTest("05_01_07_05_MultiMedia")
  4702.  
  4703.  
  4704. waitsecond(0)
  4705. end
  4706.  
  4707. tcase << TestAction.new(:pressBack_7) do
  4708. pressBack
  4709.  
  4710. waitsecond(0)
  4711. end
  4712.  
  4713. tcase << TestAction.new(:pressBack_8) do
  4714. pressBack
  4715.  
  4716. waitsecond(0)
  4717. end
  4718.  
  4719. tcase << TestAction.new(:pressHome_8) do
  4720. pressHome
  4721.  
  4722. waitsecond(0)
  4723. end
  4724.  
  4725. tcase.run(loopTime)
  4726.  
  4727. end
  4728.  
  4729. def self.Multimedia_5_1_7_6(loopTime)
  4730.  
  4731. tcase = TestCase.new("Multimedia_5_1_7_6")
  4732.  
  4733. tcase << TestAction.new(:logstart) do
  4734. logStartTest("05_01_07_06_MultiMedia")
  4735.  
  4736. waitsecond(0)
  4737. end
  4738.  
  4739. tcase << TestAction.new(:gotoGallery) do
  4740. gotoAppPixel("Photos")
  4741.  
  4742. waitsecond(2)
  4743. end
  4744.  
  4745. tcase << TestAction.new(:clickmostrecentfile) do
  4746. click(184.5,648)
  4747.  
  4748. waitsecond(2)
  4749. end
  4750.  
  4751. tcase << TestAction.new(:deletebuttonexist) do
  4752. $ruiObj = RUIObject.new.with('objectid', -1328088200).with('selfid', 1434121712).with('textdescid', 864436336).with('uniqueparentid', -2095656440)
  4753. .with('uitreeindex', 7)
  4754. .with('classname', 'ImageView')
  4755. .with('resource-id', 'com.google.android.apps.photos:id/trash')
  4756. .with('content-desc', 'Trash')
  4757.  
  4758. $ruiObj.isExist
  4759.  
  4760. waitsecond(0)
  4761. end
  4762.  
  4763. tcase << TestAction.new(:deletethepicture) do
  4764. $ruiObj = RUIObject.new.with('objectid', -1328088200).with('selfid', 1434121712).with('textdescid', 864436336).with('uniqueparentid', -2095656440)
  4765. .with('uitreeindex', 8)
  4766. .with('classname', 'ImageView')
  4767. .with('resource-id', 'com.google.android.apps.photos:id/trash')
  4768. .with('content-desc', 'Trash')
  4769.  
  4770. $ruiObj.click
  4771.  
  4772. waitsecond(2)
  4773. end
  4774.  
  4775. tcase << TestAction.new(:logstop) do
  4776. $myTestResult = checkLastExistResult
  4777. if $myTestResult == false
  4778. $myFailReason == "Picture is not deleted."
  4779. end
  4780. logStopTest("05_01_07_06_MultiMedia")
  4781.  
  4782.  
  4783. waitsecond(2)
  4784. end
  4785.  
  4786. tcase << TestAction.new(:pressBack_7) do
  4787. pressBack
  4788.  
  4789. waitsecond(0)
  4790. end
  4791.  
  4792. tcase << TestAction.new(:pressBack_8) do
  4793. pressBack
  4794.  
  4795. waitsecond(0)
  4796. end
  4797.  
  4798. tcase << TestAction.new(:pressHome_8) do
  4799. pressHome
  4800.  
  4801. waitsecond(0)
  4802. end
  4803.  
  4804. tcase.run(loopTime)
  4805.  
  4806. end
  4807.  
  4808. def self.Multimedia_5_1_7_7(loopTime)
  4809.  
  4810. tcase = TestCase.new("Multimedia_5_1_7_7")
  4811.  
  4812. tcase << TestAction.new(:logstart) do
  4813. logStartTest("05_01_07_07_MultiMedia")
  4814.  
  4815. waitsecond(0)
  4816. end
  4817.  
  4818. tcase << TestAction.new(:gotomessages) do
  4819. gotoAppPixel("Messages")
  4820.  
  4821. waitsecond(2)
  4822. end
  4823.  
  4824. tcase << TestAction.new(:Startnewmessage) do
  4825. $ruiObj = RUIObject.new.with('objectid', 764419066).with('selfid', 916878134).with('textdescid', 48640071).with('uniqueparentid', 1408873138)
  4826. .with('uitreeindex', 6)
  4827. .with('classname', 'ImageView')
  4828. .with('resource-id', 'com.google.android.apps.messaging:id/start_new_conversation_button')
  4829. .with('content-desc', 'Start new conversation')
  4830.  
  4831. $ruiObj.click
  4832.  
  4833. waitsecond(2)
  4834. end
  4835.  
  4836. tcase << TestAction.new(:TextView_Skip_2) do
  4837. $ruiObj = RUIObject.new.with('objectid', 774774376).with('selfid', 692625717).with('textdescid', 125277897).with('uniqueparentid', 1739951846)
  4838. .with('uitreeindex', 3)
  4839. .with('classname', 'TextView')
  4840. .with('resource-id', 'com.google.android.apps.messaging:id/skip')
  4841. .with('text', 'SKIP')
  4842.  
  4843. $ruiObj.click
  4844.  
  4845. waitsecond(2)
  4846. end
  4847.  
  4848. tcase << TestAction.new(:TextView_Next_4) do
  4849. $ruiObj = RUIObject.new.with('objectid', 774620124).with('selfid', -737737443).with('textdescid', -1309712823).with('uniqueparentid', -1145423395)
  4850. .with('uitreeindex', 5)
  4851. .with('classname', 'TextView')
  4852. .with('resource-id', 'com.google.android.apps.messaging:id/next')
  4853. .with('text', 'NEXT')
  4854.  
  4855. $ruiObj.click
  4856.  
  4857. waitsecond(2)
  4858. end
  4859.  
  4860. tcase << TestAction.new(:Button_PermissionAllowButton_6) do
  4861. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  4862. .with('uitreeindex', 4)
  4863. .with('classname', 'Button')
  4864. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  4865. .with('text', 'ALLOW')
  4866.  
  4867. $ruiObj.click
  4868.  
  4869. waitsecond(2)
  4870. end
  4871.  
  4872. tcase << TestAction.new(:Button_PermissionAllowButton_8) do
  4873. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  4874. .with('uitreeindex', 4)
  4875. .with('classname', 'Button')
  4876. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  4877. .with('text', 'ALLOW')
  4878.  
  4879. $ruiObj.click
  4880.  
  4881. waitsecond(2)
  4882. end
  4883.  
  4884. tcase << TestAction.new(:Button_PermissionAllowButton_10) do
  4885. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  4886. .with('uitreeindex', 2)
  4887. .with('classname', 'Button')
  4888. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  4889. .with('text', 'ALLOW')
  4890.  
  4891. $ruiObj.click
  4892.  
  4893. waitsecond(2)
  4894. end
  4895.  
  4896. tcase << TestAction.new(:put_recipientnumber) do
  4897. $ruiObj = RUIObject.new.with('objectid', -1173212947).with('selfid', 1163803387).with('textdescid', -2009862957).with('uniqueparentid', 955347666).with('classresourceid', 461007471)
  4898. .with('uitreeindex', 1)
  4899. .with('classname', 'MultiAutoCompleteTextView')
  4900. .with('resource-id', 'com.google.android.apps.messaging:id/recipient_text_view')
  4901.  
  4902. $ruiObj.inputtext('4048612355')
  4903.  
  4904. waitsecond(2)
  4905. end
  4906.  
  4907. tcase << TestAction.new(:nextwindow) do
  4908. click(1354.5,2605.5)
  4909.  
  4910. waitsecond(2)
  4911. end
  4912.  
  4913. tcase << TestAction.new(:gotooption) do
  4914. $ruiObj = RUIObject.new.with('objectid', -1360420814).with('selfid', -952088716).with('textdescid', 1847611113).with('uniqueparentid', 1251875640)
  4915. .with('uitreeindex', 7)
  4916. .with('classname', 'ImageButton')
  4917. .with('resource-id', 'com.google.android.apps.messaging:id/attach_media_button')
  4918. .with('content-desc', 'Add an attachment')
  4919.  
  4920. $ruiObj.click
  4921.  
  4922. waitsecond(2)
  4923. end
  4924.  
  4925. tcase << TestAction.new(:changetorecordoption) do
  4926. $ruiObj = RUIObject.new.with('objectid', 1408822083).with('selfid', -645200276).with('textdescid', -334363612).with('uniqueparentid', -1874692983)
  4927. .with('uitreeindex', 28)
  4928. .with('classname', 'ImageButton')
  4929. .with('content-desc', 'Record audio')
  4930.  
  4931. $ruiObj.click
  4932.  
  4933. waitsecond(2)
  4934. end
  4935.  
  4936. tcase << TestAction.new(:clickallow) do
  4937. $ruiObj = RUIObject.new.with('objectid', -655699299).with('selfid', -1852985786).with('textdescid', -1480420102).with('uniqueparentid', -1331106569)
  4938. .with('uitreeindex', 13)
  4939. .with('classname', 'TextView')
  4940. .with('resource-id', 'com.google.android.apps.messaging:id/missing_permission_enable')
  4941. .with('text', 'ALLOW')
  4942.  
  4943. $ruiObj.click
  4944.  
  4945. waitsecond(2)
  4946. end
  4947.  
  4948. tcase << TestAction.new(:clickPermissionAllowButton) do
  4949. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  4950. .with('uitreeindex', 3)
  4951. .with('classname', 'Button')
  4952. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  4953. .with('text', 'ALLOW')
  4954.  
  4955. $ruiObj.click
  4956.  
  4957. waitsecond(2)
  4958. end
  4959.  
  4960. tcase << TestAction.new(:record5secondsmessage) do
  4961. swipe(597, 2053, 842, 2298, 500)
  4962.  
  4963. waitsecond(2)
  4964. end
  4965.  
  4966. tcase << TestAction.new(:playbuttonexist) do
  4967. $ruiObj = RUIObject.new.with('objectid', 28335571).with('selfid', 801742907).with('textdescid', -1823989396).with('uniqueparentid', 1321193562)
  4968. .with('uitreeindex', 7)
  4969. .with('classname', 'ImageView')
  4970. .with('resource-id', 'com.google.android.apps.messaging:id/play_button')
  4971. .with('content-desc', 'Play audio attachment')
  4972.  
  4973. $ruiObj.isExist
  4974.  
  4975. waitsecond(0)
  4976. end
  4977.  
  4978. tcase << TestAction.new(:logstop) do
  4979. $myTestResult = checkLastExistResult
  4980. if $myTestResult == false
  4981. $myFailReason == "Message is not recorded"
  4982. end
  4983. logStopTest("05_01_07_07_MultiMedia")
  4984.  
  4985.  
  4986. waitsecond(0)
  4987. end
  4988.  
  4989. tcase << TestAction.new(:pressBack_34) do
  4990. pressBack
  4991.  
  4992. waitsecond(0)
  4993. end
  4994.  
  4995. tcase << TestAction.new(:pressBack_35) do
  4996. pressBack
  4997.  
  4998. waitsecond(0)
  4999. end
  5000.  
  5001. tcase << TestAction.new(:pressBack_36) do
  5002. pressBack
  5003.  
  5004. waitsecond(0)
  5005. end
  5006.  
  5007. tcase << TestAction.new(:pressHome_37) do
  5008. pressHome
  5009.  
  5010. waitsecond(0)
  5011. end
  5012.  
  5013. tcase.run(loopTime)
  5014.  
  5015. end
  5016.  
  5017. def self.Multimedia_5_1_7_8(loopTime)
  5018.  
  5019. tcase = TestCase.new("Multimedia_5_1_7_8")
  5020.  
  5021. tcase << TestAction.new(:logstart) do
  5022. logStartTest("05_01_07_08_MultiMedia")
  5023.  
  5024. waitsecond(0)
  5025. end
  5026.  
  5027. tcase << TestAction.new(:gotomessages) do
  5028. gotoAppPixel("Messages")
  5029.  
  5030. waitsecond(2)
  5031. end
  5032.  
  5033. tcase << TestAction.new(:Startnewmessage) do
  5034. $ruiObj = RUIObject.new.with('objectid', 764419066).with('selfid', 916878134).with('textdescid', 48640071).with('uniqueparentid', 1408873138)
  5035. .with('uitreeindex', 6)
  5036. .with('classname', 'ImageView')
  5037. .with('resource-id', 'com.google.android.apps.messaging:id/start_new_conversation_button')
  5038. .with('content-desc', 'Start new conversation')
  5039.  
  5040. $ruiObj.click
  5041.  
  5042. waitsecond(2)
  5043. end
  5044.  
  5045. tcase << TestAction.new(:put_recipientnumber) do
  5046. $ruiObj = RUIObject.new.with('objectid', -1173212947).with('selfid', 1163803387).with('textdescid', -2009862957).with('uniqueparentid', 955347666).with('classresourceid', 461007471)
  5047. .with('uitreeindex', 1)
  5048. .with('classname', 'MultiAutoCompleteTextView')
  5049. .with('resource-id', 'com.google.android.apps.messaging:id/recipient_text_view')
  5050.  
  5051. $ruiObj.inputtext('8582499970')
  5052.  
  5053. waitsecond(2)
  5054. end
  5055.  
  5056. tcase << TestAction.new(:nextwindow) do
  5057. click(1354.5,2605.5)
  5058.  
  5059. waitsecond(2)
  5060. end
  5061.  
  5062. tcase << TestAction.new(:gotooption) do
  5063. $ruiObj = RUIObject.new.with('objectid', -1360420814).with('selfid', -952088716).with('textdescid', 1847611113).with('uniqueparentid', 1251875640)
  5064. .with('uitreeindex', 7)
  5065. .with('classname', 'ImageButton')
  5066. .with('resource-id', 'com.google.android.apps.messaging:id/attach_media_button')
  5067. .with('content-desc', 'Add an attachment')
  5068.  
  5069. $ruiObj.click
  5070.  
  5071. waitsecond(2)
  5072. end
  5073.  
  5074. tcase << TestAction.new(:changetorecordoption) do
  5075. $ruiObj = RUIObject.new.with('objectid', 1408822083).with('selfid', -645200276).with('textdescid', -334363612).with('uniqueparentid', -1874692983)
  5076. .with('uitreeindex', 28)
  5077. .with('classname', 'ImageButton')
  5078. .with('content-desc', 'Record audio')
  5079.  
  5080. $ruiObj.click
  5081.  
  5082. waitsecond(2)
  5083. end
  5084.  
  5085. tcase << TestAction.new(:clickallow) do
  5086. $ruiObj = RUIObject.new.with('objectid', -655699299).with('selfid', -1852985786).with('textdescid', -1480420102).with('uniqueparentid', -1331106569)
  5087. .with('uitreeindex', 13)
  5088. .with('classname', 'TextView')
  5089. .with('resource-id', 'com.google.android.apps.messaging:id/missing_permission_enable')
  5090. .with('text', 'ALLOW')
  5091.  
  5092. $ruiObj.click
  5093.  
  5094. waitsecond(2)
  5095. end
  5096.  
  5097. tcase << TestAction.new(:clickPermissionAllowButton) do
  5098. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  5099. .with('uitreeindex', 3)
  5100. .with('classname', 'Button')
  5101. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  5102. .with('text', 'ALLOW')
  5103.  
  5104. $ruiObj.click
  5105.  
  5106. waitsecond(2)
  5107. end
  5108.  
  5109. tcase << TestAction.new(:record5secondsmessage) do
  5110. swipe(597, 2053, 842, 2298, 500)
  5111.  
  5112. waitsecond(2)
  5113. end
  5114.  
  5115. tcase << TestAction.new(:playbuttonis_exist_1) do
  5116. $ruiObj = RUIObject.new.with('objectid', 28335571).with('selfid', 801742907).with('textdescid', -1823989396).with('uniqueparentid', 1321193562)
  5117. .with('uitreeindex', 7)
  5118. .with('classname', 'ImageView')
  5119. .with('resource-id', 'com.google.android.apps.messaging:id/play_button')
  5120. .with('content-desc', 'Play audio attachment')
  5121.  
  5122. $ruiObj.isExist
  5123.  
  5124. waitsecond(0)
  5125. end
  5126.  
  5127. tcase << TestAction.new(:playtherecord) do
  5128. $ruiObj = RUIObject.new.with('objectid', 28335571).with('selfid', 801742907).with('textdescid', -1823989396).with('uniqueparentid', 1321193562)
  5129. .with('uitreeindex', 7)
  5130. .with('classname', 'ImageView')
  5131. .with('resource-id', 'com.google.android.apps.messaging:id/play_button')
  5132. .with('content-desc', 'Play audio attachment')
  5133.  
  5134. $ruiObj.click
  5135.  
  5136. waitsecond(2)
  5137. end
  5138.  
  5139. tcase << TestAction.new(:logstop) do
  5140. $myTestResult = checkLastExistResult
  5141. if $myTestResult == false
  5142. $myFailReason == "Record is not played"
  5143. end
  5144. logStopTest("05_01_07_08_MultiMedia")
  5145.  
  5146.  
  5147. waitsecond(0)
  5148. end
  5149.  
  5150. tcase << TestAction.new(:pressBack_34) do
  5151. pressBack
  5152.  
  5153. waitsecond(0)
  5154. end
  5155.  
  5156. tcase << TestAction.new(:pressBack_35) do
  5157. pressBack
  5158.  
  5159. waitsecond(0)
  5160. end
  5161.  
  5162. tcase << TestAction.new(:pressBack_36) do
  5163. pressBack
  5164.  
  5165. waitsecond(0)
  5166. end
  5167.  
  5168. tcase << TestAction.new(:pressHome_37) do
  5169. pressHome
  5170.  
  5171. waitsecond(0)
  5172. end
  5173.  
  5174. tcase.run(loopTime)
  5175.  
  5176. end
  5177.  
  5178. def self.Multimedia_5_1_7_9(loopTime)
  5179.  
  5180. tcase = TestCase.new("Multimedia_5_1_7_9")
  5181.  
  5182. tcase << TestAction.new(:logstart) do
  5183. logStartTest("05_01_07_09_MultiMedia")
  5184.  
  5185. waitsecond(0)
  5186. end
  5187.  
  5188. tcase << TestAction.new(:gotomessages) do
  5189. gotoAppPixel("Messages")
  5190.  
  5191. waitsecond(2)
  5192. end
  5193.  
  5194. tcase << TestAction.new(:Startnewmessage) do
  5195. $ruiObj = RUIObject.new.with('objectid', 764419066).with('selfid', 916878134).with('textdescid', 48640071).with('uniqueparentid', 1408873138)
  5196. .with('uitreeindex', 6)
  5197. .with('classname', 'ImageView')
  5198. .with('resource-id', 'com.google.android.apps.messaging:id/start_new_conversation_button')
  5199. .with('content-desc', 'Start new conversation')
  5200.  
  5201. $ruiObj.click
  5202.  
  5203. waitsecond(2)
  5204. end
  5205.  
  5206. tcase << TestAction.new(:put_recipientnumber) do
  5207. $ruiObj = RUIObject.new.with('objectid', -1173212947).with('selfid', 1163803387).with('textdescid', -2009862957).with('uniqueparentid', 955347666).with('classresourceid', 461007471)
  5208. .with('uitreeindex', 1)
  5209. .with('classname', 'MultiAutoCompleteTextView')
  5210. .with('resource-id', 'com.google.android.apps.messaging:id/recipient_text_view')
  5211.  
  5212. $ruiObj.inputtext('8582499970')
  5213.  
  5214. waitsecond(2)
  5215. end
  5216.  
  5217. tcase << TestAction.new(:nextwindow) do
  5218. click(1354.5,2605.5)
  5219.  
  5220. waitsecond(2)
  5221. end
  5222.  
  5223. tcase << TestAction.new(:gotooption) do
  5224. $ruiObj = RUIObject.new.with('objectid', -1360420814).with('selfid', -952088716).with('textdescid', 1847611113).with('uniqueparentid', 1251875640)
  5225. .with('uitreeindex', 7)
  5226. .with('classname', 'ImageButton')
  5227. .with('resource-id', 'com.google.android.apps.messaging:id/attach_media_button')
  5228. .with('content-desc', 'Add an attachment')
  5229.  
  5230. $ruiObj.click
  5231.  
  5232. waitsecond(2)
  5233. end
  5234.  
  5235. tcase << TestAction.new(:changetorecordoption) do
  5236. $ruiObj = RUIObject.new.with('objectid', 1408822083).with('selfid', -645200276).with('textdescid', -334363612).with('uniqueparentid', -1874692983)
  5237. .with('uitreeindex', 28)
  5238. .with('classname', 'ImageButton')
  5239. .with('content-desc', 'Record audio')
  5240.  
  5241. $ruiObj.click
  5242.  
  5243. waitsecond(2)
  5244. end
  5245.  
  5246. tcase << TestAction.new(:clickallow) do
  5247. $ruiObj = RUIObject.new.with('objectid', -655699299).with('selfid', -1852985786).with('textdescid', -1480420102).with('uniqueparentid', -1331106569)
  5248. .with('uitreeindex', 13)
  5249. .with('classname', 'TextView')
  5250. .with('resource-id', 'com.google.android.apps.messaging:id/missing_permission_enable')
  5251. .with('text', 'ALLOW')
  5252.  
  5253. $ruiObj.click
  5254.  
  5255. waitsecond(2)
  5256. end
  5257.  
  5258. tcase << TestAction.new(:clickPermissionAllowButton) do
  5259. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  5260. .with('uitreeindex', 3)
  5261. .with('classname', 'Button')
  5262. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  5263. .with('text', 'ALLOW')
  5264.  
  5265. $ruiObj.click
  5266.  
  5267. waitsecond(2)
  5268. end
  5269.  
  5270. tcase << TestAction.new(:record5secondsmessage) do
  5271. swipe(597, 2053, 842, 2298, 500)
  5272.  
  5273. waitsecond(2)
  5274. end
  5275.  
  5276. tcase << TestAction.new(:ImageButton_CloseButton_3) do
  5277. $ruiObj = RUIObject.new.with('objectid', -8145267).with('selfid', -966281882).with('textdescid', 812421240).with('uniqueparentid', 108696351)
  5278. .with('uitreeindex', 8)
  5279. .with('classname', 'ImageButton')
  5280. .with('resource-id', 'com.google.android.apps.messaging:id/close_button')
  5281. .with('content-desc', 'Discard attachment')
  5282.  
  5283. $ruiObj.click
  5284.  
  5285. waitsecond(2)
  5286. end
  5287.  
  5288. tcase << TestAction.new(:ImageButton_CloseButton_5) do
  5289. $ruiObj = RUIObject.new.with('objectid', -8145267).with('selfid', -966281882).with('textdescid', 812421240).with('uniqueparentid', 108696351)
  5290. .with('uitreeindex', 8)
  5291. .with('classname', 'ImageButton')
  5292. .with('resource-id', 'com.google.android.apps.messaging:id/close_button')
  5293. .with('content-desc', 'Discard attachment')
  5294.  
  5295. $ruiObj.isExist
  5296.  
  5297. waitsecond(0)
  5298. end
  5299.  
  5300. tcase << TestAction.new(:logstop) do
  5301. $myTestResult = !checkLastExistResult
  5302. if $myTestResult == false
  5303. $myFailReason == "Record is not deleted"
  5304. end
  5305. logStopTest("05_01_07_09_MultiMedia")
  5306.  
  5307.  
  5308. waitsecond(0)
  5309. end
  5310.  
  5311. tcase << TestAction.new(:pressBack_34) do
  5312. pressBack
  5313.  
  5314. waitsecond(0)
  5315. end
  5316.  
  5317. tcase << TestAction.new(:pressBack_35) do
  5318. pressBack
  5319.  
  5320. waitsecond(0)
  5321. end
  5322.  
  5323. tcase << TestAction.new(:pressBack_36) do
  5324. pressBack
  5325.  
  5326. waitsecond(0)
  5327. end
  5328.  
  5329. tcase << TestAction.new(:pressHome_37) do
  5330. pressHome
  5331.  
  5332. waitsecond(0)
  5333. end
  5334.  
  5335. tcase.run(loopTime)
  5336.  
  5337. end
  5338.  
  5339. def self.NFC_5_1_11_1(loopTime)
  5340.  
  5341. tcase = TestCase.new("NFC_5_1_11_1")
  5342.  
  5343. tcase << TestAction.new(:Home) do
  5344. pressHome
  5345.  
  5346. waitsecond(2)
  5347. end
  5348.  
  5349. tcase << TestAction.new(:logStart) do
  5350. logStartTest("NFC_5_1_11_1")
  5351.  
  5352. waitsecond(0)
  5353. end
  5354.  
  5355. tcase << TestAction.new(:GotoSettings) do
  5356. gotoAppPixel('Settings')
  5357.  
  5358.  
  5359. waitsecond(2)
  5360. end
  5361.  
  5362. tcase << TestAction.new(:ConnectedDevice) do
  5363. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', -2089735067).with('textdescid', 48216771).with('uniqueparentid', -1387883596)
  5364. .with('uitreeindex', 13)
  5365. .with('classname', 'TextView')
  5366. .with('resource-id', 'android:id/title')
  5367. .with('text', 'Connected devices')
  5368.  
  5369. $ruiObj.click
  5370.  
  5371. waitsecond(2)
  5372. end
  5373.  
  5374. tcase << TestAction.new(:Off1) do
  5375. $NFCon = RUIObject.new.with('objectid', 104348776).with('selfid', 411050777).with('textdescid', 2105771625).with('uniqueparentid', 1207404591)
  5376. .with('uitreeindex', 14)
  5377. .with('classname', 'Switch')
  5378. .with('resource-id', 'android:id/switch_widget')
  5379. .with('text', 'ON')
  5380.  
  5381. if $NFCon.isExist
  5382. $NFCon.click
  5383. end
  5384.  
  5385. waitsecond(2)
  5386. end
  5387.  
  5388. tcase << TestAction.new(:On) do
  5389. $NFCoff = RUIObject.new.with('objectid', 104348776).with('selfid', -142327979).with('textdescid', 854404457).with('uniqueparentid', -1225169821)
  5390. .with('uitreeindex', 13)
  5391. .with('classname', 'Switch')
  5392. .with('resource-id', 'android:id/switch_widget')
  5393. .with('text', 'OFF')
  5394.  
  5395. if $NFCoff.isExist
  5396. $NFCoff.click
  5397. end
  5398.  
  5399. waitsecond(2)
  5400. end
  5401.  
  5402. tcase << TestAction.new(:Wait10Sec) do
  5403. waitsecond(10)
  5404.  
  5405. waitsecond(2)
  5406. end
  5407.  
  5408. tcase << TestAction.new(:FailCheck) do
  5409. $ruiObj = RUIObject.new.with('objectid', 104348776).with('selfid', 411050777).with('textdescid', 2105771625).with('uniqueparentid', 1207404591)
  5410. .with('uitreeindex', 13)
  5411. .with('classname', 'Switch')
  5412. .with('resource-id', 'android:id/switch_widget')
  5413. .with('text', 'ON')
  5414.  
  5415. $ruiObj.isExist
  5416.  
  5417. waitsecond(0)
  5418. end
  5419.  
  5420. tcase << TestAction.new(:Result) do
  5421. $myTestResult = checkLastExistResult
  5422.  
  5423. waitsecond(0)
  5424. end
  5425.  
  5426. tcase << TestAction.new(:Off2) do
  5427. $NFCon = RUIObject.new.with('objectid', 104348776).with('selfid', 411050777).with('textdescid', 2105771625).with('uniqueparentid', 1207404591)
  5428. .with('uitreeindex', 14)
  5429. .with('classname', 'Switch')
  5430. .with('resource-id', 'android:id/switch_widget')
  5431. .with('text', 'ON')
  5432.  
  5433. if $NFCon.isExist
  5434. $NFCon.click
  5435. end
  5436.  
  5437. waitsecond(2)
  5438. end
  5439.  
  5440. tcase << TestAction.new(:logStop) do
  5441. logStopTest("NFC_5_1_11_1")
  5442.  
  5443. waitsecond(0)
  5444. end
  5445.  
  5446. tcase.run(loopTime)
  5447.  
  5448. end
  5449.  
  5450. def self.PIM_05_01_06_01(loopTime)
  5451.  
  5452. tcase = TestCase.new("PIM_05_01_06_01")
  5453.  
  5454. tcase << TestAction.new(:scriptAction_StartTestLog) do
  5455. logStartTest("05_01_06_01_PIM")
  5456. end
  5457.  
  5458. tcase << TestAction.new(:gotoApp_4) do
  5459. gotoApp('Calendar')
  5460.  
  5461. waitsecond(2)
  5462. end
  5463.  
  5464. tcase << TestAction.new(:ImageView_3) do
  5465. $ruiObj = RUIObject.new.with('objectid', -30724256).with('selfid', 1125864064).with('textdescid', -952451904).with('uniqueparentid', 0)
  5466. .with('uitreeindex', 23)
  5467. .with('pretext', 'SAT')
  5468. .with('classname', 'ImageView')
  5469.  
  5470. $ruiObj.click
  5471.  
  5472. waitsecond(2)
  5473. end
  5474.  
  5475. tcase << TestAction.new(:EditText_Title_7) do
  5476. $ruiObj = RUIObject.new.with('objectid', -308497519).with('selfid', 2023914653).with('textdescid', -973488465).with('uniqueparentid', 0).with('classresourceid', 1943514993)
  5477. .with('uitreeindex', 4)
  5478. .with('classname', 'EditText')
  5479. .with('resource-id', 'com.android.calendar:id/title')
  5480.  
  5481. $ruiObj.inputtext('Event')
  5482.  
  5483. waitsecond(2)
  5484. end
  5485.  
  5486. tcase << TestAction.new(:Button_BtnDone_9) do
  5487. $ruiObj = RUIObject.new.with('objectid', 2099795980).with('selfid', 2133354936).with('textdescid', -644044497).with('uniqueparentid', 0)
  5488. .with('uitreeindex', 32)
  5489. .with('classname', 'Button')
  5490. .with('resource-id', 'com.android.calendar:id/btn_done')
  5491. .with('text', 'SAVE')
  5492.  
  5493. $ruiObj.click
  5494.  
  5495. waitsecond(2)
  5496. end
  5497.  
  5498. tcase << TestAction.new(:wait1second_11) do
  5499. waitsecond(1)
  5500. end
  5501.  
  5502. tcase << TestAction.new(:scriptAction_LogStopTest) do
  5503. $myTestResult = checkLastExistResult
  5504.  
  5505. if $myTestResult == false
  5506. $myFailReason = "End button not found"
  5507. end
  5508. logStopTest("05_01_06_01_PIM")
  5509. end
  5510.  
  5511. tcase << TestAction.new(:pressBack_14) do
  5512. pressBack
  5513. end
  5514.  
  5515. tcase << TestAction.new(:pressBack_16) do
  5516. pressBack
  5517. end
  5518.  
  5519. tcase << TestAction.new(:pressHome_2) do
  5520. pressHome
  5521. end
  5522.  
  5523. tcase.run(loopTime)
  5524.  
  5525. end
  5526.  
  5527. def self.PIM_5_1_6_1(loopTime)
  5528.  
  5529. tcase = TestCase.new("PIM_5_1_6_1")
  5530.  
  5531. tcase << TestAction.new(:scriptAction_1) do
  5532. i = 0
  5533. n = 0
  5534.  
  5535. gotoAppPixel("Calendar")
  5536.  
  5537. waitsecond(3)
  5538.  
  5539. while n < 3 do
  5540. RUIObject.new.with('objectid', 1039155013).with('selfid', -773553589).with('textdescid', -1562943423).with('uniqueparentid', 1761562046)
  5541. .with('uitreeindex', 4)
  5542. .with('classname', 'ImageView')
  5543. .with('resource-id', 'com.google.android.calendar:id/right_arrow')
  5544. .with('content-desc', 'next page').click
  5545.  
  5546. waitsecond(3)
  5547.  
  5548. n += 1
  5549. end
  5550.  
  5551. RUIObject.new.with('objectid', -1343654405).with('selfid', -1828804226).with('textdescid', 769111461).with('uniqueparentid', 1254931512)
  5552. .with('uitreeindex', 4)
  5553. .with('classname', 'Button')
  5554. .with('resource-id', 'com.google.android.calendar:id/done_button')
  5555. .with('content-desc', 'Got it')
  5556. .with('text', 'GOT IT').click
  5557.  
  5558. waitsecond(3)
  5559.  
  5560. while i < 5 do
  5561.  
  5562. logStartTest("PIM_5_1_6_1")
  5563.  
  5564. RUIObject.new.with('objectid', -173740453).with('selfid', 220763148).with('textdescid', 356821123).with('uniqueparentid', -1214616113)
  5565. .with('uitreeindex', 0)
  5566. .with('classname', 'ImageButton')
  5567. .with('resource-id', 'com.google.android.calendar:id/floating_action_button')
  5568. .with('content-desc', 'Create new event and more').click
  5569.  
  5570. waitsecond(3)
  5571.  
  5572. RUIObject.new.with('objectid', 127015164).with('selfid', 498557039).with('textdescid', 42594724).with('uniqueparentid', -1133067901)
  5573. .with('uitreeindex', 4)
  5574. .with('pretext', 'Event')
  5575. .with('classname', 'ImageView')
  5576. .with('resource-id', 'com.google.android.calendar:id/speed_dial_icon')
  5577. .with('content-desc', '').click
  5578.  
  5579. waitsecond(3)
  5580.  
  5581. RUIObject.new.with('objectid', -2070965006).with('selfid', -1061118606).with('textdescid', 1487763652).with('uniqueparentid', 1410610442).with('classresourceid', 395678146)
  5582. .with('uitreeindex', 7)
  5583. .with('classname', 'TextView')
  5584. .with('resource-id', 'com.google.android.calendar:id/start_date').click
  5585.  
  5586. waitsecond(3)
  5587.  
  5588. RUIObject.new.with('objectid', -241964648).with('selfid', -834019104).with('textdescid', 1286379225).with('uniqueparentid', 507709356).with('classresourceid', 1815484335)
  5589. .with('uitreeindex', 2)
  5590. .with('classname', 'android.view.View')
  5591. .with('content-desc', '0'+db("Calendar")[i]+' May 2017')
  5592. .with('text', 'db("Calendar")[1]').click
  5593.  
  5594. waitsecond(3)
  5595.  
  5596. RUIObject.new.with('objectid', 1424815732).with('selfid', -1318451484).with('textdescid', -1879811560).with('uniqueparentid', -2069065518).with('classresourceid', 1834539358)
  5597. .with('uitreeindex', 36)
  5598. .with('classname', 'Button')
  5599. .with('resource-id', 'android:id/button1')
  5600. .with('text', 'OK').click
  5601.  
  5602. waitsecond(3)
  5603.  
  5604.  
  5605.  
  5606. RUIObject.new.with('objectid', -1341455097).with('selfid', 870535911).with('textdescid', 1753902570).with('uniqueparentid', -1107284276)
  5607. .with('uitreeindex', 2)
  5608. .with('classname', 'Button')
  5609. .with('resource-id', 'com.google.android.calendar:id/save')
  5610. .with('text', 'SAVE').click
  5611.  
  5612. waitsecond(3)
  5613.  
  5614. RUIObject.new.with('objectid', -173740453).with('selfid', 220763148).with('textdescid', 356821123).with('uniqueparentid', -1214616113)
  5615. .with('uitreeindex', 0)
  5616. .with('classname', 'ImageButton')
  5617. .with('resource-id', 'com.google.android.calendar:id/floating_action_button')
  5618. .with('content-desc', 'Create new event and more').isExist
  5619.  
  5620. waitsecond(3)
  5621.  
  5622. $myTestResult = checkLastExistResult
  5623.  
  5624. logStopTest("PIM_5_1_6_1")
  5625.  
  5626.  
  5627. i += 1
  5628. end
  5629.  
  5630. pressBack
  5631. pressHome
  5632.  
  5633. waitsecond(2)
  5634. end
  5635.  
  5636. tcase.run(loopTime)
  5637.  
  5638. end
  5639.  
  5640. def self.PIM_5_1_6_2(loopTime)
  5641.  
  5642. tcase = TestCase.new("PIM_5_1_6_2")
  5643.  
  5644. tcase << TestAction.new(:Start_Log) do
  5645. logStartTest("PIM_5_1_6_2")
  5646.  
  5647. waitsecond(0)
  5648. end
  5649.  
  5650. tcase << TestAction.new(:Clock) do
  5651. gotoAppPixel("Clock")
  5652.  
  5653. waitsecond(2)
  5654. end
  5655.  
  5656. tcase << TestAction.new(:Click_AlarmTab) do
  5657. $ruiObj = RUIObject.new.with('objectid', 1398250823).with('selfid', 1155694879).with('textdescid', -2067701496).with('uniqueparentid', 1343446106)
  5658. .with('uitreeindex', 0)
  5659. .with('classname', 'TextView')
  5660. .with('text', 'ALARM')
  5661.  
  5662. $ruiObj.click
  5663.  
  5664. waitsecond(2)
  5665. end
  5666.  
  5667. tcase << TestAction.new(:Create_Alarm) do
  5668. $ruiObj = RUIObject.new.with('objectid', -675199108).with('selfid', 1376996000).with('textdescid', -42904882).with('uniqueparentid', -647720292)
  5669. .with('uitreeindex', 16)
  5670. .with('classname', 'ImageButton')
  5671. .with('resource-id', 'com.google.android.deskclock:id/fab')
  5672. .with('content-desc', 'Add alarm')
  5673.  
  5674. $ruiObj.click
  5675.  
  5676. waitsecond(2)
  5677. end
  5678.  
  5679. tcase << TestAction.new(:Click_OK) do
  5680. $ruiObj = RUIObject.new.with('objectid', 1329788078).with('selfid', -1318451484).with('textdescid', 1447865170).with('uniqueparentid', 1005760344).with('classresourceid', 1834539358)
  5681. .with('uitreeindex', 19)
  5682. .with('classname', 'Button')
  5683. .with('resource-id', 'android:id/button1')
  5684. .with('text', 'OK')
  5685.  
  5686. $ruiObj.click
  5687.  
  5688. waitsecond(2)
  5689. end
  5690.  
  5691. tcase << TestAction.new(:Check_Delete) do
  5692. $ruiObj = RUIObject.new.with('objectid', 30134492).with('selfid', 16045296).with('textdescid', -946628495).with('uniqueparentid', -579144048)
  5693. .with('uitreeindex', 23)
  5694. .with('classname', 'Button')
  5695. .with('resource-id', 'com.google.android.deskclock:id/delete')
  5696. .with('text', 'Delete')
  5697.  
  5698. $ruiObj.isExist
  5699.  
  5700. waitsecond(0)
  5701. end
  5702.  
  5703. tcase << TestAction.new(:Alarm_Off) do
  5704. $ruiObj = RUIObject.new.with('objectid', 1189886877).with('selfid', -1968976493).with('textdescid', 957014814).with('uniqueparentid', 1693277107)
  5705. .with('uitreeindex', 7)
  5706. .with('classname', 'Switch')
  5707. .with('resource-id', 'com.google.android.deskclock:id/onoff')
  5708. .with('text', 'ON')
  5709.  
  5710. $ruiObj.click
  5711.  
  5712. waitsecond(2)
  5713. end
  5714.  
  5715. tcase << TestAction.new(:End_Log) do
  5716. $myTestResult = checkLastExistResult
  5717.  
  5718. logStopTest("PIM_5_1_6_2")
  5719.  
  5720. waitsecond(0)
  5721. end
  5722.  
  5723. tcase << TestAction.new(:pressBack_11) do
  5724. pressBack
  5725.  
  5726. waitsecond(0)
  5727. end
  5728.  
  5729. tcase << TestAction.new(:pressHome_12) do
  5730. pressHome
  5731.  
  5732. waitsecond(0)
  5733. end
  5734.  
  5735. tcase.run(loopTime)
  5736.  
  5737. end
  5738.  
  5739. def self.PIM_5_1_6_3(loopTime)
  5740.  
  5741. tcase = TestCase.new("PIM_5_1_6_3")
  5742.  
  5743. tcase << TestAction.new(:scriptAction_1) do
  5744. i = 0
  5745.  
  5746. gotoAppPixel("Calendar")
  5747.  
  5748. waitsecond(3)
  5749.  
  5750. RUIObject.new.with('objectid', -947681391).with('selfid', -2132232079).with('textdescid', 1447189041).with('uniqueparentid', -648635418)
  5751. .with('uitreeindex', 1)
  5752. .with('classname', 'ImageButton')
  5753. .with('content-desc', 'Show Calendar List and Settings drawer').click
  5754.  
  5755. waitsecond(3)
  5756.  
  5757. RUIObject.new.with('objectid', 1940182694).with('selfid', -657992039).with('textdescid', -1445067654).with('uniqueparentid', 1633433281).with('classresourceid', -498129859)
  5758. .with('uitreeindex', 31)
  5759. .with('classname', 'TextView')
  5760. .with('resource-id', 'com.google.android.calendar:id/label')
  5761. .with('text', 'Month').click
  5762.  
  5763. waitsecond(3)
  5764.  
  5765. uitree.q("android.view.View@@0@").click
  5766.  
  5767. waitsecond(3)
  5768.  
  5769. while i < 5 do
  5770.  
  5771. logStartTest("PIM_5_1_6_3")
  5772.  
  5773. waitsecond(3)
  5774.  
  5775. if i > 0
  5776.  
  5777. uitree.q("android.view.View@@0@").click
  5778.  
  5779. waitsecond(3)
  5780.  
  5781. swipe_horizontal 50
  5782.  
  5783. uitree.q("android.view.View@@0@").click
  5784.  
  5785. waitsecond(3)
  5786.  
  5787. uitree.q("android.view.View@@0@").click
  5788.  
  5789. waitsecond(3)
  5790.  
  5791. uitree.q("android.view.View@@0@").click
  5792.  
  5793. waitsecond(3)
  5794.  
  5795. else
  5796.  
  5797. uitree.q("android.view.View@@0@").click
  5798.  
  5799. waitsecond(3)
  5800.  
  5801. uitree.q("android.view.View@@0@").click
  5802.  
  5803. waitsecond(3)
  5804.  
  5805. end
  5806.  
  5807. RUIObject.new.with('objectid', -1337459766).with('selfid', 1290820192).with('textdescid', -1829626039).with('uniqueparentid', -1060096944)
  5808. .with('uitreeindex', 1)
  5809. .with('classname', 'ImageButton')
  5810. .with('content-desc', 'More options').click
  5811.  
  5812. waitsecond(3)
  5813.  
  5814. RUIObject.new.with('objectid', 1212207054).with('selfid', -342341268).with('textdescid', 1759216995).with('uniqueparentid', -382238014).with('classresourceid', 490183159)
  5815. .with('uitreeindex', 0)
  5816. .with('classname', 'TextView')
  5817. .with('resource-id', 'android:id/title')
  5818. .with('text', 'Delete').click
  5819.  
  5820. waitsecond(3)
  5821.  
  5822. RUIObject.new.with('objectid', 1424815732).with('selfid', 982364851).with('textdescid', 502569513).with('uniqueparentid', -102833181).with('classresourceid', 1834539358)
  5823. .with('uitreeindex', 3)
  5824. .with('classname', 'Button')
  5825. .with('resource-id', 'android:id/button1')
  5826. .with('text', 'DELETE').isExist
  5827.  
  5828. waitsecond(3)
  5829.  
  5830. RUIObject.new.with('objectid', 1424815732).with('selfid', 982364851).with('textdescid', 502569513).with('uniqueparentid', -102833181).with('classresourceid', 1834539358)
  5831. .with('uitreeindex', 3)
  5832. .with('classname', 'Button')
  5833. .with('resource-id', 'android:id/button1')
  5834. .with('text', 'DELETE').click
  5835.  
  5836. waitsecond(3)
  5837.  
  5838. uitree.q("android.view.View@@0@").click
  5839.  
  5840. waitsecond(3)
  5841.  
  5842. $myTestResult = checkLastExistResult
  5843.  
  5844. logStopTest("PIM_5_1_6_3")
  5845.  
  5846.  
  5847. i += 1
  5848. end
  5849.  
  5850. pressBack
  5851. pressHome
  5852.  
  5853. waitsecond(2)
  5854. end
  5855.  
  5856. tcase.run(loopTime)
  5857.  
  5858. end
  5859.  
  5860. def self.PIM_5_1_6_4(loopTime)
  5861.  
  5862. tcase = TestCase.new("PIM_5_1_6_4")
  5863.  
  5864. tcase << TestAction.new(:Start_Log) do
  5865. logStartTest("PIM_5_1_6_4")
  5866.  
  5867. waitsecond(0)
  5868. end
  5869.  
  5870. tcase << TestAction.new(:Clock) do
  5871. gotoAppPixel("Clock")
  5872.  
  5873. waitsecond(2)
  5874. end
  5875.  
  5876. tcase << TestAction.new(:Click_AlarmTab) do
  5877. $ruiObj = RUIObject.new.with('objectid', 1398250823).with('selfid', 1155694879).with('textdescid', -2067701496).with('uniqueparentid', 1343446106)
  5878. .with('uitreeindex', 0)
  5879. .with('classname', 'TextView')
  5880. .with('text', 'ALARM')
  5881.  
  5882. $ruiObj.click
  5883.  
  5884. waitsecond(2)
  5885. end
  5886.  
  5887. tcase << TestAction.new(:Check_Alarm) do
  5888. $ruiObj = RUIObject.new.with('objectid', -1717301025).with('selfid', -1665247246).with('textdescid', -993494140).with('uniqueparentid', 2079641362)
  5889. .with('uitreeindex', 8)
  5890. .with('classname', 'CheckBox')
  5891. .with('resource-id', 'com.google.android.deskclock:id/repeat_onoff')
  5892. .with('text', 'Repeat')
  5893.  
  5894. $ruiObj.isNotExist
  5895. ifFailJumpTo(:Click_Delete)
  5896.  
  5897. waitsecond(0)
  5898. end
  5899.  
  5900. tcase << TestAction.new(:Expand_Alarm) do
  5901. $ruiObj = RUIObject.new.with('objectid', -553129188).with('selfid', 380069409).with('textdescid', 1044151343).with('uniqueparentid', 792291641)
  5902. .with('uitreeindex', 9)
  5903. .with('classname', 'ImageButton')
  5904. .with('resource-id', 'com.google.android.deskclock:id/arrow')
  5905. .with('content-desc', 'Expand alarm')
  5906.  
  5907. $ruiObj.click
  5908.  
  5909. waitsecond(2)
  5910. end
  5911.  
  5912. tcase << TestAction.new(:Click_Delete) do
  5913. $ruiObj = RUIObject.new.with('objectid', 30134492).with('selfid', 16045296).with('textdescid', -946628495).with('uniqueparentid', -53158187)
  5914. .with('uitreeindex', 13)
  5915. .with('classname', 'Button')
  5916. .with('resource-id', 'com.google.android.deskclock:id/delete')
  5917. .with('text', 'Delete')
  5918.  
  5919. $ruiObj.click
  5920.  
  5921. waitsecond(2)
  5922. end
  5923.  
  5924. tcase << TestAction.new(:Check_Delete_DNE) do
  5925. $ruiObj = RUIObject.new.with('objectid', 30134492).with('selfid', 16045296).with('textdescid', -946628495).with('uniqueparentid', -53158187)
  5926. .with('uitreeindex', 13)
  5927. .with('classname', 'Button')
  5928. .with('resource-id', 'com.google.android.deskclock:id/delete')
  5929. .with('text', 'Delete')
  5930.  
  5931. $ruiObj.isExist
  5932.  
  5933. waitsecond(0)
  5934. end
  5935.  
  5936. tcase << TestAction.new(:End_Log) do
  5937. $myTestResult = !checkLastExistResult
  5938.  
  5939. logStopTest("PIM_5_1_6_4")
  5940.  
  5941. waitsecond(0)
  5942. end
  5943.  
  5944. tcase << TestAction.new(:pressBack_10) do
  5945. pressBack
  5946.  
  5947. waitsecond(0)
  5948. end
  5949.  
  5950. tcase << TestAction.new(:pressHome_11) do
  5951. pressHome
  5952.  
  5953. waitsecond(0)
  5954. end
  5955.  
  5956. tcase.run(loopTime)
  5957.  
  5958. end
  5959.  
  5960. def self.mainLoop(loopTime)
  5961.  
  5962. WebSocketXServer.setAutoUpdate(false)
  5963.  
  5964. index = $mainResumeMainLoop
  5965. $mainResumeMainLoop = 0
  5966.  
  5967. writelog("mainLoop::#{index}::Resume") if index > 0
  5968.  
  5969. while index < loopTime
  5970.  
  5971. $curMainLoopNum = index
  5972.  
  5973. $actionParamInput = "none"
  5974. startTest 1
  5975.  
  5976. waitsecond(2)
  5977.  
  5978. $actionParamInput = "none"
  5979. Telephony_5_1_1_1 20
  5980.  
  5981. waitsecond(2)
  5982.  
  5983. $actionParamInput = "none"
  5984. Telephony_5_1_1_2 60
  5985.  
  5986. waitsecond(2)
  5987.  
  5988. $actionParamInput = "none"
  5989. Telephony_5_1_1_3 20
  5990.  
  5991. waitsecond(2)
  5992.  
  5993. $actionParamInput = "none"
  5994. Telephony_5_1_1_4 60
  5995.  
  5996. waitsecond(2)
  5997.  
  5998. $actionParamInput = "none"
  5999. Telephony_5_1_1_6_7 20
  6000.  
  6001. waitsecond(2)
  6002.  
  6003. $actionParamInput = "none"
  6004. Messaging_5_1_2_3 50
  6005.  
  6006. waitsecond(2)
  6007.  
  6008. $actionParamInput = "none"
  6009. Messaging_5_1_2_5 50
  6010.  
  6011. waitsecond(2)
  6012.  
  6013. $actionParamInput = "none"
  6014. Messaging_5_1_2_6 50
  6015.  
  6016. waitsecond(2)
  6017.  
  6018. $actionParamInput = "none"
  6019. Store_Front_5_1_5_1 20
  6020.  
  6021. waitsecond(2)
  6022.  
  6023. $actionParamInput = "none"
  6024. Store_Front_5_1_5_2 10
  6025.  
  6026. waitsecond(2)
  6027.  
  6028. $actionParamInput = "none"
  6029. Store_Front_5_1_5_3 10
  6030.  
  6031. waitsecond(2)
  6032.  
  6033. $actionParamInput = "none"
  6034. PIM_5_1_6_1 1
  6035.  
  6036. waitsecond(2)
  6037.  
  6038. $actionParamInput = "none"
  6039. PIM_5_1_6_2 1
  6040.  
  6041. waitsecond(2)
  6042.  
  6043. $actionParamInput = "none"
  6044. PIM_5_1_6_3 1
  6045.  
  6046. waitsecond(2)
  6047.  
  6048. $actionParamInput = "none"
  6049. PIM_5_1_6_4 1
  6050.  
  6051. waitsecond(2)
  6052.  
  6053. $actionParamInput = "none"
  6054. Multimedia_5_1_7_1 1
  6055.  
  6056. waitsecond(2)
  6057.  
  6058. $actionParamInput = "none"
  6059. Multimedia_5_1_7_2 1
  6060.  
  6061. waitsecond(2)
  6062.  
  6063. $actionParamInput = "none"
  6064. Multimedia_5_1_7_3 1
  6065.  
  6066. waitsecond(2)
  6067.  
  6068. $actionParamInput = "none"
  6069. Multimedia_5_1_7_4 20
  6070.  
  6071. waitsecond(2)
  6072.  
  6073. $actionParamInput = "none"
  6074. Multimedia_5_1_7_5 20
  6075.  
  6076. waitsecond(2)
  6077.  
  6078. $actionParamInput = "none"
  6079. Multimedia_5_1_7_6 20
  6080.  
  6081. waitsecond(2)
  6082.  
  6083. $actionParamInput = "none"
  6084. Multimedia_5_1_7_7 1
  6085.  
  6086. waitsecond(2)
  6087.  
  6088. $actionParamInput = "none"
  6089. Multimedia_5_1_7_8 1
  6090.  
  6091. waitsecond(2)
  6092.  
  6093. $actionParamInput = "none"
  6094. Multimedia_5_1_7_9 1
  6095.  
  6096. waitsecond(2)
  6097.  
  6098. $actionParamInput = "none"
  6099. Multimedia_5_1_7_10 10
  6100.  
  6101. waitsecond(2)
  6102.  
  6103. $actionParamInput = "none"
  6104. Multimedia_5_1_7_11 20
  6105.  
  6106. waitsecond(2)
  6107.  
  6108. $actionParamInput = "none"
  6109. Multimedia_5_1_7_12 50
  6110.  
  6111. waitsecond(2)
  6112.  
  6113. $actionParamInput = "none"
  6114. Multimedia_5_1_7_13 1
  6115.  
  6116. waitsecond(2)
  6117.  
  6118. $actionParamInput = "none"
  6119. MultiTasking_5_1_8_1 1
  6120.  
  6121. waitsecond(2)
  6122.  
  6123. $actionParamInput = "none"
  6124. MultiTasking_5_1_8_2 50
  6125.  
  6126. waitsecond(2)
  6127.  
  6128. $actionParamInput = "none"
  6129. MultiTasking_5_1_8_3 1
  6130.  
  6131. waitsecond(2)
  6132.  
  6133. $actionParamInput = "none"
  6134. MultiTasking_5_1_8_4 1
  6135.  
  6136. waitsecond(2)
  6137.  
  6138. $actionParamInput = "none"
  6139. MultiTasking_5_1_8_5 50
  6140.  
  6141. waitsecond(2)
  6142.  
  6143. $actionParamInput = "none"
  6144. MultiTasking_5_1_8_6 1
  6145.  
  6146. waitsecond(2)
  6147.  
  6148. $actionParamInput = "none"
  6149. MenuNav_5_1_9_1 1
  6150.  
  6151. waitsecond(2)
  6152.  
  6153. $actionParamInput = "none"
  6154. WiFi_5_1_10_1 20
  6155.  
  6156. waitsecond(2)
  6157.  
  6158. $actionParamInput = "none"
  6159. WiFi_5_1_10_2 20
  6160.  
  6161. waitsecond(2)
  6162.  
  6163. $actionParamInput = "none"
  6164. IPME_5_1_15_2 75
  6165.  
  6166. waitsecond(2)
  6167.  
  6168. $actionParamInput = "none"
  6169. IPME_5_1_15_4 75
  6170.  
  6171. waitsecond(2)
  6172.  
  6173.  
  6174. if rand(100) < 0
  6175.  
  6176. $actionParamInput = "none"
  6177. Email_Precondition 1
  6178.  
  6179. waitsecond(2)
  6180.  
  6181. end
  6182.  
  6183.  
  6184. $actionParamInput = "none"
  6185. EMAIL_5_1_3_1 50
  6186.  
  6187. waitsecond(2)
  6188.  
  6189. $actionParamInput = "none"
  6190. EMAIL_5_1_3_2 50
  6191.  
  6192. waitsecond(2)
  6193.  
  6194.  
  6195. if rand(100) < 0
  6196.  
  6197. $actionParamInput = "none"
  6198. Browser_Precondition 1
  6199.  
  6200. waitsecond(2)
  6201.  
  6202. end
  6203.  
  6204.  
  6205. $actionParamInput = "none"
  6206. Browser_5_1_4_1 50
  6207.  
  6208. waitsecond(2)
  6209.  
  6210. $actionParamInput = "none"
  6211. Browser_5_1_4_2 50
  6212.  
  6213. waitsecond(2)
  6214.  
  6215. $actionParamInput = "none"
  6216. Browser_5_1_4_3 10
  6217.  
  6218. waitsecond(2)
  6219.  
  6220. $actionParamInput = "none"
  6221. NFC_5_1_11_1 20
  6222.  
  6223. waitsecond(2)
  6224.  
  6225.  
  6226. sendStatus("Done::mainLoop::Loop::#{index}")
  6227.  
  6228.  
  6229. writelog("Finish::Loop::#{$curMainLoopNum}")
  6230.  
  6231.  
  6232. saveLogFileToGist if $saveLogToGist
  6233.  
  6234. index += 1
  6235.  
  6236. end
  6237.  
  6238. $engineStatus = "Idle"
  6239. resetStatus
  6240. sendStatus("Finish::mainLoop::END")
  6241.  
  6242. end
  6243.  
  6244. def self.Store_Front_5_1_5_1(loopTime)
  6245.  
  6246. tcase = TestCase.new("Store_Front_5_1_5_1")
  6247.  
  6248. tcase << TestAction.new(:Start_Log) do
  6249. logStartTest("Store_Front_5_1_5_1")
  6250.  
  6251. waitsecond(0)
  6252. end
  6253.  
  6254. tcase << TestAction.new(:Play_Store) do
  6255. gotoAppPixel("Play Store")
  6256.  
  6257. waitsecond(2)
  6258. end
  6259.  
  6260. tcase << TestAction.new(:AppSearch_Check) do
  6261. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 42455286)
  6262. .with('uitreeindex', 49)
  6263. .with('classname', 'ImageView')
  6264. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  6265. .with('content-desc', 'Search')
  6266.  
  6267. $ruiObj.isExist
  6268.  
  6269. waitsecond(2)
  6270. end
  6271.  
  6272. tcase << TestAction.new(:pressHome_6) do
  6273. pressHome
  6274.  
  6275. waitsecond(0)
  6276. end
  6277.  
  6278. tcase << TestAction.new(:End_Log) do
  6279. $myTestResult = checkLastExistResult
  6280.  
  6281. logStopTest("Store_Front_5_1_5_1")
  6282.  
  6283. waitsecond(0)
  6284. end
  6285.  
  6286. tcase.run(loopTime)
  6287.  
  6288. end
  6289.  
  6290. def self.Store_Front_5_1_5_2(loopTime)
  6291.  
  6292. tcase = TestCase.new("Store_Front_5_1_5_2")
  6293.  
  6294. tcase << TestAction.new(:Start_Log_5_1_5_2) do
  6295. logStartTest("Store_Front_5_1_5_2")
  6296.  
  6297. waitsecond(0)
  6298. end
  6299.  
  6300. tcase << TestAction.new(:Play_Store_1) do
  6301. gotoAppPixel('Play Store')
  6302.  
  6303. waitsecond(2)
  6304. end
  6305.  
  6306. tcase << TestAction.new(:Click_Search) do
  6307. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 42455286)
  6308. .with('uitreeindex', 49)
  6309. .with('classname', 'ImageView')
  6310. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  6311. .with('content-desc', 'Search')
  6312.  
  6313. $ruiObj.click
  6314.  
  6315. waitsecond(2)
  6316. end
  6317.  
  6318. tcase << TestAction.new(:Input_Search) do
  6319. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 1316281134)
  6320. .with('uitreeindex', 50)
  6321. .with('classname', 'EditText')
  6322. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  6323.  
  6324. $ruiObj.inputtext('Clash Royale')
  6325.  
  6326. waitsecond(2)
  6327. end
  6328.  
  6329. tcase << TestAction.new(:pressEnter_3) do
  6330. pressEnter
  6331.  
  6332. waitsecond(2)
  6333. end
  6334.  
  6335. tcase << TestAction.new(:Click_Clash_Royale) do
  6336. $ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', 911224488).with('textdescid', 1328898808).with('uniqueparentid', 944556771)
  6337. .with('uitreeindex', 1)
  6338. .with('classname', 'TextView')
  6339. .with('resource-id', 'com.android.vending:id/li_title')
  6340. .with('content-desc', 'App: Clash Royale')
  6341. .with('text', 'Clash Royale')
  6342.  
  6343. $ruiObj.click
  6344.  
  6345. waitsecond(2)
  6346. end
  6347.  
  6348. tcase << TestAction.new(:Click_Install) do
  6349. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 998476585).with('textdescid', 915934888).with('uniqueparentid', -349714783)
  6350. .with('uitreeindex', 11)
  6351. .with('classname', 'Button')
  6352. .with('text', 'INSTALL')
  6353.  
  6354. $ruiObj.click
  6355.  
  6356. waitsecond(2)
  6357. end
  6358.  
  6359. tcase << TestAction.new(:Confirm_Install) do
  6360. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1471442810).with('textdescid', 2077853872).with('uniqueparentid', -1070189422)
  6361. .with('uitreeindex', 4)
  6362. .with('classname', 'Button')
  6363. .with('resource-id', 'android:id/button1')
  6364. .with('text', 'PROCEED')
  6365.  
  6366. $ruiObj.click
  6367.  
  6368. waitsecond(2)
  6369. end
  6370.  
  6371. tcase << TestAction.new(:Wait_Loop) do
  6372. count = 0
  6373. waitsecond(4)
  6374. $UninstallStatus = RUIObject.new.with('classname', 'Button').with('text', 'UNINSTALL')
  6375.  
  6376. while ($UninstallStatus.isNotExist) && count < 30 do
  6377. waitsecond(5)
  6378. count += 1
  6379. end
  6380.  
  6381.  
  6382.  
  6383.  
  6384.  
  6385. waitsecond(2)
  6386. end
  6387.  
  6388. tcase << TestAction.new(:Uninstall_Check) do
  6389. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 1103650544).with('textdescid', 926077825).with('uniqueparentid', 488799519)
  6390. .with('uitreeindex', 10)
  6391. .with('classname', 'Button')
  6392. .with('text', 'UNINSTALL')
  6393.  
  6394. $ruiObj.isExist
  6395.  
  6396. waitsecond(0)
  6397. end
  6398.  
  6399. tcase << TestAction.new(:End_Log_5_1_5_2) do
  6400. $myTestResult = checkLastExistResult
  6401.  
  6402. logStopTest("Store_Front_5_1_5_2")
  6403.  
  6404. waitsecond(2)
  6405. end
  6406.  
  6407. tcase << TestAction.new(:Start_Log_5_1_5_5) do
  6408. logStartTest("Store_Front_5_1_5_5")
  6409.  
  6410. waitsecond(2)
  6411. end
  6412.  
  6413. tcase << TestAction.new(:Click_Open) do
  6414. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 343626588).with('textdescid', -876702381).with('uniqueparentid', 488799519)
  6415. .with('uitreeindex', 14)
  6416. .with('classname', 'Button')
  6417. .with('text', 'OPEN')
  6418.  
  6419. $ruiObj.click
  6420.  
  6421. waitsecond(2)
  6422. end
  6423.  
  6424. tcase << TestAction.new(:wait_1) do
  6425. waitsecond(6)
  6426. end
  6427.  
  6428. tcase << TestAction.new(:App_Loop) do
  6429. count = 0
  6430. waitsecond(4)
  6431. $AppStatus = RUIObject.new.with('classname', 'Button').with('resource-id', 'android:id/button1').with('text', 'INSTALL')
  6432.  
  6433. while ($AppStatus.isNotExist) && count < 30 do
  6434. waitsecond(5)
  6435. count += 1
  6436. end
  6437.  
  6438.  
  6439. waitsecond(2)
  6440. end
  6441.  
  6442. tcase << TestAction.new(:Check_App) do
  6443. $ruiObj = RUIObject.new.with('classname', 'Button').with('resource-id', 'android:id/button1').with('text', 'INSTALL')
  6444.  
  6445. $ruiObj.isExist
  6446.  
  6447. waitsecond(0)
  6448. end
  6449.  
  6450. tcase << TestAction.new(:pressHome_10) do
  6451. pressHome
  6452.  
  6453. waitsecond(2)
  6454. end
  6455.  
  6456. tcase << TestAction.new(:End_Log_5_1_5_5) do
  6457. $myTestResult = checkLastExistResult
  6458.  
  6459. logStopTest("Store_Front_5_1_5_5")
  6460.  
  6461. waitsecond(2)
  6462. end
  6463.  
  6464. tcase << TestAction.new(:Start_Log_5_1_5_7) do
  6465. logStartTest("Store_Front_5_1_5_7")
  6466.  
  6467. waitsecond(2)
  6468. end
  6469.  
  6470. tcase << TestAction.new(:Play_Store_2) do
  6471. gotoAppPixel('Play Store')
  6472.  
  6473. waitsecond(2)
  6474. end
  6475.  
  6476. tcase << TestAction.new(:Click_Uninstall) do
  6477. $ruiObj = RUIObject.new.with('objectid', 82686867).with('selfid', -895718918).with('textdescid', 1814403659).with('uniqueparentid', 1781270761)
  6478. .with('uitreeindex', 9)
  6479. .with('classname', 'Button')
  6480. .with('resource-id', 'com.android.vending:id/uninstall_button')
  6481. .with('text', 'UNINSTALL')
  6482.  
  6483. $ruiObj.click
  6484.  
  6485. waitsecond(2)
  6486. end
  6487.  
  6488. tcase << TestAction.new(:Confirm_Uninstall) do
  6489. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', -1645912444)
  6490. .with('uitreeindex', 2)
  6491. .with('classname', 'Button')
  6492. .with('resource-id', 'android:id/button1')
  6493. .with('text', 'OK')
  6494.  
  6495. $ruiObj.click
  6496.  
  6497. waitsecond(2)
  6498. end
  6499.  
  6500. tcase << TestAction.new(:Check_Install) do
  6501. $ruiObj = RUIObject.new.with('objectid', -329901969).with('selfid', -652886121).with('textdescid', 992432790).with('uniqueparentid', -1937838608)
  6502. .with('uitreeindex', 9)
  6503. .with('classname', 'Button')
  6504. .with('resource-id', 'com.android.vending:id/buy_button')
  6505. .with('text', 'INSTALL')
  6506.  
  6507. $ruiObj.isExist
  6508.  
  6509. waitsecond(0)
  6510. end
  6511.  
  6512. tcase << TestAction.new(:End_Log_5_1_5_7) do
  6513. $myTestResult = checkLastExistResult
  6514.  
  6515. logStopTest("Store_Front_5_1_5_7")
  6516.  
  6517. waitsecond(0)
  6518. end
  6519.  
  6520. tcase << TestAction.new(:pressBack_14) do
  6521. pressBack
  6522.  
  6523. waitsecond(0)
  6524. end
  6525.  
  6526. tcase << TestAction.new(:pressBack_14_1) do
  6527. pressBack
  6528.  
  6529. waitsecond(0)
  6530. end
  6531.  
  6532. tcase << TestAction.new(:pressBack_14_1_1) do
  6533. pressBack
  6534.  
  6535. waitsecond(0)
  6536. end
  6537.  
  6538. tcase << TestAction.new(:pressHome_18) do
  6539. pressHome
  6540.  
  6541. waitsecond(0)
  6542. end
  6543.  
  6544. tcase.run(loopTime)
  6545.  
  6546. end
  6547.  
  6548. def self.Store_Front_5_1_5_3(loopTime)
  6549.  
  6550. tcase = TestCase.new("Store_Front_5_1_5_3")
  6551.  
  6552. tcase << TestAction.new(:Start_Log_5_1_5_3) do
  6553. logStartTest("Store_Front_5_1_5_3")
  6554.  
  6555. waitsecond(0)
  6556. end
  6557.  
  6558. tcase << TestAction.new(:Play_Store_1) do
  6559. gotoAppPixel('Play Store')
  6560.  
  6561. waitsecond(2)
  6562. end
  6563.  
  6564. tcase << TestAction.new(:Click_Search) do
  6565. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 42455286)
  6566. .with('uitreeindex', 49)
  6567. .with('classname', 'ImageView')
  6568. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  6569. .with('content-desc', 'Search')
  6570.  
  6571. $ruiObj.click
  6572.  
  6573. waitsecond(2)
  6574. end
  6575.  
  6576. tcase << TestAction.new(:Input_Search) do
  6577. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 1316281134)
  6578. .with('uitreeindex', 50)
  6579. .with('classname', 'EditText')
  6580. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  6581.  
  6582. $ruiObj.inputtext('ColorNote')
  6583.  
  6584. waitsecond(2)
  6585. end
  6586.  
  6587. tcase << TestAction.new(:pressEnter_3) do
  6588. pressEnter
  6589.  
  6590. waitsecond(2)
  6591. end
  6592.  
  6593. tcase << TestAction.new(:Click_Install) do
  6594. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 998476585).with('textdescid', 915934888).with('uniqueparentid', -349714783)
  6595. .with('uitreeindex', 11)
  6596. .with('classname', 'Button')
  6597. .with('text', 'INSTALL')
  6598.  
  6599. $ruiObj.click
  6600.  
  6601. waitsecond(2)
  6602. end
  6603.  
  6604. tcase << TestAction.new(:Confirm_Install) do
  6605. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1471442810).with('textdescid', 2077853872).with('uniqueparentid', -1070189422)
  6606. .with('uitreeindex', 4)
  6607. .with('classname', 'Button')
  6608. .with('resource-id', 'android:id/button1')
  6609. .with('text', 'PROCEED')
  6610.  
  6611. $ruiObj.click
  6612.  
  6613. waitsecond(2)
  6614. end
  6615.  
  6616. tcase << TestAction.new(:scriptAction_2) do
  6617. count = 0
  6618. waitsecond(4)
  6619. $UninstallStatus = RUIObject.new.with('classname', 'Button').with('text', 'UNINSTALL')
  6620.  
  6621. while ($UninstallStatus.isNotExist) && count < 30 do
  6622. waitsecond(5)
  6623. count += 1
  6624. end
  6625.  
  6626. waitsecond(2)
  6627. end
  6628.  
  6629. tcase << TestAction.new(:Check_Unisntall) do
  6630. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 1103650544).with('textdescid', 926077825).with('uniqueparentid', 488799519)
  6631. .with('uitreeindex', 10)
  6632. .with('classname', 'Button')
  6633. .with('text', 'UNINSTALL')
  6634.  
  6635. $ruiObj.isExist
  6636.  
  6637. waitsecond(2)
  6638. end
  6639.  
  6640. tcase << TestAction.new(:End_Log_5_1_5_3) do
  6641. $myTestResult = checkLastExistResult
  6642.  
  6643. logStopTest("Store_Front_5_1_5_3")
  6644.  
  6645. waitsecond(0)
  6646. end
  6647.  
  6648. tcase << TestAction.new(:Start_Log_5_1_5_6) do
  6649. logStartTest("Store_Front_5_1_5_6")
  6650.  
  6651. waitsecond(0)
  6652. end
  6653.  
  6654. tcase << TestAction.new(:Click_Open) do
  6655. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 343626588).with('textdescid', -876702381).with('uniqueparentid', 488799519)
  6656. .with('uitreeindex', 14)
  6657. .with('classname', 'Button')
  6658. .with('text', 'OPEN')
  6659.  
  6660. $ruiObj.click
  6661.  
  6662. waitsecond(2)
  6663. end
  6664.  
  6665. tcase << TestAction.new(:wait_1) do
  6666. waitsecond(4)
  6667. end
  6668.  
  6669. tcase << TestAction.new(:Check_ColorNote) do
  6670. $ruiObj = RUIObject.new.with('objectid', 39336378).with('selfid', -1815503323).with('textdescid', -1889368720).with('uniqueparentid', 2031216929).with('classresourceid', 71951079)
  6671. .with('uitreeindex', 1)
  6672. .with('classname', 'TextView')
  6673. .with('resource-id', 'com.android.packageinstaller:id/permission_message')
  6674. .with('text', 'Allow ColorNote to access photos media and files on your device')
  6675.  
  6676. $ruiObj.isExist
  6677.  
  6678. waitsecond(2)
  6679. end
  6680.  
  6681. tcase << TestAction.new(:pressHome_10) do
  6682. pressHome
  6683.  
  6684. waitsecond(2)
  6685. end
  6686.  
  6687. tcase << TestAction.new(:End_Log_5_1_5_6) do
  6688. $myTestResult = checkLastExistResult
  6689.  
  6690. logStopTest("Store_Front_5_1_5_6")
  6691.  
  6692. waitsecond(0)
  6693. end
  6694.  
  6695. tcase << TestAction.new(:Start_Log_5_1_5_8) do
  6696. logStartTest("Store_Front_5_1_5_8")
  6697.  
  6698. waitsecond(0)
  6699. end
  6700.  
  6701. tcase << TestAction.new(:Play_Store_2) do
  6702. gotoAppPixel('Play Store')
  6703.  
  6704. waitsecond(2)
  6705. end
  6706.  
  6707. tcase << TestAction.new(:Click_Uninstall) do
  6708. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 1103650544).with('textdescid', 926077825).with('uniqueparentid', 488799519)
  6709. .with('uitreeindex', 10)
  6710. .with('classname', 'Button')
  6711. .with('text', 'UNINSTALL')
  6712.  
  6713. $ruiObj.click
  6714.  
  6715. waitsecond(2)
  6716. end
  6717.  
  6718. tcase << TestAction.new(:Confirm_Uninstall) do
  6719. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', -1645912444)
  6720. .with('uitreeindex', 2)
  6721. .with('classname', 'Button')
  6722. .with('resource-id', 'android:id/button1')
  6723. .with('text', 'OK')
  6724.  
  6725. $ruiObj.click
  6726.  
  6727. waitsecond(2)
  6728. end
  6729.  
  6730. tcase << TestAction.new(:Check_Install) do
  6731. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 998476585).with('textdescid', 915934888).with('uniqueparentid', -349714783)
  6732. .with('uitreeindex', 11)
  6733. .with('classname', 'Button')
  6734. .with('text', 'INSTALL')
  6735.  
  6736. $ruiObj.isExist
  6737.  
  6738. waitsecond(2)
  6739. end
  6740.  
  6741. tcase << TestAction.new(:End_Log_5_1_5_8) do
  6742. $myTestResult = checkLastExistResult
  6743.  
  6744. logStopTest("Store_Front_5_1_5_8")
  6745.  
  6746. waitsecond(0)
  6747. end
  6748.  
  6749. tcase << TestAction.new(:pressBack_14) do
  6750. pressBack
  6751.  
  6752. waitsecond(0)
  6753. end
  6754.  
  6755. tcase << TestAction.new(:pressBack_14_1) do
  6756. pressBack
  6757.  
  6758. waitsecond(0)
  6759. end
  6760.  
  6761. tcase << TestAction.new(:pressBack_14_1_1) do
  6762. pressBack
  6763.  
  6764. waitsecond(0)
  6765. end
  6766.  
  6767. tcase << TestAction.new(:pressHome_18) do
  6768. pressHome
  6769.  
  6770. waitsecond(0)
  6771. end
  6772.  
  6773. tcase.run(loopTime)
  6774.  
  6775. end
  6776.  
  6777. def self.Telephony_5_1_1_1(loopTime)
  6778.  
  6779. tcase = TestCase.new("Telephony_5_1_1_1")
  6780.  
  6781. tcase << TestAction.new(:Start_Log) do
  6782. logStartTest("Telephony_5_1_1_1")
  6783.  
  6784. waitsecond(0)
  6785. end
  6786.  
  6787. tcase << TestAction.new(:Settings) do
  6788. gotoSettings
  6789.  
  6790. waitsecond(2)
  6791. end
  6792.  
  6793. tcase << TestAction.new(:Network) do
  6794. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', 1379611054).with('textdescid', 223764122).with('uniqueparentid', 1077985656)
  6795. .with('uitreeindex', 16)
  6796. .with('classname', 'TextView')
  6797. .with('resource-id', 'android:id/title')
  6798. .with('text', 'Network Internet')
  6799.  
  6800. $ruiObj.click
  6801.  
  6802. waitsecond(2)
  6803. end
  6804.  
  6805. tcase << TestAction.new(:Click_MobileNetwork) do
  6806. $ruiObj = RUIObject.new.with('objectid', 1887322852).with('selfid', -194627727).with('textdescid', -38060012).with('uniqueparentid', -1915761805)
  6807. .with('uitreeindex', 10)
  6808. .with('classname', 'TextView')
  6809. .with('resource-id', 'android:id/title')
  6810. .with('text', 'Mobile network')
  6811.  
  6812. $ruiObj.click
  6813.  
  6814. waitsecond(2)
  6815. end
  6816.  
  6817. tcase << TestAction.new(:Click_Preferred) do
  6818. $ruiObj = RUIObject.new.with('objectid', 559310926).with('selfid', 517165292).with('textdescid', 482560099).with('uniqueparentid', -1016225766).with('classresourceid', 490183159)
  6819. .with('uitreeindex', 5)
  6820. .with('classname', 'TextView')
  6821. .with('resource-id', 'android:id/title')
  6822. .with('text', 'Preferred network type')
  6823.  
  6824. $ruiObj.click
  6825.  
  6826. waitsecond(2)
  6827. end
  6828.  
  6829. tcase << TestAction.new(:Click_3G_TMUS) do
  6830. $ruiObj = RUIObject.new.with('objectid', -442050023).with('selfid', 969723944).with('textdescid', -1541834331).with('uniqueparentid', -990483570).with('classresourceid', 2074814108)
  6831. .with('uitreeindex', 3)
  6832. .with('classname', 'CheckedTextView')
  6833. .with('resource-id', 'android:id/text1')
  6834. .with('text', '3G')
  6835.  
  6836. $ruiObj.click
  6837.  
  6838. waitsecond(2)
  6839. end
  6840.  
  6841. tcase << TestAction.new(:Click_LTE_VZW) do
  6842. $ruiObj = RUIObject.new.with('objectid', -442050023).with('selfid', -738079874).with('textdescid', -578669803).with('uniqueparentid', 9112671).with('classresourceid', 2074814108)
  6843. .with('uitreeindex', 3)
  6844. .with('classname', 'CheckedTextView')
  6845. .with('resource-id', 'android:id/text1')
  6846. .with('text', 'LTE CDMA')
  6847.  
  6848. $ruiObj.click
  6849.  
  6850. waitsecond(2)
  6851. end
  6852.  
  6853. tcase << TestAction.new(:Phone) do
  6854. gotoAppPixel("Phone")
  6855.  
  6856. waitsecond(2)
  6857. end
  6858.  
  6859. tcase << TestAction.new(:Check_Send) do
  6860. $ruiObj = RUIObject.new.with('objectid', 633567).with('selfid', -361167454).with('textdescid', -433420335).with('uniqueparentid', -308205312)
  6861. .with('uitreeindex', 27)
  6862. .with('classname', 'ImageButton')
  6863. .with('resource-id', 'com.android.dialer:id/dialpad_floating_action_button')
  6864. .with('content-desc', 'dial')
  6865.  
  6866. $ruiObj.isExist
  6867. ifFailJumpTo(:Click_SearchContacts)
  6868.  
  6869. waitsecond(2)
  6870. end
  6871.  
  6872. tcase << TestAction.new(:pressBack_7) do
  6873. pressBack
  6874.  
  6875. waitsecond(2)
  6876. end
  6877.  
  6878. tcase << TestAction.new(:Click_SearchContacts) do
  6879. $ruiObj = RUIObject.new.with('objectid', 923652289).with('selfid', -1151038352).with('textdescid', 1007284052).with('uniqueparentid', 183054914)
  6880. .with('uitreeindex', 40)
  6881. .with('classname', 'TextView')
  6882. .with('resource-id', 'com.android.dialer:id/search_box_start_search')
  6883. .with('text', 'Search contacts')
  6884.  
  6885. $ruiObj.click
  6886.  
  6887. waitsecond(2)
  6888. end
  6889.  
  6890. tcase << TestAction.new(:Input_A01_A01) do
  6891. $ruiObj = RUIObject.new.with('objectid', 633166156).with('selfid', -1518126622).with('textdescid', -1846685612).with('uniqueparentid', 1793823206)
  6892. .with('uitreeindex', 1)
  6893. .with('classname', 'EditText')
  6894. .with('resource-id', 'com.android.dialer:id/search_view')
  6895.  
  6896. $ruiObj.inputtext('A01 a01')
  6897.  
  6898. waitsecond(2)
  6899. end
  6900.  
  6901. tcase << TestAction.new(:Call_A01_A01) do
  6902. $ruiObj = RUIObject.new.with('objectid', 126478027).with('selfid', -43585994).with('textdescid', -849543187).with('uniqueparentid', 583684266).with('classresourceid', -695489144)
  6903. .with('uitreeindex', 1)
  6904. .with('classname', 'TextView')
  6905. .with('resource-id', 'com.android.dialer:id/cliv_name_textview')
  6906. .with('content-desc', 'A01 a01')
  6907. .with('text', 'A01 a01')
  6908.  
  6909. $ruiObj.click
  6910.  
  6911. waitsecond(8)
  6912. end
  6913.  
  6914. tcase << TestAction.new(:Send_CMD_Answer) do
  6915. sendBTCmd("answerCall")
  6916.  
  6917. waitsecond(8)
  6918. end
  6919.  
  6920. tcase << TestAction.new(:Check_End) do
  6921. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', -1522843237)
  6922. .with('uitreeindex', 13)
  6923. .with('pretext', 'Hold')
  6924. .with('classname', 'ImageButton')
  6925. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  6926. .with('content-desc', 'End call')
  6927.  
  6928. $ruiObj.isExist
  6929.  
  6930. waitsecond(0)
  6931. end
  6932.  
  6933. tcase << TestAction.new(:Click_End) do
  6934. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', 899620027)
  6935. .with('uitreeindex', 13)
  6936. .with('classname', 'ImageButton')
  6937. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  6938. .with('content-desc', 'End call')
  6939.  
  6940. $ruiObj.click
  6941.  
  6942. waitsecond(2)
  6943. end
  6944.  
  6945. tcase << TestAction.new(:Send_CMD_End) do
  6946. sendBTCmd("endCall")
  6947.  
  6948. waitsecond(2)
  6949. end
  6950.  
  6951. tcase << TestAction.new(:End_Log) do
  6952. $myTestResult = checkLastExistResult
  6953.  
  6954. logStopTest("Telephony_5_1_1_1")
  6955.  
  6956. waitsecond(0)
  6957. end
  6958.  
  6959. tcase << TestAction.new(:pressBack_2) do
  6960. pressBack
  6961.  
  6962. waitsecond(2)
  6963. end
  6964.  
  6965. tcase << TestAction.new(:pressBack_2_1) do
  6966. pressBack
  6967.  
  6968. waitsecond(2)
  6969. end
  6970.  
  6971. tcase.run(loopTime)
  6972.  
  6973. end
  6974.  
  6975. def self.Telephony_5_1_1_2(loopTime)
  6976.  
  6977. tcase = TestCase.new("Telephony_5_1_1_2")
  6978.  
  6979. tcase << TestAction.new(:Start_Log) do
  6980. logStartTest("Telephony_5_1_1_2")
  6981.  
  6982. waitsecond(0)
  6983. end
  6984.  
  6985. tcase << TestAction.new(:Settings) do
  6986. gotoSettings
  6987.  
  6988. waitsecond(2)
  6989. end
  6990.  
  6991. tcase << TestAction.new(:Click_Network) do
  6992. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', 1379611054).with('textdescid', 223764122).with('uniqueparentid', 1077985656)
  6993. .with('uitreeindex', 16)
  6994. .with('classname', 'TextView')
  6995. .with('resource-id', 'android:id/title')
  6996. .with('text', 'Network Internet')
  6997.  
  6998. $ruiObj.click
  6999.  
  7000. waitsecond(2)
  7001. end
  7002.  
  7003. tcase << TestAction.new(:Click_Mobile_Network) do
  7004. $ruiObj = RUIObject.new.with('objectid', 1887322852).with('selfid', -194627727).with('textdescid', -38060012).with('uniqueparentid', -1915761805)
  7005. .with('uitreeindex', 10)
  7006. .with('classname', 'TextView')
  7007. .with('resource-id', 'android:id/title')
  7008. .with('text', 'Mobile network')
  7009.  
  7010. $ruiObj.click
  7011.  
  7012. waitsecond(2)
  7013. end
  7014.  
  7015. tcase << TestAction.new(:Click_Preferred) do
  7016. $ruiObj = RUIObject.new.with('objectid', 559310926).with('selfid', 517165292).with('textdescid', 482560099).with('uniqueparentid', -1016225766).with('classresourceid', 490183159)
  7017. .with('uitreeindex', 5)
  7018. .with('classname', 'TextView')
  7019. .with('resource-id', 'android:id/title')
  7020. .with('text', 'Preferred network type')
  7021.  
  7022. $ruiObj.click
  7023.  
  7024. waitsecond(2)
  7025. end
  7026.  
  7027. tcase << TestAction.new(:Click_LTE_TMUS) do
  7028. $ruiObj = RUIObject.new.with('objectid', -442050023).with('selfid', 1679268164).with('textdescid', 1652493263).with('uniqueparentid', -990483570).with('classresourceid', 2074814108)
  7029. .with('uitreeindex', 2)
  7030. .with('classname', 'CheckedTextView')
  7031. .with('resource-id', 'android:id/text1')
  7032. .with('text', 'LTE recommended')
  7033.  
  7034. $ruiObj.click
  7035.  
  7036. waitsecond(2)
  7037. end
  7038.  
  7039. tcase << TestAction.new(:Click_LTE_VZW) do
  7040. $ruiObj = RUIObject.new.with('objectid', -442050023).with('selfid', -196746481).with('textdescid', 587737118).with('uniqueparentid', 9112671).with('classresourceid', 2074814108)
  7041. .with('uitreeindex', 4)
  7042. .with('classname', 'CheckedTextView')
  7043. .with('resource-id', 'android:id/text1')
  7044. .with('text', 'LTE GSM UMTS')
  7045.  
  7046. $ruiObj.click
  7047.  
  7048. waitsecond(2)
  7049. end
  7050.  
  7051. tcase << TestAction.new(:Phone) do
  7052. gotoAppPixel("Phone")
  7053.  
  7054. waitsecond(2)
  7055. end
  7056.  
  7057. tcase << TestAction.new(:Check_Send) do
  7058. $ruiObj = RUIObject.new.with('objectid', 633567).with('selfid', -361167454).with('textdescid', -433420335).with('uniqueparentid', -308205312)
  7059. .with('uitreeindex', 27)
  7060. .with('classname', 'ImageButton')
  7061. .with('resource-id', 'com.android.dialer:id/dialpad_floating_action_button')
  7062. .with('content-desc', 'dial')
  7063.  
  7064. $ruiObj.isExist
  7065. ifFailJumpTo(:Click_SearchContacts)
  7066.  
  7067. waitsecond(2)
  7068. end
  7069.  
  7070. tcase << TestAction.new(:pressBack_8) do
  7071. pressBack
  7072.  
  7073. waitsecond(2)
  7074. end
  7075.  
  7076. tcase << TestAction.new(:Click_SearchContacts) do
  7077. $ruiObj = RUIObject.new.with('objectid', 923652289).with('selfid', -1151038352).with('textdescid', 1007284052).with('uniqueparentid', 183054914)
  7078. .with('uitreeindex', 46)
  7079. .with('classname', 'TextView')
  7080. .with('resource-id', 'com.android.dialer:id/search_box_start_search')
  7081. .with('text', 'Search contacts')
  7082.  
  7083. $ruiObj.click
  7084.  
  7085. waitsecond(2)
  7086. end
  7087.  
  7088. tcase << TestAction.new(:Input_A01_A01) do
  7089. $ruiObj = RUIObject.new.with('objectid', 633166156).with('selfid', -1518126622).with('textdescid', -1846685612).with('uniqueparentid', 1793823206)
  7090. .with('uitreeindex', 1)
  7091. .with('classname', 'EditText')
  7092. .with('resource-id', 'com.android.dialer:id/search_view')
  7093.  
  7094. $ruiObj.inputtext('A01 a01')
  7095.  
  7096. waitsecond(2)
  7097. end
  7098.  
  7099. tcase << TestAction.new(:Click_A01_A01) do
  7100. $ruiObj = RUIObject.new.with('objectid', 126478027).with('selfid', -43585994).with('textdescid', -849543187).with('uniqueparentid', 583684266).with('classresourceid', -695489144)
  7101. .with('uitreeindex', 1)
  7102. .with('classname', 'TextView')
  7103. .with('resource-id', 'com.android.dialer:id/cliv_name_textview')
  7104. .with('content-desc', 'A01 a01')
  7105. .with('text', 'A01 a01')
  7106.  
  7107. $ruiObj.click
  7108.  
  7109. waitsecond(8)
  7110. end
  7111.  
  7112. tcase << TestAction.new(:Send_CMD_Answer) do
  7113. sendBTCmd("answerCall")
  7114.  
  7115. waitsecond(8)
  7116. end
  7117.  
  7118. tcase << TestAction.new(:Check_End) do
  7119. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', -316869413)
  7120. .with('uitreeindex', 13)
  7121. .with('classname', 'ImageButton')
  7122. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  7123. .with('content-desc', 'End call')
  7124.  
  7125. $ruiObj.isExist
  7126.  
  7127. waitsecond(0)
  7128. end
  7129.  
  7130. tcase << TestAction.new(:Click_End) do
  7131. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', 1195855675)
  7132. .with('uitreeindex', 13)
  7133. .with('classname', 'ImageButton')
  7134. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  7135. .with('content-desc', 'End call')
  7136.  
  7137. $ruiObj.click
  7138.  
  7139. waitsecond(2)
  7140. end
  7141.  
  7142. tcase << TestAction.new(:Send_CMD_End) do
  7143. sendBTCmd("endCall")
  7144.  
  7145. waitsecond(2)
  7146. end
  7147.  
  7148. tcase << TestAction.new(:End_Log) do
  7149. $myTestResult = checkLastExistResult
  7150.  
  7151. logStopTest("Telephony_5_1_1_2")
  7152.  
  7153. waitsecond(0)
  7154. end
  7155.  
  7156. tcase << TestAction.new(:pressBack_2) do
  7157. pressBack
  7158.  
  7159. waitsecond(2)
  7160. end
  7161.  
  7162. tcase << TestAction.new(:pressBack_2_1) do
  7163. pressBack
  7164.  
  7165. waitsecond(2)
  7166. end
  7167.  
  7168. tcase.run(loopTime)
  7169.  
  7170. end
  7171.  
  7172. def self.Telephony_5_1_1_3(loopTime)
  7173.  
  7174. tcase = TestCase.new("Telephony_5_1_1_3")
  7175.  
  7176. tcase << TestAction.new(:Start_Log) do
  7177. logStartTest("Telephony_5_1_1_3")
  7178.  
  7179. waitsecond(2)
  7180. end
  7181.  
  7182. tcase << TestAction.new(:Settings) do
  7183. gotoSettings
  7184.  
  7185. waitsecond(2)
  7186. end
  7187.  
  7188. tcase << TestAction.new(:Click_Network) do
  7189. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', 1379611054).with('textdescid', 223764122).with('uniqueparentid', 1077985656)
  7190. .with('uitreeindex', 16)
  7191. .with('classname', 'TextView')
  7192. .with('resource-id', 'android:id/title')
  7193. .with('text', 'Network Internet')
  7194.  
  7195. $ruiObj.click
  7196.  
  7197. waitsecond(2)
  7198. end
  7199.  
  7200. tcase << TestAction.new(:Click_Mobile_Network) do
  7201. $ruiObj = RUIObject.new.with('objectid', 1887322852).with('selfid', -194627727).with('textdescid', -38060012).with('uniqueparentid', -1915761805)
  7202. .with('uitreeindex', 10)
  7203. .with('classname', 'TextView')
  7204. .with('resource-id', 'android:id/title')
  7205. .with('text', 'Mobile network')
  7206.  
  7207. $ruiObj.click
  7208.  
  7209. waitsecond(2)
  7210. end
  7211.  
  7212. tcase << TestAction.new(:Click_Preferred) do
  7213. $ruiObj = RUIObject.new.with('objectid', 559310926).with('selfid', 517165292).with('textdescid', 482560099).with('uniqueparentid', -1016225766).with('classresourceid', 490183159)
  7214. .with('uitreeindex', 5)
  7215. .with('classname', 'TextView')
  7216. .with('resource-id', 'android:id/title')
  7217. .with('text', 'Preferred network type')
  7218.  
  7219. $ruiObj.click
  7220.  
  7221. waitsecond(2)
  7222. end
  7223.  
  7224. tcase << TestAction.new(:Click_3G_TMUS) do
  7225. $ruiObj = RUIObject.new.with('objectid', -442050023).with('selfid', 969723944).with('textdescid', -1541834331).with('uniqueparentid', -990483570).with('classresourceid', 2074814108)
  7226. .with('uitreeindex', 3)
  7227. .with('classname', 'CheckedTextView')
  7228. .with('resource-id', 'android:id/text1')
  7229. .with('text', '3G')
  7230.  
  7231. $ruiObj.click
  7232.  
  7233. waitsecond(2)
  7234. end
  7235.  
  7236. tcase << TestAction.new(:Click_CDMA_VZW) do
  7237. $ruiObj = RUIObject.new.with('objectid', -442050023).with('selfid', -738079874).with('textdescid', -578669803).with('uniqueparentid', 9112671).with('classresourceid', 2074814108)
  7238. .with('uitreeindex', 3)
  7239. .with('classname', 'CheckedTextView')
  7240. .with('resource-id', 'android:id/text1')
  7241. .with('text', 'LTE CDMA')
  7242.  
  7243. $ruiObj.click
  7244.  
  7245. waitsecond(2)
  7246. end
  7247.  
  7248. tcase << TestAction.new(:Phone) do
  7249. gotoAppPixel("Phone")
  7250.  
  7251. waitsecond(2)
  7252. end
  7253.  
  7254. tcase << TestAction.new(:Check_Send) do
  7255. $ruiObj = RUIObject.new.with('objectid', 633567).with('selfid', -361167454).with('textdescid', -433420335).with('uniqueparentid', -308205312)
  7256. .with('uitreeindex', 27)
  7257. .with('classname', 'ImageButton')
  7258. .with('resource-id', 'com.android.dialer:id/dialpad_floating_action_button')
  7259. .with('content-desc', 'dial')
  7260.  
  7261. $ruiObj.isExist
  7262. ifFailJumpTo(:Click_History)
  7263.  
  7264. waitsecond(2)
  7265. end
  7266.  
  7267. tcase << TestAction.new(:pressBack_4) do
  7268. pressBack
  7269.  
  7270. waitsecond(2)
  7271. end
  7272.  
  7273. tcase << TestAction.new(:Click_History) do
  7274. $ruiObj = RUIObject.new.with('objectid', 1729076897).with('selfid', 1544291637).with('textdescid', 126528520).with('uniqueparentid', -905047454)
  7275. .with('uitreeindex', 1)
  7276. .with('classname', 'ImageView')
  7277. .with('resource-id', 'com.android.dialer:id/icon')
  7278. .with('content-desc', 'Call History tab.')
  7279.  
  7280. $ruiObj.click
  7281.  
  7282. waitsecond(2)
  7283. end
  7284.  
  7285. tcase << TestAction.new(:Call_A01_A01) do
  7286. $ruiObj = RUIObject.new.with('objectid', -275416008).with('selfid', 1174798435).with('textdescid', 530045898).with('uniqueparentid', -1421306337)
  7287. .with('uitreeindex', 8)
  7288. .with('pretext', 'Mobile 2 min ago')
  7289. .with('classname', 'ImageView')
  7290. .with('resource-id', 'com.android.dialer:id/primary_action_button')
  7291. .with('content-desc', 'Call A01 a01')
  7292.  
  7293. $ruiObj.click
  7294.  
  7295. waitsecond(8)
  7296. end
  7297.  
  7298. tcase << TestAction.new(:Send_CMD_Answer) do
  7299. sendBTCmd("answerCall")
  7300.  
  7301. waitsecond(8)
  7302. end
  7303.  
  7304. tcase << TestAction.new(:Check_End) do
  7305. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', -1050162627)
  7306. .with('uitreeindex', 13)
  7307. .with('classname', 'ImageButton')
  7308. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  7309. .with('content-desc', 'End call')
  7310.  
  7311. $ruiObj.isExist
  7312.  
  7313. waitsecond(0)
  7314. end
  7315.  
  7316. tcase << TestAction.new(:Click_End) do
  7317. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', 0)
  7318. .with('uitreeindex', 13)
  7319. .with('classname', 'ImageButton')
  7320. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  7321. .with('content-desc', 'End call')
  7322.  
  7323. $ruiObj.click
  7324.  
  7325. waitsecond(2)
  7326. end
  7327.  
  7328. tcase << TestAction.new(:scriptAction_2) do
  7329. sendBTCmd("endCall")
  7330.  
  7331. waitsecond(2)
  7332. end
  7333.  
  7334. tcase << TestAction.new(:End_Log) do
  7335. $myTestResult = checkLastExistResult
  7336.  
  7337. logStopTest("Telephony_5_1_1_3")
  7338.  
  7339. waitsecond(2)
  7340. end
  7341.  
  7342. tcase << TestAction.new(:pressBack_6) do
  7343. pressBack
  7344.  
  7345. waitsecond(2)
  7346. end
  7347.  
  7348. tcase << TestAction.new(:pressBack_6_1) do
  7349. pressBack
  7350.  
  7351. waitsecond(2)
  7352. end
  7353.  
  7354. tcase.run(loopTime)
  7355.  
  7356. end
  7357.  
  7358. def self.Telephony_5_1_1_4(loopTime)
  7359.  
  7360. tcase = TestCase.new("Telephony_5_1_1_4")
  7361.  
  7362. tcase << TestAction.new(:Start_Log) do
  7363. logStartTest("Telephony_5_1_1_4")
  7364.  
  7365. waitsecond(0)
  7366. end
  7367.  
  7368. tcase << TestAction.new(:Settings) do
  7369. gotoSettings
  7370.  
  7371. waitsecond(2)
  7372. end
  7373.  
  7374. tcase << TestAction.new(:Click_Network) do
  7375. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', 1379611054).with('textdescid', 223764122).with('uniqueparentid', 1077985656)
  7376. .with('uitreeindex', 16)
  7377. .with('classname', 'TextView')
  7378. .with('resource-id', 'android:id/title')
  7379. .with('text', 'Network Internet')
  7380.  
  7381. $ruiObj.click
  7382.  
  7383. waitsecond(2)
  7384. end
  7385.  
  7386. tcase << TestAction.new(:Click_Mobile_Network) do
  7387. $ruiObj = RUIObject.new.with('objectid', 1887322852).with('selfid', -194627727).with('textdescid', -38060012).with('uniqueparentid', -1915761805)
  7388. .with('uitreeindex', 10)
  7389. .with('classname', 'TextView')
  7390. .with('resource-id', 'android:id/title')
  7391. .with('text', 'Mobile network')
  7392.  
  7393. $ruiObj.click
  7394.  
  7395. waitsecond(2)
  7396. end
  7397.  
  7398. tcase << TestAction.new(:Click_Preferred) do
  7399. $ruiObj = RUIObject.new.with('objectid', 559310926).with('selfid', 517165292).with('textdescid', 482560099).with('uniqueparentid', -1016225766).with('classresourceid', 490183159)
  7400. .with('uitreeindex', 5)
  7401. .with('classname', 'TextView')
  7402. .with('resource-id', 'android:id/title')
  7403. .with('text', 'Preferred network type')
  7404.  
  7405. $ruiObj.click
  7406.  
  7407. waitsecond(2)
  7408. end
  7409.  
  7410. tcase << TestAction.new(:Click_LTE_TMUS) do
  7411. $ruiObj = RUIObject.new.with('objectid', -442050023).with('selfid', 1679268164).with('textdescid', 1652493263).with('uniqueparentid', -990483570).with('classresourceid', 2074814108)
  7412. .with('uitreeindex', 2)
  7413. .with('classname', 'CheckedTextView')
  7414. .with('resource-id', 'android:id/text1')
  7415. .with('text', 'LTE recommended')
  7416.  
  7417. $ruiObj.click
  7418.  
  7419. waitsecond(2)
  7420. end
  7421.  
  7422. tcase << TestAction.new(:Click_LTE_VZW) do
  7423. $ruiObj = RUIObject.new.with('objectid', -442050023).with('selfid', -196746481).with('textdescid', 587737118).with('uniqueparentid', 9112671).with('classresourceid', 2074814108)
  7424. .with('uitreeindex', 4)
  7425. .with('classname', 'CheckedTextView')
  7426. .with('resource-id', 'android:id/text1')
  7427. .with('text', 'LTE GSM UMTS')
  7428.  
  7429. $ruiObj.click
  7430.  
  7431. waitsecond(2)
  7432. end
  7433.  
  7434. tcase << TestAction.new(:Phone) do
  7435. gotoAppPixel("Phone")
  7436.  
  7437. waitsecond(2)
  7438. end
  7439.  
  7440. tcase << TestAction.new(:Check_Send) do
  7441. $ruiObj = RUIObject.new.with('objectid', 633567).with('selfid', -361167454).with('textdescid', -433420335).with('uniqueparentid', -308205312)
  7442. .with('uitreeindex', 27)
  7443. .with('classname', 'ImageButton')
  7444. .with('resource-id', 'com.android.dialer:id/dialpad_floating_action_button')
  7445. .with('content-desc', 'dial')
  7446.  
  7447. $ruiObj.isExist
  7448. ifFailJumpTo(:Click_History)
  7449.  
  7450. waitsecond(2)
  7451. end
  7452.  
  7453. tcase << TestAction.new(:pressBack_10) do
  7454. pressBack
  7455.  
  7456. waitsecond(2)
  7457. end
  7458.  
  7459. tcase << TestAction.new(:Click_History) do
  7460. $ruiObj = RUIObject.new.with('objectid', 1729076897).with('selfid', 1544291637).with('textdescid', 126528520).with('uniqueparentid', -905047454)
  7461. .with('uitreeindex', 1)
  7462. .with('classname', 'ImageView')
  7463. .with('resource-id', 'com.android.dialer:id/icon')
  7464. .with('content-desc', 'Call History tab.')
  7465.  
  7466. $ruiObj.click
  7467.  
  7468. waitsecond(2)
  7469. end
  7470.  
  7471. tcase << TestAction.new(:Call_A01_A01) do
  7472. $ruiObj = RUIObject.new.with('objectid', -275416008).with('selfid', 1174798435).with('textdescid', 530045898).with('uniqueparentid', -1421306337)
  7473. .with('uitreeindex', 8)
  7474. .with('pretext', 'Mobile 2 min ago')
  7475. .with('classname', 'ImageView')
  7476. .with('resource-id', 'com.android.dialer:id/primary_action_button')
  7477. .with('content-desc', 'Call A01 a01')
  7478.  
  7479. $ruiObj.click
  7480.  
  7481. waitsecond(8)
  7482. end
  7483.  
  7484. tcase << TestAction.new(:Send_CMD_Answer) do
  7485. sendBTCmd("answerCall")
  7486.  
  7487. waitsecond(8)
  7488. end
  7489.  
  7490. tcase << TestAction.new(:Check_End) do
  7491. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', -1050162627)
  7492. .with('uitreeindex', 13)
  7493. .with('classname', 'ImageButton')
  7494. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  7495. .with('content-desc', 'End call')
  7496.  
  7497. $ruiObj.isExist
  7498.  
  7499. waitsecond(0)
  7500. end
  7501.  
  7502. tcase << TestAction.new(:Click_End) do
  7503. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', 0)
  7504. .with('uitreeindex', 13)
  7505. .with('classname', 'ImageButton')
  7506. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  7507. .with('content-desc', 'End call')
  7508.  
  7509. $ruiObj.click
  7510.  
  7511. waitsecond(2)
  7512. end
  7513.  
  7514. tcase << TestAction.new(:Send_CMD_End) do
  7515. sendBTCmd("endCall")
  7516.  
  7517. waitsecond(2)
  7518. end
  7519.  
  7520. tcase << TestAction.new(:End_Log) do
  7521. $myTestResult = checkLastExistResult
  7522.  
  7523. logStopTest("Telephony_5_1_1_4")
  7524.  
  7525. waitsecond(0)
  7526. end
  7527.  
  7528. tcase << TestAction.new(:pressBack_5) do
  7529. pressBack
  7530.  
  7531. waitsecond(2)
  7532. end
  7533.  
  7534. tcase << TestAction.new(:pressBack_5_1) do
  7535. pressBack
  7536.  
  7537. waitsecond(2)
  7538. end
  7539.  
  7540. tcase.run(loopTime)
  7541.  
  7542. end
  7543.  
  7544. def self.Telephony_5_1_1_5(loopTime)
  7545.  
  7546. tcase = TestCase.new("Telephony_5_1_1_5")
  7547.  
  7548. tcase << TestAction.new(:Start_Log) do
  7549. logStartTest("Telephony_5_1_1_5")
  7550.  
  7551. waitsecond(0)
  7552. end
  7553.  
  7554. tcase << TestAction.new(:Settings) do
  7555. gotoSettings
  7556.  
  7557. waitsecond(2)
  7558. end
  7559.  
  7560. tcase << TestAction.new(:Click_Network) do
  7561. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', 1379611054).with('textdescid', 223764122).with('uniqueparentid', 1077985656)
  7562. .with('uitreeindex', 16)
  7563. .with('classname', 'TextView')
  7564. .with('resource-id', 'android:id/title')
  7565. .with('text', 'Network Internet')
  7566.  
  7567. $ruiObj.click
  7568.  
  7569. waitsecond(2)
  7570. end
  7571.  
  7572. tcase << TestAction.new(:Click_Mobile_Network) do
  7573. $ruiObj = RUIObject.new.with('objectid', 1887322852).with('selfid', -194627727).with('textdescid', -38060012).with('uniqueparentid', -1915761805)
  7574. .with('uitreeindex', 10)
  7575. .with('classname', 'TextView')
  7576. .with('resource-id', 'android:id/title')
  7577. .with('text', 'Mobile network')
  7578.  
  7579. $ruiObj.click
  7580.  
  7581. waitsecond(2)
  7582. end
  7583.  
  7584. tcase << TestAction.new(:Click_Preferred) do
  7585. $ruiObj = RUIObject.new.with('objectid', 559310926).with('selfid', 517165292).with('textdescid', 482560099).with('uniqueparentid', -1016225766).with('classresourceid', 490183159)
  7586. .with('uitreeindex', 5)
  7587. .with('classname', 'TextView')
  7588. .with('resource-id', 'android:id/title')
  7589. .with('text', 'Preferred network type')
  7590.  
  7591. $ruiObj.click
  7592.  
  7593. waitsecond(2)
  7594. end
  7595.  
  7596. tcase << TestAction.new(:Click_LTE_TMUS) do
  7597. $ruiObj = RUIObject.new.with('objectid', -442050023).with('selfid', 1679268164).with('textdescid', 1652493263).with('uniqueparentid', -990483570).with('classresourceid', 2074814108)
  7598. .with('uitreeindex', 2)
  7599. .with('classname', 'CheckedTextView')
  7600. .with('resource-id', 'android:id/text1')
  7601. .with('text', 'LTE recommended')
  7602.  
  7603. $ruiObj.click
  7604.  
  7605. waitsecond(2)
  7606. end
  7607.  
  7608. tcase << TestAction.new(:Click_LTE_VZW) do
  7609. $ruiObj = RUIObject.new.with('objectid', -442050023).with('selfid', -196746481).with('textdescid', 587737118).with('uniqueparentid', 9112671).with('classresourceid', 2074814108)
  7610. .with('uitreeindex', 4)
  7611. .with('classname', 'CheckedTextView')
  7612. .with('resource-id', 'android:id/text1')
  7613. .with('text', 'LTE GSM UMTS')
  7614.  
  7615. $ruiObj.click
  7616.  
  7617. waitsecond(2)
  7618. end
  7619.  
  7620. tcase << TestAction.new(:Send_CMD_Phone) do
  7621. sendBTCmd("gotoApp('Phone')")
  7622.  
  7623. waitsecond(2)
  7624. end
  7625.  
  7626. tcase << TestAction.new(:Send_CMD_Click_Dialer) do
  7627. sendBTCmd("RUIObject.new.with('classname', 'TextView').with('text', 'Dial').click")
  7628.  
  7629. waitsecond(2)
  7630. end
  7631.  
  7632. tcase << TestAction.new(:Send_CMD_Input_DB) do
  7633. sendBTCmd("RUIObject.new.with('classname', 'EditText').inputtext('#{db('CallNumber')[0]}')")
  7634.  
  7635. waitsecond(2)
  7636. end
  7637.  
  7638. tcase << TestAction.new(:Send_CMD_Call) do
  7639. sendBTCmd("RUIObject.new.with('classname', 'ImageButton').with('content-desc', 'Call').click")
  7640.  
  7641. waitsecond(8)
  7642. end
  7643.  
  7644. tcase << TestAction.new(:Refresh) do
  7645. refreshScreen
  7646.  
  7647. waitsecond(2)
  7648. end
  7649.  
  7650. tcase << TestAction.new(:Answer_Call) do
  7651. click(1048.5,409.5)
  7652.  
  7653. waitsecond(8)
  7654. end
  7655.  
  7656. tcase << TestAction.new(:Check_End) do
  7657. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', -909340709)
  7658. .with('uitreeindex', 13)
  7659. .with('classname', 'ImageButton')
  7660. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  7661. .with('content-desc', 'End call')
  7662.  
  7663. $ruiObj.isExist
  7664.  
  7665. waitsecond(0)
  7666. end
  7667.  
  7668. tcase << TestAction.new(:Click_End) do
  7669. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', -909340709)
  7670. .with('uitreeindex', 13)
  7671. .with('classname', 'ImageButton')
  7672. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  7673. .with('content-desc', 'End call')
  7674.  
  7675. $ruiObj.click
  7676.  
  7677. waitsecond(2)
  7678. end
  7679.  
  7680. tcase << TestAction.new(:Send_CMD_End) do
  7681. sendBTCmd("endCall")
  7682.  
  7683. waitsecond(2)
  7684. end
  7685.  
  7686. tcase << TestAction.new(:Stop_Log) do
  7687. $myTestResult = checkLastExistResult
  7688.  
  7689. logStopTest("Telephony_5_1_1_5")
  7690.  
  7691. waitsecond(0)
  7692. end
  7693.  
  7694. tcase << TestAction.new(:pressBack_2) do
  7695. pressBack
  7696.  
  7697. waitsecond(2)
  7698. end
  7699.  
  7700. tcase << TestAction.new(:pressBack_2_1) do
  7701. pressBack
  7702.  
  7703. waitsecond(2)
  7704. end
  7705.  
  7706. tcase.run(loopTime)
  7707.  
  7708. end
  7709.  
  7710. def self.Telephony_5_1_1_6_7(loopTime)
  7711.  
  7712. tcase = TestCase.new("Telephony_5_1_1_6_7")
  7713.  
  7714. tcase << TestAction.new(:scriptAction_2) do
  7715. logStartTest("Telephony_5_1_1_7")
  7716.  
  7717. waitsecond(0)
  7718. end
  7719.  
  7720. tcase << TestAction.new(:scriptAction_1) do
  7721. gotoAppPixel("Phone")
  7722.  
  7723. waitsecond(2)
  7724. end
  7725.  
  7726. tcase << TestAction.new(:ImageView_Icon_29) do
  7727. $ruiObj = RUIObject.new.with('objectid', 1729076897).with('selfid', -1616608746).with('textdescid', -1107521081).with('uniqueparentid', -1902824159)
  7728. .with('uitreeindex', 2)
  7729. .with('classname', 'ImageView')
  7730. .with('resource-id', 'com.android.dialer:id/icon')
  7731. .with('content-desc', 'Contacts tab.')
  7732.  
  7733. $ruiObj.click
  7734.  
  7735. waitsecond(2)
  7736. end
  7737.  
  7738. tcase << TestAction.new(:ImageButton_FloatingActionButton_41) do
  7739. $ruiObj = RUIObject.new.with('objectid', -563620762).with('selfid', 586481042).with('textdescid', 1205026070).with('uniqueparentid', -529133278)
  7740. .with('uitreeindex', 28)
  7741. .with('classname', 'ImageButton')
  7742. .with('resource-id', 'com.android.dialer:id/floating_action_button')
  7743. .with('content-desc', 'Create new contact')
  7744.  
  7745. $ruiObj.click
  7746.  
  7747. waitsecond(2)
  7748. end
  7749.  
  7750. tcase << TestAction.new(:EditText_6) do
  7751. $ruiObj = RUIObject.new.with('objectid', 819811840).with('selfid', 1666676343).with('textdescid', -355636704).with('uniqueparentid', 1682676351).with('classresourceid', 1666676343)
  7752. .with('uitreeindex', 12)
  7753. .with('pretext', 'lgeqcttest4gmailcom?0')
  7754. .with('classname', 'EditText')
  7755.  
  7756. $ruiObj.inputtext('tn tn')
  7757.  
  7758. waitsecond(2)
  7759. end
  7760.  
  7761. tcase << TestAction.new(:ImageView_KindIcon_18) do
  7762. $ruiObj = RUIObject.new.with('objectid', 1187803482).with('selfid', 565066917).with('textdescid', -854093455).with('uniqueparentid', 833678705).with('classresourceid', -301662486)
  7763. .with('uitreeindex', 11)
  7764. .with('classname', 'ImageView')
  7765. .with('resource-id', 'com.google.android.contacts:id/kind_icon')
  7766. .with('content-desc', 'Name')
  7767.  
  7768. $ruiObj.click
  7769.  
  7770. waitsecond(2)
  7771. end
  7772.  
  7773. tcase << TestAction.new(:EditText_20) do
  7774. $ruiObj = RUIObject.new.with('objectid', 819811840).with('selfid', 1666676343).with('textdescid', -355636704).with('uniqueparentid', 301757543).with('classresourceid', 1666676343)
  7775. .with('uitreeindex', 16)
  7776. .with('pretext', 'lgeqcttest4gmailcom?2')
  7777. .with('classname', 'EditText')
  7778.  
  7779. $ruiObj.inputtext('0000000000')
  7780.  
  7781. waitsecond(2)
  7782. end
  7783.  
  7784. tcase << TestAction.new(:Button_EditorMenuSaveButton_22) do
  7785. $ruiObj = RUIObject.new.with('objectid', -1708784447).with('selfid', -1130240991).with('textdescid', -1687078364).with('uniqueparentid', 2006790125)
  7786. .with('uitreeindex', 2)
  7787. .with('classname', 'Button')
  7788. .with('resource-id', 'com.google.android.contacts:id/editor_menu_save_button')
  7789. .with('text', 'SAVE')
  7790.  
  7791. $ruiObj.isExist
  7792.  
  7793. waitsecond(0)
  7794. end
  7795.  
  7796. tcase << TestAction.new(:Button_EditorMenuSaveButton_22_1) do
  7797. $ruiObj = RUIObject.new.with('objectid', -1708784447).with('selfid', -1130240991).with('textdescid', -1687078364).with('uniqueparentid', 2006790125)
  7798. .with('uitreeindex', 2)
  7799. .with('classname', 'Button')
  7800. .with('resource-id', 'com.google.android.contacts:id/editor_menu_save_button')
  7801. .with('text', 'SAVE')
  7802.  
  7803. $ruiObj.click
  7804.  
  7805. waitsecond(2)
  7806. end
  7807.  
  7808. tcase << TestAction.new(:scriptAction_4) do
  7809. logStopTest("Telephony_5_1_1_7")
  7810.  
  7811. waitsecond(0)
  7812. end
  7813.  
  7814. tcase << TestAction.new(:scriptAction_2_1) do
  7815. logStartTest("Telephony_5_1_1_6")
  7816.  
  7817. waitsecond(0)
  7818. end
  7819.  
  7820. tcase << TestAction.new(:scriptAction_12) do
  7821. gotoAppPixel("Phone")
  7822.  
  7823. waitsecond(2)
  7824. end
  7825.  
  7826. tcase << TestAction.new(:ImageView_Icon_3) do
  7827. $ruiObj = RUIObject.new.with('objectid', 1729076897).with('selfid', -1616608746).with('textdescid', -1107521081).with('uniqueparentid', -1902824159)
  7828. .with('uitreeindex', 2)
  7829. .with('classname', 'ImageView')
  7830. .with('resource-id', 'com.android.dialer:id/icon')
  7831. .with('content-desc', 'Contacts tab.')
  7832.  
  7833. $ruiObj.click
  7834.  
  7835. waitsecond(2)
  7836. end
  7837.  
  7838. tcase << TestAction.new(:TextView_SearchBoxStartSearch_5) do
  7839. $ruiObj = RUIObject.new.with('objectid', 923652289).with('selfid', -1151038352).with('textdescid', 1007284052).with('uniqueparentid', 183054914)
  7840. .with('uitreeindex', 30)
  7841. .with('classname', 'TextView')
  7842. .with('resource-id', 'com.android.dialer:id/search_box_start_search')
  7843. .with('text', 'Search contacts')
  7844.  
  7845. $ruiObj.click
  7846.  
  7847. waitsecond(2)
  7848. end
  7849.  
  7850. tcase << TestAction.new(:EditText_SearchView_9) do
  7851. $ruiObj = RUIObject.new.with('objectid', 633166156).with('selfid', -1518126622).with('textdescid', -1846685612).with('uniqueparentid', 1793823206)
  7852. .with('uitreeindex', 1)
  7853. .with('classname', 'EditText')
  7854. .with('resource-id', 'com.android.dialer:id/search_view')
  7855.  
  7856. $ruiObj.inputtext('tn tn')
  7857.  
  7858. waitsecond(2)
  7859. end
  7860.  
  7861. tcase << TestAction.new(:clickXY_117_441_17) do
  7862. click(117,441)
  7863.  
  7864. waitsecond(2)
  7865. end
  7866.  
  7867. tcase << TestAction.new(:ImageButton_More_19) do
  7868. $ruiObj = RUIObject.new.with('objectid', 1906984818).with('selfid', 1290820192).with('textdescid', 1695157921).with('uniqueparentid', 1370851987)
  7869. .with('uitreeindex', 6)
  7870. .with('classname', 'ImageButton')
  7871. .with('content-desc', 'More options')
  7872.  
  7873. $ruiObj.click
  7874.  
  7875. waitsecond(2)
  7876. end
  7877.  
  7878. tcase << TestAction.new(:TextView_Title_21) do
  7879. $ruiObj = RUIObject.new.with('objectid', -374621661).with('selfid', -342341268).with('textdescid', -931837256).with('uniqueparentid', 749545879).with('classresourceid', 490183159)
  7880. .with('uitreeindex', 1)
  7881. .with('classname', 'TextView')
  7882. .with('resource-id', 'android:id/title')
  7883. .with('text', 'Delete')
  7884.  
  7885. $ruiObj.click
  7886.  
  7887. waitsecond(2)
  7888. end
  7889.  
  7890. tcase << TestAction.new(:Button_Button1_23) do
  7891. $ruiObj = RUIObject.new.with('objectid', 1890289855).with('selfid', 982364851).with('textdescid', 319664500).with('uniqueparentid', 864646072).with('classresourceid', 1834539358)
  7892. .with('uitreeindex', 3)
  7893. .with('classname', 'Button')
  7894. .with('resource-id', 'android:id/button1')
  7895. .with('text', 'DELETE')
  7896.  
  7897. $ruiObj.isExist
  7898.  
  7899. waitsecond(0)
  7900. end
  7901.  
  7902. tcase << TestAction.new(:Button_Button1_23_1) do
  7903. $ruiObj = RUIObject.new.with('objectid', 1890289855).with('selfid', 982364851).with('textdescid', 319664500).with('uniqueparentid', 864646072).with('classresourceid', 1834539358)
  7904. .with('uitreeindex', 3)
  7905. .with('classname', 'Button')
  7906. .with('resource-id', 'android:id/button1')
  7907. .with('text', 'DELETE')
  7908.  
  7909. $ruiObj.click
  7910.  
  7911. waitsecond(2)
  7912. end
  7913.  
  7914. tcase << TestAction.new(:scriptAction_4_1) do
  7915. logStopTest("Telephony_5_1_1_6")
  7916.  
  7917. waitsecond(0)
  7918. end
  7919.  
  7920. tcase.run(loopTime)
  7921.  
  7922. end
  7923.  
  7924. def self.WiFi_5_1_10_1(loopTime)
  7925.  
  7926. tcase = TestCase.new("WiFi_5_1_10_1")
  7927.  
  7928. tcase << TestAction.new(:logstart) do
  7929. logStartTest("05_01_10_01_WiFi")
  7930.  
  7931. waitsecond(0)
  7932. end
  7933.  
  7934. tcase << TestAction.new(:Settings) do
  7935. gotoAppPixel("Settings")
  7936.  
  7937. waitsecond(2)
  7938. end
  7939.  
  7940. tcase << TestAction.new(:clicknetwork) do
  7941. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', 1379611054).with('textdescid', 223764122).with('uniqueparentid', 1077985656)
  7942. .with('uitreeindex', 10)
  7943. .with('classname', 'TextView')
  7944. .with('resource-id', 'android:id/title')
  7945. .with('text', 'Network Internet')
  7946.  
  7947. $ruiObj.click
  7948.  
  7949. waitsecond(2)
  7950. end
  7951.  
  7952. tcase << TestAction.new(:clickwifi) do
  7953. $ruiObj = RUIObject.new.with('objectid', 1887322852).with('selfid', -589731018).with('textdescid', 1307010863).with('uniqueparentid', 2137399017)
  7954. .with('uitreeindex', 5)
  7955. .with('classname', 'TextView')
  7956. .with('resource-id', 'android:id/title')
  7957. .with('text', 'WiFi')
  7958.  
  7959. $ruiObj.click
  7960.  
  7961. waitsecond(2)
  7962. end
  7963.  
  7964. tcase << TestAction.new(:ifwifiison_turnoffwifi) do
  7965. $WiFiOn= RUIObject.new.with('objectid', -312510337).with('selfid', 1955659484).with('textdescid', -940514592).with('uniqueparentid', 2062568066)
  7966. .with('uitreeindex', 3)
  7967. .with('classname', 'TextView')
  7968. .with('resource-id', 'com.android.settings:id/switch_text')
  7969. .with('text', 'On')
  7970.  
  7971. if $WiFiOn.isExist
  7972. RUIObject.new.with('objectid', 1169510804).with('selfid', -1921366703).with('textdescid', -522574443).with('uniqueparentid', 2062568066)
  7973. .with('uitreeindex', 4)
  7974. .with('classname', 'Switch')
  7975. .with('resource-id', 'com.android.settings:id/switch_widget')
  7976. .with('text', 'ON').click
  7977. return true
  7978. end
  7979.  
  7980. waitsecond(2)
  7981. end
  7982.  
  7983. tcase << TestAction.new(:TurnOnWifi) do
  7984. $ruiObj = RUIObject.new.with('objectid', 1169510804).with('selfid', -1921366703).with('textdescid', -522574443).with('uniqueparentid', 2062568066)
  7985. .with('uitreeindex', 4)
  7986. .with('classname', 'Switch')
  7987. .with('resource-id', 'com.android.settings:id/switch_widget')
  7988. .with('text', 'ON')
  7989.  
  7990. $ruiObj.click
  7991.  
  7992. waitsecond(2)
  7993. end
  7994.  
  7995. tcase << TestAction.new(:wait10second_4) do
  7996. waitsecond(10)
  7997. end
  7998.  
  7999. tcase << TestAction.new(:ON_Exist) do
  8000. $ruiObj = RUIObject.new.with('objectid', -312510337).with('selfid', 1955659484).with('textdescid', -940514592).with('uniqueparentid', 2062568066)
  8001. .with('uitreeindex', 2)
  8002. .with('classname', 'TextView')
  8003. .with('resource-id', 'com.android.settings:id/switch_text')
  8004. .with('text', 'On')
  8005.  
  8006. $ruiObj.isExist
  8007.  
  8008. waitsecond(0)
  8009. end
  8010.  
  8011. tcase << TestAction.new(:TurnoffWifi) do
  8012. $ruiObj = RUIObject.new.with('objectid', 1169510804).with('selfid', -1921366703).with('textdescid', -522574443).with('uniqueparentid', 2062568066)
  8013. .with('uitreeindex', 3)
  8014. .with('classname', 'Switch')
  8015. .with('resource-id', 'com.android.settings:id/switch_widget')
  8016. .with('text', 'ON')
  8017.  
  8018. $ruiObj.click
  8019.  
  8020. waitsecond(2)
  8021. end
  8022.  
  8023. tcase << TestAction.new(:stoplog) do
  8024. $myTestResult = checkLastExistResult
  8025.  
  8026. if $myTestResult == false
  8027. $myFailReason = "WiFi cannot turn ON"
  8028. end
  8029. logStopTest("05_01_10_01_WiFi")
  8030.  
  8031.  
  8032. waitsecond(0)
  8033. end
  8034.  
  8035. tcase << TestAction.new(:pressBack_8) do
  8036. pressBack
  8037.  
  8038. waitsecond(0)
  8039. end
  8040.  
  8041. tcase << TestAction.new(:pressBack_9) do
  8042. pressBack
  8043.  
  8044. waitsecond(0)
  8045. end
  8046.  
  8047. tcase << TestAction.new(:pressBack_10) do
  8048. pressBack
  8049.  
  8050. waitsecond(0)
  8051. end
  8052.  
  8053. tcase << TestAction.new(:pressBack_11) do
  8054. pressBack
  8055.  
  8056. waitsecond(0)
  8057. end
  8058.  
  8059. tcase << TestAction.new(:pressHome_12) do
  8060. pressHome
  8061.  
  8062. waitsecond(0)
  8063. end
  8064.  
  8065. tcase.run(loopTime)
  8066.  
  8067. end
  8068.  
  8069. def self.WiFi_5_1_10_2(loopTime)
  8070.  
  8071. tcase = TestCase.new("WiFi_5_1_10_2")
  8072.  
  8073. tcase << TestAction.new(:logstart) do
  8074. logStartTest("05_01_10_02_WiFi")
  8075.  
  8076. waitsecond(0)
  8077. end
  8078.  
  8079. tcase << TestAction.new(:Settings) do
  8080. gotoAppPixel("Settings")
  8081.  
  8082. waitsecond(2)
  8083. end
  8084.  
  8085. tcase << TestAction.new(:clicknetwork) do
  8086. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', 1379611054).with('textdescid', 223764122).with('uniqueparentid', 1077985656)
  8087. .with('uitreeindex', 10)
  8088. .with('classname', 'TextView')
  8089. .with('resource-id', 'android:id/title')
  8090. .with('text', 'Network Internet')
  8091.  
  8092. $ruiObj.click
  8093.  
  8094. waitsecond(2)
  8095. end
  8096.  
  8097. tcase << TestAction.new(:clickwifi) do
  8098. $ruiObj = RUIObject.new.with('objectid', 1887322852).with('selfid', -589731018).with('textdescid', 1307010863).with('uniqueparentid', 2137399017)
  8099. .with('uitreeindex', 5)
  8100. .with('classname', 'TextView')
  8101. .with('resource-id', 'android:id/title')
  8102. .with('text', 'WiFi')
  8103.  
  8104. $ruiObj.click
  8105.  
  8106. waitsecond(2)
  8107. end
  8108.  
  8109. tcase << TestAction.new(:ifwifiison_turnoffwifi) do
  8110. $WiFiOn= RUIObject.new.with('objectid', -312510337).with('selfid', 1955659484).with('textdescid', -940514592).with('uniqueparentid', 2062568066)
  8111. .with('uitreeindex', 3)
  8112. .with('classname', 'TextView')
  8113. .with('resource-id', 'com.android.settings:id/switch_text')
  8114. .with('text', 'On')
  8115.  
  8116. if $WiFiOn.isExist
  8117. RUIObject.new.with('objectid', 1169510804).with('selfid', -1921366703).with('textdescid', -522574443).with('uniqueparentid', 2062568066)
  8118. .with('uitreeindex', 4)
  8119. .with('classname', 'Switch')
  8120. .with('resource-id', 'com.android.settings:id/switch_widget')
  8121. .with('text', 'ON').click
  8122. return true
  8123. end
  8124.  
  8125. waitsecond(2)
  8126. end
  8127.  
  8128. tcase << TestAction.new(:TurnOnWifi) do
  8129. $ruiObj = RUIObject.new.with('objectid', 1169510804).with('selfid', -1921366703).with('textdescid', -522574443).with('uniqueparentid', 2062568066)
  8130. .with('uitreeindex', 4)
  8131. .with('classname', 'Switch')
  8132. .with('resource-id', 'com.android.settings:id/switch_widget')
  8133. .with('text', 'ON')
  8134.  
  8135. $ruiObj.click
  8136.  
  8137. waitsecond(2)
  8138. end
  8139.  
  8140. tcase << TestAction.new(:wait5second_4) do
  8141. waitsecond(5)
  8142. end
  8143.  
  8144. tcase << TestAction.new(:clickMTBFATT24GHZ) do
  8145. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', -2006843326).with('textdescid', 445555028).with('uniqueparentid', -1447642125)
  8146. .with('uitreeindex', 21)
  8147. .with('classname', 'TextView')
  8148. .with('resource-id', 'android:id/title')
  8149. .with('text', 'MTBFATT24Ghz')
  8150.  
  8151. $ruiObj.click
  8152.  
  8153. waitsecond(2)
  8154. end
  8155.  
  8156. tcase << TestAction.new(:TurnoffWifi) do
  8157. $ruiObj = RUIObject.new.with('objectid', 1169510804).with('selfid', -1921366703).with('textdescid', -522574443).with('uniqueparentid', 2062568066)
  8158. .with('uitreeindex', 3)
  8159. .with('classname', 'Switch')
  8160. .with('resource-id', 'com.android.settings:id/switch_widget')
  8161. .with('text', 'ON')
  8162.  
  8163. $ruiObj.click
  8164.  
  8165. waitsecond(2)
  8166. end
  8167.  
  8168. tcase << TestAction.new(:putpassword) do
  8169. $ruiObj = RUIObject.new.with('objectid', 780695774).with('selfid', 8195995).with('textdescid', -1568234750).with('uniqueparentid', -1143128344).with('classresourceid', 1413676103)
  8170. .with('uitreeindex', 2)
  8171. .with('classname', 'EditText')
  8172. .with('resource-id', 'com.android.settings:id/password')
  8173.  
  8174. $ruiObj.inputtext('12abcdef34')
  8175.  
  8176. waitsecond(2)
  8177. end
  8178.  
  8179. tcase << TestAction.new(:pressEnter_13) do
  8180. pressEnter
  8181.  
  8182. waitsecond(2)
  8183. end
  8184.  
  8185. tcase << TestAction.new(:wait5second_15) do
  8186. waitsecond(5)
  8187. end
  8188.  
  8189. tcase << TestAction.new(:ifconnectedexist) do
  8190. $ruiObj = RUIObject.new.with('objectid', -2037966493).with('selfid', -404041766).with('textdescid', 656334132).with('uniqueparentid', 589819388)
  8191. .with('uitreeindex', 7)
  8192. .with('classname', 'TextView')
  8193. .with('resource-id', 'android:id/summary')
  8194. .with('text', 'Connected')
  8195.  
  8196. $ruiObj.isExist
  8197.  
  8198. waitsecond(2)
  8199. end
  8200.  
  8201. tcase << TestAction.new(:gotowifisetting) do
  8202. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', -2006843326).with('textdescid', 445555028).with('uniqueparentid', 589819388)
  8203. .with('uitreeindex', 6)
  8204. .with('classname', 'TextView')
  8205. .with('resource-id', 'android:id/title')
  8206. .with('text', 'MTBFATT24Ghz')
  8207.  
  8208. $ruiObj.click
  8209.  
  8210. waitsecond(2)
  8211. end
  8212.  
  8213. tcase << TestAction.new(:disconnectwifi) do
  8214. $ruiObj = RUIObject.new.with('objectid', 699987448).with('selfid', 2030417820).with('textdescid', 281870763).with('uniqueparentid', -1500304950)
  8215. .with('uitreeindex', 4)
  8216. .with('classname', 'Button')
  8217. .with('resource-id', 'com.android.settings:id/left_button')
  8218. .with('text', 'FORGET')
  8219.  
  8220. $ruiObj.click
  8221.  
  8222. waitsecond(2)
  8223. end
  8224.  
  8225. tcase << TestAction.new(:stoplog) do
  8226. $myTestResult = checkLastExistResult
  8227.  
  8228. if $myTestResult == false
  8229. $myFailReason == "WiFi cannot connected"
  8230. end
  8231. logStopTest("05_01_10_02_WiFi")
  8232.  
  8233.  
  8234. waitsecond(0)
  8235. end
  8236.  
  8237. tcase << TestAction.new(:pressBack_8) do
  8238. pressBack
  8239.  
  8240. waitsecond(0)
  8241. end
  8242.  
  8243. tcase << TestAction.new(:pressBack_9) do
  8244. pressBack
  8245.  
  8246. waitsecond(0)
  8247. end
  8248.  
  8249. tcase << TestAction.new(:pressBack_10) do
  8250. pressBack
  8251.  
  8252. waitsecond(0)
  8253. end
  8254.  
  8255. tcase << TestAction.new(:pressBack_11) do
  8256. pressBack
  8257.  
  8258. waitsecond(0)
  8259. end
  8260.  
  8261. tcase << TestAction.new(:pressHome_12) do
  8262. pressHome
  8263.  
  8264. waitsecond(0)
  8265. end
  8266.  
  8267. tcase.run(loopTime)
  8268.  
  8269. end
  8270.  
  8271. def self.startTest(loopTime)
  8272.  
  8273. tcase = TestCase.new("startTest")
  8274.  
  8275. tcase << TestAction.new(:blankaction) do
  8276. waitsecond(0)
  8277. end
  8278.  
  8279. tcase.run(loopTime)
  8280.  
  8281. end
  8282.  
  8283. def self.Messaging_5_1_2_5(loopTime)
  8284.  
  8285. tcase = TestCase.new("Messaging_5_1_2_5")
  8286.  
  8287. tcase << TestAction.new(:LogStart) do
  8288. logStartTest('Messaging_5_1_2_5')
  8289.  
  8290. waitsecond(0)
  8291. end
  8292.  
  8293. tcase << TestAction.new(:goto_Messages) do
  8294. gotoAppPixel('Messages')
  8295.  
  8296. waitsecond(2)
  8297. end
  8298.  
  8299. tcase << TestAction.new(:Open_New_Message) do
  8300. $ruiObj = RUIObject.new.with('objectid', 764419066).with('selfid', 916878134).with('textdescid', 48640071).with('uniqueparentid', 1408873138)
  8301. .with('uitreeindex', 6)
  8302. .with('classname', 'ImageView')
  8303. .with('resource-id', 'com.google.android.apps.messaging:id/start_new_conversation_button')
  8304. .with('content-desc', 'Start new conversation')
  8305.  
  8306. $ruiObj.click
  8307.  
  8308. waitsecond(2)
  8309. end
  8310.  
  8311. tcase << TestAction.new(:Select_Recipient) do
  8312. $ruiObj = RUIObject.new.with('objectid', 1212228391).with('selfid', 1084775715).with('textdescid', -604433803).with('uniqueparentid', 1087733730).with('classresourceid', -848607765)
  8313. .with('uitreeindex', 10)
  8314. .with('classname', 'TextView')
  8315. .with('resource-id', 'com.google.android.apps.messaging:id/contact_name')
  8316. .with('text', 'A01 a01')
  8317.  
  8318. $ruiObj.click
  8319.  
  8320. waitsecond(2)
  8321. end
  8322.  
  8323. tcase << TestAction.new(:Input_Message_Text) do
  8324. $inputText = RUIObject.new.with('objectid', 839697618).with('selfid', -1932318364).with('textdescid', 260822414).with('uniqueparentid', 1032254030)
  8325. .with('uitreeindex', 8)
  8326. .with('classname', 'EditText')
  8327. .with('resource-id', 'com.google.android.apps.messaging:id/compose_message_text')
  8328.  
  8329. $inputText.inputtext('Abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzaaaaaaaaaabbbbbbbbbbcccccccccc')
  8330.  
  8331. waitsecond(2)
  8332. end
  8333.  
  8334. tcase << TestAction.new(:Add_Attachment) do
  8335. $ruiObj = RUIObject.new.with('objectid', -1360420814).with('selfid', -952088716).with('textdescid', 1847611113).with('uniqueparentid', 1631420680)
  8336. .with('uitreeindex', 7)
  8337. .with('classname', 'ImageButton')
  8338. .with('resource-id', 'com.google.android.apps.messaging:id/attach_media_button')
  8339. .with('content-desc', 'Add an attachment')
  8340.  
  8341. $ruiObj.click
  8342.  
  8343. waitsecond(2)
  8344. end
  8345.  
  8346. tcase << TestAction.new(:Navigate_Pictures) do
  8347. $ruiObj = RUIObject.new.with('objectid', 1408822083).with('selfid', 538927602).with('textdescid', 531479902).with('uniqueparentid', -1874692983)
  8348. .with('uitreeindex', 28)
  8349. .with('classname', 'ImageButton')
  8350. .with('content-desc', 'Choose images from this device')
  8351.  
  8352. $ruiObj.click
  8353.  
  8354. waitsecond(2)
  8355. end
  8356.  
  8357. tcase << TestAction.new(:Allow_Permission) do
  8358. $ruiObj = RUIObject.new.with('objectid', -655699299).with('selfid', -1852985786).with('textdescid', -1480420102).with('uniqueparentid', -2002661991)
  8359. .with('uitreeindex', 13)
  8360. .with('classname', 'TextView')
  8361. .with('resource-id', 'com.google.android.apps.messaging:id/missing_permission_enable')
  8362. .with('text', 'ALLOW')
  8363.  
  8364. $ruiObj.click
  8365.  
  8366. waitsecond(2)
  8367. end
  8368.  
  8369. tcase << TestAction.new(:Accept_Permission) do
  8370. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  8371. .with('uitreeindex', 3)
  8372. .with('classname', 'Button')
  8373. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  8374. .with('text', 'ALLOW')
  8375.  
  8376. $ruiObj.click
  8377.  
  8378. waitsecond(2)
  8379. end
  8380.  
  8381. tcase << TestAction.new(:Expand_Attachments) do
  8382. swipe(getDisplayWidth/2, getDisplayHeight - 50, getDisplayWidth/2, getDisplayHeight/4, 20)
  8383.  
  8384. waitsecond(2)
  8385. end
  8386.  
  8387. tcase << TestAction.new(:Search_for_Video) do
  8388. scrollAndSearchText("031")
  8389.  
  8390. waitsecond(2)
  8391. end
  8392.  
  8393. tcase << TestAction.new(:Select_Video) do
  8394. $ruiObj = RUIObject.new.with('selfid', 387236504).with('textdescid', 1922566919).with('uniqueparentid', -660471932)
  8395. .with('content-desc', 'Video attachment 31 seconds')
  8396.  
  8397. $ruiObj.click
  8398.  
  8399. waitsecond(2)
  8400. end
  8401.  
  8402. tcase << TestAction.new(:Collapse_Attachments) do
  8403. swipe(getDisplayWidth/2, getDisplayHeight/4, getDisplayWidth/2, getDisplayHeight, 10)
  8404. swipe(getDisplayWidth/2, getDisplayHeight/4, getDisplayWidth/2, getDisplayHeight, 10)
  8405.  
  8406. waitsecond(2)
  8407. end
  8408.  
  8409. tcase << TestAction.new(:Send_Message) do
  8410. $ruiObj = RUIObject.new.with('objectid', 874675584).with('selfid', -1214465728).with('textdescid', 1345139360).with('uniqueparentid', 1105097632)
  8411. .with('uitreeindex', 10)
  8412. .with('classname', 'ImageView')
  8413. .with('resource-id', 'com.google.android.apps.messaging:id/send_message_button_icon')
  8414.  
  8415. $ruiObj.click
  8416.  
  8417. waitsecond(2)
  8418. end
  8419.  
  8420. tcase << TestAction.new(:Wait_Sent_Confirmation) do
  8421. $sentMMS = RUIObject.new.with('objectid', -1223562103).with('selfid', 893316915).with('textdescid', 1281233763).with('uniqueparentid', 807778548)
  8422. .with('uitreeindex', 4)
  8423. .with('classname', 'TextView')
  8424. .with('text', 'Now MMS')
  8425.  
  8426. $count = 0
  8427.  
  8428. while $sentMMS.isNotExist && $count < 60
  8429. waitsecond(1)
  8430. $count += 1
  8431. puts $count
  8432. end
  8433.  
  8434. waitsecond(2)
  8435. end
  8436.  
  8437. tcase << TestAction.new(:Sent_Confirmation) do
  8438. $ruiObj = RUIObject.new.with('objectid', -1223562103).with('selfid', 893316915).with('textdescid', 1281233763).with('uniqueparentid', 807778548)
  8439. .with('uitreeindex', 4)
  8440. .with('classname', 'TextView')
  8441. .with('text', 'Now MMS')
  8442.  
  8443. $ruiObj.isExist
  8444.  
  8445. waitsecond(0)
  8446. end
  8447.  
  8448. tcase << TestAction.new(:Test_Result) do
  8449. $myTestResult = checkLastExistResult
  8450.  
  8451. waitsecond(0)
  8452. end
  8453.  
  8454. tcase << TestAction.new(:Press_Back) do
  8455. pressBack
  8456.  
  8457. waitsecond(2)
  8458. end
  8459.  
  8460. tcase << TestAction.new(:Exit_Conversation) do
  8461. $ruiObj = RUIObject.new.with('objectid', 1425651979).with('selfid', -123872605).with('textdescid', 1768877749).with('uniqueparentid', -1261979652)
  8462. .with('uitreeindex', 9)
  8463. .with('classname', 'ImageButton')
  8464. .with('content-desc', 'Navigate up')
  8465.  
  8466. $ruiObj.click
  8467.  
  8468. waitsecond(2)
  8469. end
  8470.  
  8471. tcase << TestAction.new(:Select_Conversation) do
  8472. $ruiObj = RUIObject.new.with('objectid', 201599363).with('selfid', -373146860).with('textdescid', 648115097).with('uniqueparentid', 138155849)
  8473. .with('uitreeindex', 6)
  8474. .with('classname', 'TextView')
  8475. .with('resource-id', 'com.google.android.apps.messaging:id/conversation_name')
  8476. .with('text', 'A01 a01')
  8477.  
  8478. $ruiObj.longClick
  8479.  
  8480. waitsecond(2)
  8481. end
  8482.  
  8483. tcase << TestAction.new(:Delete_Conversation) do
  8484. $ruiObj = RUIObject.new.with('objectid', 1400187979).with('selfid', -1174101288).with('textdescid', -1369143488).with('uniqueparentid', 112203385)
  8485. .with('uitreeindex', 2)
  8486. .with('classname', 'TextView')
  8487. .with('resource-id', 'com.google.android.apps.messaging:id/action_delete')
  8488. .with('content-desc', 'Delete')
  8489.  
  8490. $ruiObj.click
  8491.  
  8492. waitsecond(2)
  8493. end
  8494.  
  8495. tcase << TestAction.new(:Confirm_Delete_Conversation) do
  8496. $ruiObj = RUIObject.new.with('objectid', -968538326).with('selfid', 982364851).with('textdescid', -2103192353).with('uniqueparentid', -1643928723).with('classresourceid', 1834539358)
  8497. .with('uitreeindex', 2)
  8498. .with('classname', 'Button')
  8499. .with('resource-id', 'android:id/button1')
  8500. .with('text', 'DELETE')
  8501.  
  8502. $ruiObj.click
  8503.  
  8504. waitsecond(2)
  8505. end
  8506.  
  8507. tcase << TestAction.new(:LogStop) do
  8508. logStopTest('Messaging_5_1_2_5')
  8509.  
  8510. waitsecond(0)
  8511. end
  8512.  
  8513. tcase << TestAction.new(:Press_Back_1) do
  8514. pressBack
  8515. waitsecond(1)
  8516. pressBack
  8517.  
  8518. waitsecond(2)
  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(:Send_Message) do
  8642. $ruiObj = RUIObject.new.with('objectid', 874675584).with('selfid', -1214465728).with('textdescid', 1345139360).with('uniqueparentid', 1105097632)
  8643. .with('uitreeindex', 10)
  8644. .with('classname', 'ImageView')
  8645. .with('resource-id', 'com.google.android.apps.messaging:id/send_message_button_icon')
  8646.  
  8647. $ruiObj.click
  8648.  
  8649. waitsecond(2)
  8650. end
  8651.  
  8652. tcase << TestAction.new(:Wait_Sent_Confirmation) do
  8653. $sentMMS = RUIObject.new.with('objectid', -1223562103).with('selfid', 893316915).with('textdescid', 1281233763).with('uniqueparentid', 807778548)
  8654. .with('uitreeindex', 4)
  8655. .with('classname', 'TextView')
  8656. .with('text', 'Now MMS')
  8657.  
  8658. $count = 0
  8659.  
  8660. while $sentMMS.isNotExist && $count < 30
  8661. waitsecond(1)
  8662. $count += 1
  8663. puts $count
  8664. end
  8665.  
  8666. waitsecond(2)
  8667. end
  8668.  
  8669. tcase << TestAction.new(:Sent_Confirmation) do
  8670. $ruiObj = RUIObject.new.with('objectid', -1223562103).with('selfid', 893316915).with('textdescid', 1281233763).with('uniqueparentid', 807778548)
  8671. .with('uitreeindex', 4)
  8672. .with('classname', 'TextView')
  8673. .with('text', 'Now MMS')
  8674.  
  8675. $ruiObj.isExist
  8676.  
  8677. waitsecond(0)
  8678. end
  8679.  
  8680. tcase << TestAction.new(:Test_Result) do
  8681. $myTestResult = checkLastExistResult
  8682.  
  8683. waitsecond(0)
  8684. end
  8685.  
  8686. tcase << TestAction.new(:Press_Back) do
  8687. pressBack
  8688.  
  8689. waitsecond(2)
  8690. end
  8691.  
  8692. tcase << TestAction.new(:Exit_Conversation) do
  8693. $ruiObj = RUIObject.new.with('objectid', 1425651979).with('selfid', -123872605).with('textdescid', 1768877749).with('uniqueparentid', -1261979652)
  8694. .with('uitreeindex', 9)
  8695. .with('classname', 'ImageButton')
  8696. .with('content-desc', 'Navigate up')
  8697.  
  8698. $ruiObj.click
  8699.  
  8700. waitsecond(2)
  8701. end
  8702.  
  8703. tcase << TestAction.new(:Select_Conversation) do
  8704. $ruiObj = RUIObject.new.with('objectid', 201599363).with('selfid', -373146860).with('textdescid', 648115097).with('uniqueparentid', 138155849)
  8705. .with('uitreeindex', 6)
  8706. .with('classname', 'TextView')
  8707. .with('resource-id', 'com.google.android.apps.messaging:id/conversation_name')
  8708. .with('text', 'A01 a01')
  8709.  
  8710. $ruiObj.longClick
  8711.  
  8712. waitsecond(2)
  8713. end
  8714.  
  8715. tcase << TestAction.new(:Delete_Conversation) do
  8716. $ruiObj = RUIObject.new.with('objectid', 1400187979).with('selfid', -1174101288).with('textdescid', -1369143488).with('uniqueparentid', 112203385)
  8717. .with('uitreeindex', 2)
  8718. .with('classname', 'TextView')
  8719. .with('resource-id', 'com.google.android.apps.messaging:id/action_delete')
  8720. .with('content-desc', 'Delete')
  8721.  
  8722. $ruiObj.click
  8723.  
  8724. waitsecond(2)
  8725. end
  8726.  
  8727. tcase << TestAction.new(:Confirm_Delete_Conversation) do
  8728. $ruiObj = RUIObject.new.with('objectid', -968538326).with('selfid', 982364851).with('textdescid', -2103192353).with('uniqueparentid', -1643928723).with('classresourceid', 1834539358)
  8729. .with('uitreeindex', 2)
  8730. .with('classname', 'Button')
  8731. .with('resource-id', 'android:id/button1')
  8732. .with('text', 'DELETE')
  8733.  
  8734. $ruiObj.click
  8735.  
  8736. waitsecond(2)
  8737. end
  8738.  
  8739. tcase << TestAction.new(:LogStop) do
  8740. logStopTest('Messaging_5_1_2_6')
  8741.  
  8742. waitsecond(0)
  8743. end
  8744.  
  8745. tcase << TestAction.new(:Press_Back_1) do
  8746. pressBack
  8747. waitsecond(1)
  8748. pressBack
  8749.  
  8750. waitsecond(2)
  8751. end
  8752.  
  8753. tcase.run(loopTime)
  8754.  
  8755. end
  8756.  
  8757. def self.exception_handler
  8758. puts "Module Exception Hanlder..."
  8759. end
  8760.  
  8761. def self.run(loop)
  8762. mainLoop loop
  8763. end
  8764.  
  8765. end
  8766.  
  8767. $exceptionPackageNameList = []
  8768. $exceptionPackageNameList_exclude = []
  8769.  
  8770. def exception_handler
  8771. SNOWBIRD_MTBF.exception_handler
  8772. end
  8773.  
  8774. $curProjectLogFile = $useLastLogFile
  8775.  
  8776. $curProjectLogFile = "SNOWBIRD_MTBF_#{getTimeStamp}.log" if $useLastLogFile.nil?
  8777.  
  8778. $useLastLogFile = nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement