Advertisement
Guest User

Untitled

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