Advertisement
Guest User

Untitled

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