Advertisement
Guest User

Untitled

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