Advertisement
Guest User

Untitled

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