Advertisement
Guest User

Untitled

a guest
May 26th, 2017
620
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 228.85 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_BtnDecline_4) do
  4124. $ruiObj = RUIObject.new.with('objectid', -1378300942).with('selfid', -1214082401).with('textdescid', -2120989690).with('uniqueparentid', -1218539231)
  4125. .with('uitreeindex', 12)
  4126. .with('classname', 'Button')
  4127. .with('resource-id', 'com.google.android.music:id/btn_decline')
  4128. .with('text', 'NO THANKS')
  4129.  
  4130. $ruiObj.click
  4131.  
  4132. waitsecond(2)
  4133. end
  4134.  
  4135. tcase << TestAction.new(:Button_Button0_2_1) do
  4136. $ruiObj = RUIObject.new.with('objectid', 1772672623).with('selfid', 1844568236).with('textdescid', 743697808).with('uniqueparentid', -1971983066)
  4137. .with('uitreeindex', 4)
  4138. .with('classname', 'Button')
  4139. .with('resource-id', 'com.google.android.music:id/button_0')
  4140. .with('text', 'SKIP')
  4141.  
  4142. $ruiObj.click
  4143.  
  4144. waitsecond(2)
  4145. end
  4146.  
  4147. tcase << TestAction.new(:ImageView_NavigationButton_6) do
  4148. $ruiObj = RUIObject.new.with('objectid', -1390467816).with('selfid', -959574335).with('textdescid', 2119483842).with('uniqueparentid', 672315111)
  4149. .with('uitreeindex', 0)
  4150. .with('classname', 'ImageView')
  4151. .with('resource-id', 'com.google.android.music:id/navigation_button')
  4152. .with('content-desc', 'Show navigation drawer')
  4153.  
  4154. $ruiObj.isExist
  4155.  
  4156. waitsecond(2)
  4157. end
  4158.  
  4159. tcase << TestAction.new(:logstop) do
  4160. $myTestResult = checkLastExistResult
  4161.  
  4162. if $myTestResult == false
  4163. $myFailReason == "Video Streaming does not work"
  4164. end
  4165. logStopTest("05_01_07_11_MultiMedia")
  4166.  
  4167.  
  4168. waitsecond(0)
  4169. end
  4170.  
  4171. tcase << TestAction.new(:pressBack_9) do
  4172. pressBack
  4173.  
  4174. waitsecond(0)
  4175. end
  4176.  
  4177. tcase << TestAction.new(:pressBack_10) do
  4178. pressBack
  4179.  
  4180. waitsecond(0)
  4181. end
  4182.  
  4183. tcase << TestAction.new(:pressHome_11) do
  4184. pressHome
  4185.  
  4186. waitsecond(0)
  4187. end
  4188.  
  4189. tcase << TestAction.new(:ImageButton_Show_1) do
  4190. $ruiObj = RUIObject.new.with('objectid', -16821482).with('selfid', -167844295).with('textdescid', 296856964).with('uniqueparentid', 1467430507)
  4191. .with('uitreeindex', 6)
  4192. .with('classname', 'ImageButton')
  4193. .with('content-desc', 'Show navigation drawer')
  4194.  
  4195. $ruiObj.click
  4196.  
  4197. waitsecond(2)
  4198. end
  4199.  
  4200. tcase.run(loopTime)
  4201.  
  4202. end
  4203.  
  4204. def self.Multimedia_5_1_7_12(loopTime)
  4205.  
  4206. tcase = TestCase.new("Multimedia_5_1_7_12")
  4207.  
  4208. tcase << TestAction.new(:logstart) do
  4209. logStartTest("05_01_07_12_MultiMedia")
  4210.  
  4211. waitsecond(0)
  4212. end
  4213.  
  4214. tcase << TestAction.new(:gotoplaymusic) do
  4215. gotoAppPixel("Play Music")
  4216.  
  4217. waitsecond(2)
  4218. end
  4219.  
  4220. tcase << TestAction.new(:Button_BtnDecline_4) do
  4221. $ruiObj = RUIObject.new.with('objectid', -1378300942).with('selfid', -1214082401).with('textdescid', -2120989690).with('uniqueparentid', -1218539231)
  4222. .with('uitreeindex', 12)
  4223. .with('classname', 'Button')
  4224. .with('resource-id', 'com.google.android.music:id/btn_decline')
  4225. .with('text', 'NO THANKS')
  4226.  
  4227. $ruiObj.click
  4228.  
  4229. waitsecond(2)
  4230. end
  4231.  
  4232. tcase << TestAction.new(:clicknavigationdrawer) do
  4233. $ruiObj = RUIObject.new.with('objectid', -1390467816).with('selfid', -959574335).with('textdescid', 2119483842).with('uniqueparentid', 672315111)
  4234. .with('uitreeindex', 0)
  4235. .with('classname', 'ImageView')
  4236. .with('resource-id', 'com.google.android.music:id/navigation_button')
  4237. .with('content-desc', 'Show navigation drawer')
  4238.  
  4239. $ruiObj.click
  4240.  
  4241. waitsecond(2)
  4242. end
  4243.  
  4244. tcase << TestAction.new(:musiclibrary) do
  4245. $ruiObj = RUIObject.new.with('objectid', 1337918942).with('selfid', -404350322).with('textdescid', -1209707262).with('uniqueparentid', 1865643829).with('classresourceid', -938935918)
  4246. .with('uitreeindex', 34)
  4247. .with('classname', 'TextView')
  4248. .with('text', 'Music library')
  4249.  
  4250. $ruiObj.click
  4251.  
  4252. waitsecond(2)
  4253. end
  4254.  
  4255. tcase << TestAction.new(:artist) do
  4256. $ruiObj = RUIObject.new.with('objectid', -741226326).with('selfid', -2050395810).with('textdescid', -294625686).with('uniqueparentid', -1232442324)
  4257. .with('uitreeindex', 5)
  4258. .with('classname', 'TextView')
  4259. .with('resource-id', 'com.google.android.music:id/title')
  4260. .with('text', 'ARTISTS')
  4261.  
  4262. $ruiObj.click
  4263.  
  4264. waitsecond(2)
  4265. end
  4266.  
  4267. tcase << TestAction.new(:clickthumbnail) do
  4268. $ruiObj = RUIObject.new.with('objectid', -146398081).with('selfid', -538001520).with('textdescid', -243373183).with('uniqueparentid', 1810546890).with('classresourceid', -1418125814)
  4269. .with('uitreeindex', 9)
  4270. .with('pretext', 'GENRES')
  4271. .with('classname', 'ImageView')
  4272. .with('resource-id', 'com.google.android.music:id/li_thumbnail_frame')
  4273.  
  4274. $ruiObj.click
  4275.  
  4276. waitsecond(2)
  4277. end
  4278.  
  4279. tcase << TestAction.new(:clickanotherthumnail) do
  4280. $ruiObj = RUIObject.new.with('objectid', 585237187).with('selfid', -538001520).with('textdescid', 962483645).with('uniqueparentid', 484936402)
  4281. .with('uitreeindex', 7)
  4282. .with('pretext', 'In my library')
  4283. .with('classname', 'ImageView')
  4284. .with('resource-id', 'com.google.android.music:id/li_thumbnail_frame')
  4285.  
  4286. $ruiObj.click
  4287.  
  4288. waitsecond(3)
  4289. end
  4290.  
  4291. tcase << TestAction.new(:clickplay) do
  4292. $ruiObj = RUIObject.new.with('objectid', 1267180639).with('selfid', -562829957).with('textdescid', -145594059).with('uniqueparentid', -1431364792).with('classresourceid', 554110641)
  4293. .with('uitreeindex', 8)
  4294. .with('classname', 'ImageButton')
  4295. .with('resource-id', 'com.google.android.music:id/fab_play')
  4296. .with('content-desc', 'Play')
  4297.  
  4298. $ruiObj.click
  4299.  
  4300. waitsecond(2)
  4301. end
  4302.  
  4303. tcase << TestAction.new(:wait12second_8) do
  4304. waitsecond(12)
  4305. end
  4306.  
  4307. tcase << TestAction.new(:pausebuttonexist) do
  4308. $ruiObj = RUIObject.new.with('objectid', 1487562708).with('selfid', 2054656518).with('textdescid', -1874588662).with('uniqueparentid', -317697394)
  4309. .with('uitreeindex', 34)
  4310. .with('classname', 'ImageButton')
  4311. .with('resource-id', 'com.google.android.music:id/play_pause_header')
  4312. .with('content-desc', 'Pause')
  4313.  
  4314. $ruiObj.isExist
  4315.  
  4316. waitsecond(2)
  4317. end
  4318.  
  4319. tcase << TestAction.new(:clickpausebutton) 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.click
  4327.  
  4328. waitsecond(3)
  4329. end
  4330.  
  4331. tcase << TestAction.new(:logstop) do
  4332. $myTestResult = checkLastExistResult
  4333.  
  4334. if $myTestResult == false
  4335. $myFailReason == "Music is not playing"
  4336. end
  4337. logStopTest("05_01_07_12_MultiMedia")
  4338.  
  4339.  
  4340. waitsecond(0)
  4341. end
  4342.  
  4343. tcase << TestAction.new(:goback) do
  4344. $ruiObj = RUIObject.new.with('objectid', -16821482).with('selfid', -123872605).with('textdescid', -2129880704).with('uniqueparentid', -272094647)
  4345. .with('uitreeindex', 0)
  4346. .with('classname', 'ImageButton')
  4347. .with('content-desc', 'Navigate up')
  4348.  
  4349. $ruiObj.click
  4350.  
  4351. waitsecond(2)
  4352. end
  4353.  
  4354. tcase << TestAction.new(:goback_1) do
  4355. $ruiObj = RUIObject.new.with('objectid', -16821482).with('selfid', -123872605).with('textdescid', -2129880704).with('uniqueparentid', -272094647)
  4356. .with('uitreeindex', 0)
  4357. .with('classname', 'ImageButton')
  4358. .with('content-desc', 'Navigate up')
  4359.  
  4360. $ruiObj.click
  4361.  
  4362. waitsecond(2)
  4363. end
  4364.  
  4365. tcase << TestAction.new(:gotomenunav) do
  4366. $ruiObj = RUIObject.new.with('objectid', -16821482).with('selfid', -167844295).with('textdescid', 296856964).with('uniqueparentid', 1467430507)
  4367. .with('uitreeindex', 6)
  4368. .with('classname', 'ImageButton')
  4369. .with('content-desc', 'Show navigation drawer')
  4370.  
  4371. $ruiObj.click
  4372.  
  4373. waitsecond(2)
  4374. end
  4375.  
  4376. tcase << TestAction.new(:gotohome) do
  4377. $ruiObj = RUIObject.new.with('objectid', 1337918942).with('selfid', 591713361).with('textdescid', -569085377).with('uniqueparentid', 1865643829).with('classresourceid', -938935918)
  4378. .with('uitreeindex', 27)
  4379. .with('classname', 'TextView')
  4380. .with('text', 'Home')
  4381.  
  4382. $ruiObj.click
  4383.  
  4384. waitsecond(2)
  4385. end
  4386.  
  4387. tcase << TestAction.new(:pressBack_9) do
  4388. pressBack
  4389.  
  4390. waitsecond(0)
  4391. end
  4392.  
  4393. tcase << TestAction.new(:pressBack_10) do
  4394. pressBack
  4395.  
  4396. waitsecond(0)
  4397. end
  4398.  
  4399. tcase << TestAction.new(:pressHome_11) do
  4400. pressHome
  4401.  
  4402. waitsecond(0)
  4403. end
  4404.  
  4405. tcase << TestAction.new(:swipenotificationbar) do
  4406. swipe(729,31.5,774,1500.5,100)
  4407.  
  4408. waitsecond(2)
  4409. end
  4410.  
  4411. tcase << TestAction.new(:swiperight) do
  4412. swipe(1102.5,679,100,679.5,100)
  4413.  
  4414. waitsecond(2)
  4415. end
  4416.  
  4417. tcase << TestAction.new(:pressHome_1) do
  4418. pressHome
  4419.  
  4420. waitsecond(2)
  4421. end
  4422.  
  4423. tcase.run(loopTime)
  4424.  
  4425. end
  4426.  
  4427. def self.Multimedia_5_1_7_13(loopTime)
  4428.  
  4429. tcase = TestCase.new("Multimedia_5_1_7_13")
  4430.  
  4431. tcase << TestAction.new(:logstart) do
  4432. logStartTest("05_01_07_13_MultiMedia")
  4433.  
  4434. waitsecond(0)
  4435. end
  4436.  
  4437. tcase << TestAction.new(:gotoplaymusic) do
  4438. gotoAppPixel("Play Music")
  4439.  
  4440. waitsecond(2)
  4441. end
  4442.  
  4443. tcase << TestAction.new(:Button_BtnDecline_4) do
  4444. $ruiObj = RUIObject.new.with('objectid', -1378300942).with('selfid', -1214082401).with('textdescid', -2120989690).with('uniqueparentid', -1218539231)
  4445. .with('uitreeindex', 12)
  4446. .with('classname', 'Button')
  4447. .with('resource-id', 'com.google.android.music:id/btn_decline')
  4448. .with('text', 'NO THANKS')
  4449.  
  4450. $ruiObj.click
  4451.  
  4452. waitsecond(2)
  4453. end
  4454.  
  4455. tcase << TestAction.new(:pressBack_9) do
  4456. pressBack
  4457.  
  4458. waitsecond(0)
  4459. end
  4460.  
  4461. tcase << TestAction.new(:pressBack_10) do
  4462. pressBack
  4463.  
  4464. waitsecond(0)
  4465. end
  4466.  
  4467. tcase << TestAction.new(:pressHome_11) do
  4468. pressHome
  4469.  
  4470. waitsecond(0)
  4471. end
  4472.  
  4473. tcase << TestAction.new(:swipenotificationbar) do
  4474. swipe(729,31.5,774,1500.5,100)
  4475.  
  4476. waitsecond(2)
  4477. end
  4478.  
  4479. tcase << TestAction.new(:pause) do
  4480. $ruiObj = RUIObject.new.with('objectid', 882076620).with('selfid', -1186380024).with('textdescid', -490366974).with('uniqueparentid', 1841961189).with('classresourceid', -343477762)
  4481. .with('uitreeindex', 18)
  4482. .with('classname', 'ImageButton')
  4483. .with('resource-id', 'android:id/action0')
  4484. .with('content-desc', 'Pause')
  4485.  
  4486. $ruiObj.isExist
  4487.  
  4488. waitsecond(3)
  4489. end
  4490.  
  4491. tcase << TestAction.new(:logstop_1) do
  4492. $myTestResult = !checkLastExistResult
  4493.  
  4494. if $myTestResult == false
  4495. $myFailReason == "Music is not closing."
  4496. end
  4497. logStopTest("05_01_07_13_MultiMedia")
  4498.  
  4499.  
  4500. waitsecond(0)
  4501. end
  4502.  
  4503. tcase << TestAction.new(:pressHome_1) do
  4504. pressHome
  4505.  
  4506. waitsecond(2)
  4507. end
  4508.  
  4509. tcase.run(loopTime)
  4510.  
  4511. end
  4512.  
  4513. def self.Multimedia_5_1_7_14(loopTime)
  4514.  
  4515. tcase = TestCase.new("Multimedia_5_1_7_14")
  4516.  
  4517. tcase << TestAction.new(:logstart) do
  4518. logStartTest("05_01_07_14_MultiMedia")
  4519.  
  4520. waitsecond(0)
  4521. end
  4522.  
  4523. tcase << TestAction.new(:gotosettings) do
  4524. gotoAppPixel("Settings")
  4525.  
  4526. waitsecond(2)
  4527. end
  4528.  
  4529. tcase << TestAction.new(:clickdisplay) do
  4530. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', -1901343455).with('textdescid', 1460376455).with('uniqueparentid', -349226723)
  4531. .with('uitreeindex', 22)
  4532. .with('classname', 'TextView')
  4533. .with('resource-id', 'android:id/title')
  4534. .with('text', 'Display')
  4535.  
  4536. $ruiObj.click
  4537.  
  4538. waitsecond(2)
  4539. end
  4540.  
  4541. tcase << TestAction.new(:advancedSettings) do
  4542. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', 183975843).with('textdescid', -1659217645).with('uniqueparentid', -512886282)
  4543. .with('uitreeindex', 13)
  4544. .with('classname', 'TextView')
  4545. .with('resource-id', 'android:id/title')
  4546. .with('text', 'Advanced')
  4547.  
  4548. $ruiObj.click
  4549.  
  4550. waitsecond(2)
  4551. end
  4552.  
  4553. tcase << TestAction.new(:swipeDown_6) do
  4554. swipe_vertical 500
  4555.  
  4556. waitsecond(2)
  4557. end
  4558.  
  4559. tcase << TestAction.new(:clicktheme) do
  4560. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', 80297600).with('textdescid', 722414294).with('uniqueparentid', 818307449)
  4561. .with('uitreeindex', 20)
  4562. .with('classname', 'TextView')
  4563. .with('resource-id', 'android:id/title')
  4564. .with('text', 'Device theme')
  4565.  
  4566. $ruiObj.click
  4567.  
  4568. waitsecond(2)
  4569. end
  4570.  
  4571. tcase << TestAction.new(:changetodark) do
  4572. $ruiObj = RUIObject.new.with('objectid', 374337900).with('selfid', -102657974).with('textdescid', 679433110).with('uniqueparentid', -290305997).with('classresourceid', 2074814108)
  4573. .with('uitreeindex', 4)
  4574. .with('classname', 'CheckedTextView')
  4575. .with('resource-id', 'android:id/text1')
  4576. .with('text', 'Dark')
  4577.  
  4578. $ruiObj.click
  4579.  
  4580. waitsecond(2)
  4581. end
  4582.  
  4583. tcase << TestAction.new(:clicktheme_1) do
  4584. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', 80297600).with('textdescid', 722414294).with('uniqueparentid', 818307449)
  4585. .with('uitreeindex', 20)
  4586. .with('classname', 'TextView')
  4587. .with('resource-id', 'android:id/title')
  4588. .with('text', 'Device theme')
  4589.  
  4590. $ruiObj.click
  4591.  
  4592. waitsecond(2)
  4593. end
  4594.  
  4595. tcase << TestAction.new(:changetoinverted) do
  4596. $ruiObj = RUIObject.new.with('objectid', 374337900).with('selfid', -797465143).with('textdescid', 1689955831).with('uniqueparentid', -290305997).with('classresourceid', 2074814108)
  4597. .with('uitreeindex', 3)
  4598. .with('classname', 'CheckedTextView')
  4599. .with('resource-id', 'android:id/text1')
  4600. .with('text', 'Inverted')
  4601.  
  4602. $ruiObj.click
  4603.  
  4604. waitsecond(2)
  4605. end
  4606.  
  4607. tcase << TestAction.new(:clicktheme_2) do
  4608. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', 80297600).with('textdescid', 722414294).with('uniqueparentid', 1677638763)
  4609. .with('uitreeindex', 20)
  4610. .with('classname', 'TextView')
  4611. .with('resource-id', 'android:id/title')
  4612. .with('text', 'Device theme')
  4613.  
  4614. $ruiObj.click
  4615.  
  4616. waitsecond(2)
  4617. end
  4618.  
  4619. tcase << TestAction.new(:clickPixel) do
  4620. $ruiObj = RUIObject.new.with('objectid', 374337900).with('selfid', 1123896370).with('textdescid', -61296722).with('uniqueparentid', -290305997).with('classresourceid', 2074814108)
  4621. .with('uitreeindex', 2)
  4622. .with('classname', 'CheckedTextView')
  4623. .with('resource-id', 'android:id/text1')
  4624. .with('text', 'Pixel')
  4625.  
  4626. $ruiObj.click
  4627.  
  4628. waitsecond(2)
  4629. end
  4630.  
  4631. tcase << TestAction.new(:Displayisexist) do
  4632. $ruiObj = RUIObject.new.with('objectid', 765775369).with('selfid', 1766108176).with('textdescid', 937308149).with('uniqueparentid', 1015447283)
  4633. .with('uitreeindex', 1)
  4634. .with('classname', 'TextView')
  4635. .with('text', 'Display')
  4636.  
  4637. $ruiObj.isExist
  4638.  
  4639. waitsecond(2)
  4640. end
  4641.  
  4642. tcase << TestAction.new(:logstop) do
  4643. $myTestResult = checkLastExistResult
  4644.  
  4645. if $myTestResult == false
  4646. $myFailReason == "Theme change not working"
  4647. end
  4648. logStopTest("05_01_07_14_MultiMedia")
  4649.  
  4650.  
  4651. waitsecond(0)
  4652. end
  4653.  
  4654. tcase << TestAction.new(:pressBack_19) do
  4655. pressBack
  4656.  
  4657. waitsecond(0)
  4658. end
  4659.  
  4660. tcase << TestAction.new(:pressBack_20) do
  4661. pressBack
  4662.  
  4663. waitsecond(0)
  4664. end
  4665.  
  4666. tcase << TestAction.new(:pressHome_22) do
  4667. pressHome
  4668.  
  4669. waitsecond(0)
  4670. end
  4671.  
  4672. tcase.run(loopTime)
  4673.  
  4674. end
  4675.  
  4676. def self.Multimedia_5_1_7_5(loopTime)
  4677.  
  4678. tcase = TestCase.new("Multimedia_5_1_7_5")
  4679.  
  4680. tcase << TestAction.new(:logstart) do
  4681. logStartTest("05_01_07_05_MultiMedia")
  4682.  
  4683. waitsecond(0)
  4684. end
  4685.  
  4686. tcase << TestAction.new(:gotoGallery) do
  4687. gotoAppPixel("Photos")
  4688.  
  4689. waitsecond(2)
  4690. end
  4691.  
  4692. tcase << TestAction.new(:clickmostcurrentphoto) do
  4693. $ruiObj = RUIObject.new.with('objectid', -740392950).with('selfid', -155877827).with('textdescid', 1337650749).with('uniqueparentid', -720638774)
  4694. .with('uitreeindex', 1)
  4695. .with('pretext', 'Camera')
  4696. .with('classname', 'android.view.ViewGroup')
  4697. .with('content-desc', 'Photo taken on May 10, 2017 8:55:20 PM.')
  4698.  
  4699. $ruiObj.click
  4700.  
  4701. waitsecond(2)
  4702. end
  4703.  
  4704. tcase << TestAction.new(:ifsharebuttonexist) do
  4705. $ruiObj = RUIObject.new.with('objectid', -1982964278).with('selfid', 1056003612).with('textdescid', 1336202944).with('uniqueparentid', 1291383994)
  4706. .with('uitreeindex', 6)
  4707. .with('classname', 'ImageView')
  4708. .with('resource-id', 'com.google.android.apps.photos:id/edit')
  4709. .with('content-desc', 'Edit')
  4710.  
  4711. $ruiObj.isExist
  4712.  
  4713. waitsecond(0)
  4714. end
  4715.  
  4716. tcase << TestAction.new(:logstop) do
  4717. $myTestResult = checkLastExistResult
  4718. if $myTestResult == false
  4719. $myFailReason == "Take picture FAILED"
  4720. end
  4721. logStopTest("05_01_07_05_MultiMedia")
  4722.  
  4723.  
  4724. waitsecond(0)
  4725. end
  4726.  
  4727. tcase << TestAction.new(:pressBack_7) do
  4728. pressBack
  4729.  
  4730. waitsecond(0)
  4731. end
  4732.  
  4733. tcase << TestAction.new(:pressBack_8) do
  4734. pressBack
  4735.  
  4736. waitsecond(0)
  4737. end
  4738.  
  4739. tcase << TestAction.new(:pressHome_8) do
  4740. pressHome
  4741.  
  4742. waitsecond(0)
  4743. end
  4744.  
  4745. tcase.run(loopTime)
  4746.  
  4747. end
  4748.  
  4749. def self.Multimedia_5_1_7_6(loopTime)
  4750.  
  4751. tcase = TestCase.new("Multimedia_5_1_7_6")
  4752.  
  4753. tcase << TestAction.new(:logstart) do
  4754. logStartTest("05_01_07_06_MultiMedia")
  4755.  
  4756. waitsecond(0)
  4757. end
  4758.  
  4759. tcase << TestAction.new(:gotoGallery) do
  4760. gotoAppPixel("Photos")
  4761.  
  4762. waitsecond(2)
  4763. end
  4764.  
  4765. tcase << TestAction.new(:clickmostrecentfile) do
  4766. click(184.5,648)
  4767.  
  4768. waitsecond(2)
  4769. end
  4770.  
  4771. tcase << TestAction.new(:deletebuttonexist) do
  4772. $ruiObj = RUIObject.new.with('objectid', -1328088200).with('selfid', 1434121712).with('textdescid', 864436336).with('uniqueparentid', -2095656440)
  4773. .with('uitreeindex', 7)
  4774. .with('classname', 'ImageView')
  4775. .with('resource-id', 'com.google.android.apps.photos:id/trash')
  4776. .with('content-desc', 'Trash')
  4777.  
  4778. $ruiObj.isExist
  4779.  
  4780. waitsecond(0)
  4781. end
  4782.  
  4783. tcase << TestAction.new(:deletethepicture) do
  4784. $ruiObj = RUIObject.new.with('objectid', -1328088200).with('selfid', 1434121712).with('textdescid', 864436336).with('uniqueparentid', -2095656440)
  4785. .with('uitreeindex', 8)
  4786. .with('classname', 'ImageView')
  4787. .with('resource-id', 'com.google.android.apps.photos:id/trash')
  4788. .with('content-desc', 'Trash')
  4789.  
  4790. $ruiObj.click
  4791.  
  4792. waitsecond(2)
  4793. end
  4794.  
  4795. tcase << TestAction.new(:logstop) do
  4796. $myTestResult = checkLastExistResult
  4797. if $myTestResult == false
  4798. $myFailReason == "Picture is not deleted."
  4799. end
  4800. logStopTest("05_01_07_06_MultiMedia")
  4801.  
  4802.  
  4803. waitsecond(2)
  4804. end
  4805.  
  4806. tcase << TestAction.new(:pressBack_7) do
  4807. pressBack
  4808.  
  4809. waitsecond(0)
  4810. end
  4811.  
  4812. tcase << TestAction.new(:pressBack_8) do
  4813. pressBack
  4814.  
  4815. waitsecond(0)
  4816. end
  4817.  
  4818. tcase << TestAction.new(:pressHome_8) do
  4819. pressHome
  4820.  
  4821. waitsecond(0)
  4822. end
  4823.  
  4824. tcase.run(loopTime)
  4825.  
  4826. end
  4827.  
  4828. def self.Multimedia_5_1_7_7(loopTime)
  4829.  
  4830. tcase = TestCase.new("Multimedia_5_1_7_7")
  4831.  
  4832. tcase << TestAction.new(:logstart) do
  4833. logStartTest("05_01_07_07_MultiMedia")
  4834.  
  4835. waitsecond(0)
  4836. end
  4837.  
  4838. tcase << TestAction.new(:gotomessages) do
  4839. gotoAppPixel("Messages")
  4840.  
  4841. waitsecond(2)
  4842. end
  4843.  
  4844. tcase << TestAction.new(:Startnewmessage) do
  4845. $ruiObj = RUIObject.new.with('objectid', 764419066).with('selfid', 916878134).with('textdescid', 48640071).with('uniqueparentid', 1408873138)
  4846. .with('uitreeindex', 6)
  4847. .with('classname', 'ImageView')
  4848. .with('resource-id', 'com.google.android.apps.messaging:id/start_new_conversation_button')
  4849. .with('content-desc', 'Start new conversation')
  4850.  
  4851. $ruiObj.click
  4852.  
  4853. waitsecond(2)
  4854. end
  4855.  
  4856. tcase << TestAction.new(:TextView_Skip_2) do
  4857. $ruiObj = RUIObject.new.with('objectid', 774774376).with('selfid', 692625717).with('textdescid', 125277897).with('uniqueparentid', 1739951846)
  4858. .with('uitreeindex', 3)
  4859. .with('classname', 'TextView')
  4860. .with('resource-id', 'com.google.android.apps.messaging:id/skip')
  4861. .with('text', 'SKIP')
  4862.  
  4863. $ruiObj.click
  4864.  
  4865. waitsecond(2)
  4866. end
  4867.  
  4868. tcase << TestAction.new(:TextView_Next_4) do
  4869. $ruiObj = RUIObject.new.with('objectid', 774620124).with('selfid', -737737443).with('textdescid', -1309712823).with('uniqueparentid', -1145423395)
  4870. .with('uitreeindex', 5)
  4871. .with('classname', 'TextView')
  4872. .with('resource-id', 'com.google.android.apps.messaging:id/next')
  4873. .with('text', 'NEXT')
  4874.  
  4875. $ruiObj.click
  4876.  
  4877. waitsecond(2)
  4878. end
  4879.  
  4880. tcase << TestAction.new(:Button_PermissionAllowButton_6) do
  4881. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  4882. .with('uitreeindex', 4)
  4883. .with('classname', 'Button')
  4884. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  4885. .with('text', 'ALLOW')
  4886.  
  4887. $ruiObj.click
  4888.  
  4889. waitsecond(2)
  4890. end
  4891.  
  4892. tcase << TestAction.new(:Button_PermissionAllowButton_8) do
  4893. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  4894. .with('uitreeindex', 4)
  4895. .with('classname', 'Button')
  4896. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  4897. .with('text', 'ALLOW')
  4898.  
  4899. $ruiObj.click
  4900.  
  4901. waitsecond(2)
  4902. end
  4903.  
  4904. tcase << TestAction.new(:Button_PermissionAllowButton_10) do
  4905. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  4906. .with('uitreeindex', 2)
  4907. .with('classname', 'Button')
  4908. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  4909. .with('text', 'ALLOW')
  4910.  
  4911. $ruiObj.click
  4912.  
  4913. waitsecond(2)
  4914. end
  4915.  
  4916. tcase << TestAction.new(:put_recipientnumber) do
  4917. $ruiObj = RUIObject.new.with('objectid', -1173212947).with('selfid', 1163803387).with('textdescid', -2009862957).with('uniqueparentid', 955347666).with('classresourceid', 461007471)
  4918. .with('uitreeindex', 1)
  4919. .with('classname', 'MultiAutoCompleteTextView')
  4920. .with('resource-id', 'com.google.android.apps.messaging:id/recipient_text_view')
  4921.  
  4922. $ruiObj.inputtext('A01 a01')
  4923.  
  4924. waitsecond(2)
  4925. end
  4926.  
  4927. tcase << TestAction.new(:nextwindow) do
  4928. click(1354.5,2605.5)
  4929.  
  4930. waitsecond(2)
  4931. end
  4932.  
  4933. tcase << TestAction.new(:gotooption) do
  4934. $ruiObj = RUIObject.new.with('objectid', -1360420814).with('selfid', -952088716).with('textdescid', 1847611113).with('uniqueparentid', 1251875640)
  4935. .with('uitreeindex', 7)
  4936. .with('classname', 'ImageButton')
  4937. .with('resource-id', 'com.google.android.apps.messaging:id/attach_media_button')
  4938. .with('content-desc', 'Add an attachment')
  4939.  
  4940. $ruiObj.click
  4941.  
  4942. waitsecond(2)
  4943. end
  4944.  
  4945. tcase << TestAction.new(:changetorecordoption) do
  4946. $ruiObj = RUIObject.new.with('objectid', 1408822083).with('selfid', -645200276).with('textdescid', -334363612).with('uniqueparentid', -1874692983)
  4947. .with('uitreeindex', 28)
  4948. .with('classname', 'ImageButton')
  4949. .with('content-desc', 'Record audio')
  4950.  
  4951. $ruiObj.click
  4952.  
  4953. waitsecond(2)
  4954. end
  4955.  
  4956. tcase << TestAction.new(:clickallow) do
  4957. $ruiObj = RUIObject.new.with('objectid', -655699299).with('selfid', -1852985786).with('textdescid', -1480420102).with('uniqueparentid', -1331106569)
  4958. .with('uitreeindex', 13)
  4959. .with('classname', 'TextView')
  4960. .with('resource-id', 'com.google.android.apps.messaging:id/missing_permission_enable')
  4961. .with('text', 'ALLOW')
  4962.  
  4963. $ruiObj.click
  4964.  
  4965. waitsecond(2)
  4966. end
  4967.  
  4968. tcase << TestAction.new(:clickPermissionAllowButton) do
  4969. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  4970. .with('uitreeindex', 3)
  4971. .with('classname', 'Button')
  4972. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  4973. .with('text', 'ALLOW')
  4974.  
  4975. $ruiObj.click
  4976.  
  4977. waitsecond(2)
  4978. end
  4979.  
  4980. tcase << TestAction.new(:record5secondsmessage) do
  4981. swipe(597, 2053, 842, 2298, 500)
  4982.  
  4983. waitsecond(2)
  4984. end
  4985.  
  4986. tcase << TestAction.new(:playbuttonexist) do
  4987. $ruiObj = RUIObject.new.with('objectid', 28335571).with('selfid', 801742907).with('textdescid', -1823989396).with('uniqueparentid', 1321193562)
  4988. .with('uitreeindex', 7)
  4989. .with('classname', 'ImageView')
  4990. .with('resource-id', 'com.google.android.apps.messaging:id/play_button')
  4991. .with('content-desc', 'Play audio attachment')
  4992.  
  4993. $ruiObj.isExist
  4994.  
  4995. waitsecond(0)
  4996. end
  4997.  
  4998. tcase << TestAction.new(:logstop) do
  4999. $myTestResult = checkLastExistResult
  5000. if $myTestResult == false
  5001. $myFailReason == "Message is not recorded"
  5002. end
  5003. logStopTest("05_01_07_07_MultiMedia")
  5004.  
  5005.  
  5006. waitsecond(0)
  5007. end
  5008.  
  5009. tcase << TestAction.new(:pressBack_34) do
  5010. pressBack
  5011.  
  5012. waitsecond(0)
  5013. end
  5014.  
  5015. tcase << TestAction.new(:pressBack_35) do
  5016. pressBack
  5017.  
  5018. waitsecond(0)
  5019. end
  5020.  
  5021. tcase << TestAction.new(:pressBack_36) do
  5022. pressBack
  5023.  
  5024. waitsecond(0)
  5025. end
  5026.  
  5027. tcase << TestAction.new(:pressHome_37) do
  5028. pressHome
  5029.  
  5030. waitsecond(0)
  5031. end
  5032.  
  5033. tcase.run(loopTime)
  5034.  
  5035. end
  5036.  
  5037. def self.Multimedia_5_1_7_8(loopTime)
  5038.  
  5039. tcase = TestCase.new("Multimedia_5_1_7_8")
  5040.  
  5041. tcase << TestAction.new(:logstart) do
  5042. logStartTest("05_01_07_08_MultiMedia")
  5043.  
  5044. waitsecond(0)
  5045. end
  5046.  
  5047. tcase << TestAction.new(:gotomessages) do
  5048. gotoAppPixel("Messages")
  5049.  
  5050. waitsecond(2)
  5051. end
  5052.  
  5053. tcase << TestAction.new(:Startnewmessage) do
  5054. $ruiObj = RUIObject.new.with('objectid', 764419066).with('selfid', 916878134).with('textdescid', 48640071).with('uniqueparentid', 1408873138)
  5055. .with('uitreeindex', 6)
  5056. .with('classname', 'ImageView')
  5057. .with('resource-id', 'com.google.android.apps.messaging:id/start_new_conversation_button')
  5058. .with('content-desc', 'Start new conversation')
  5059.  
  5060. $ruiObj.click
  5061.  
  5062. waitsecond(2)
  5063. end
  5064.  
  5065. tcase << TestAction.new(:put_recipientnumber) do
  5066. $ruiObj = RUIObject.new.with('objectid', -1173212947).with('selfid', 1163803387).with('textdescid', -2009862957).with('uniqueparentid', 955347666).with('classresourceid', 461007471)
  5067. .with('uitreeindex', 1)
  5068. .with('classname', 'MultiAutoCompleteTextView')
  5069. .with('resource-id', 'com.google.android.apps.messaging:id/recipient_text_view')
  5070.  
  5071. $ruiObj.inputtext('A01 a01')
  5072.  
  5073. waitsecond(2)
  5074. end
  5075.  
  5076. tcase << TestAction.new(:nextwindow) do
  5077. click(1354.5,2605.5)
  5078.  
  5079. waitsecond(2)
  5080. end
  5081.  
  5082. tcase << TestAction.new(:gotooption) do
  5083. $ruiObj = RUIObject.new.with('objectid', -1360420814).with('selfid', -952088716).with('textdescid', 1847611113).with('uniqueparentid', 1251875640)
  5084. .with('uitreeindex', 7)
  5085. .with('classname', 'ImageButton')
  5086. .with('resource-id', 'com.google.android.apps.messaging:id/attach_media_button')
  5087. .with('content-desc', 'Add an attachment')
  5088.  
  5089. $ruiObj.click
  5090.  
  5091. waitsecond(2)
  5092. end
  5093.  
  5094. tcase << TestAction.new(:changetorecordoption) do
  5095. $ruiObj = RUIObject.new.with('objectid', 1408822083).with('selfid', -645200276).with('textdescid', -334363612).with('uniqueparentid', -1874692983)
  5096. .with('uitreeindex', 28)
  5097. .with('classname', 'ImageButton')
  5098. .with('content-desc', 'Record audio')
  5099.  
  5100. $ruiObj.click
  5101.  
  5102. waitsecond(2)
  5103. end
  5104.  
  5105. tcase << TestAction.new(:clickallow) do
  5106. $ruiObj = RUIObject.new.with('objectid', -655699299).with('selfid', -1852985786).with('textdescid', -1480420102).with('uniqueparentid', -1331106569)
  5107. .with('uitreeindex', 13)
  5108. .with('classname', 'TextView')
  5109. .with('resource-id', 'com.google.android.apps.messaging:id/missing_permission_enable')
  5110. .with('text', 'ALLOW')
  5111.  
  5112. $ruiObj.click
  5113.  
  5114. waitsecond(2)
  5115. end
  5116.  
  5117. tcase << TestAction.new(:clickPermissionAllowButton) do
  5118. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  5119. .with('uitreeindex', 3)
  5120. .with('classname', 'Button')
  5121. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  5122. .with('text', 'ALLOW')
  5123.  
  5124. $ruiObj.click
  5125.  
  5126. waitsecond(2)
  5127. end
  5128.  
  5129. tcase << TestAction.new(:record5secondsmessage) do
  5130. swipe(597, 2053, 842, 2298, 500)
  5131.  
  5132. waitsecond(2)
  5133. end
  5134.  
  5135. tcase << TestAction.new(:playbuttonis_exist_1) do
  5136. $ruiObj = RUIObject.new.with('objectid', 28335571).with('selfid', 801742907).with('textdescid', -1823989396).with('uniqueparentid', 1321193562)
  5137. .with('uitreeindex', 7)
  5138. .with('classname', 'ImageView')
  5139. .with('resource-id', 'com.google.android.apps.messaging:id/play_button')
  5140. .with('content-desc', 'Play audio attachment')
  5141.  
  5142. $ruiObj.isExist
  5143.  
  5144. waitsecond(0)
  5145. end
  5146.  
  5147. tcase << TestAction.new(:playtherecord) do
  5148. $ruiObj = RUIObject.new.with('objectid', 28335571).with('selfid', 801742907).with('textdescid', -1823989396).with('uniqueparentid', 1321193562)
  5149. .with('uitreeindex', 7)
  5150. .with('classname', 'ImageView')
  5151. .with('resource-id', 'com.google.android.apps.messaging:id/play_button')
  5152. .with('content-desc', 'Play audio attachment')
  5153.  
  5154. $ruiObj.click
  5155.  
  5156. waitsecond(2)
  5157. end
  5158.  
  5159. tcase << TestAction.new(:logstop) do
  5160. $myTestResult = checkLastExistResult
  5161. if $myTestResult == false
  5162. $myFailReason == "Record is not played"
  5163. end
  5164. logStopTest("05_01_07_08_MultiMedia")
  5165.  
  5166.  
  5167. waitsecond(0)
  5168. end
  5169.  
  5170. tcase << TestAction.new(:pressBack_34) do
  5171. pressBack
  5172.  
  5173. waitsecond(0)
  5174. end
  5175.  
  5176. tcase << TestAction.new(:pressBack_35) do
  5177. pressBack
  5178.  
  5179. waitsecond(0)
  5180. end
  5181.  
  5182. tcase << TestAction.new(:pressBack_36) do
  5183. pressBack
  5184.  
  5185. waitsecond(0)
  5186. end
  5187.  
  5188. tcase << TestAction.new(:pressHome_37) do
  5189. pressHome
  5190.  
  5191. waitsecond(0)
  5192. end
  5193.  
  5194. tcase.run(loopTime)
  5195.  
  5196. end
  5197.  
  5198. def self.Multimedia_5_1_7_9(loopTime)
  5199.  
  5200. tcase = TestCase.new("Multimedia_5_1_7_9")
  5201.  
  5202. tcase << TestAction.new(:logstart) do
  5203. logStartTest("05_01_07_09_MultiMedia")
  5204.  
  5205. waitsecond(0)
  5206. end
  5207.  
  5208. tcase << TestAction.new(:gotomessages) do
  5209. gotoAppPixel("Messages")
  5210.  
  5211. waitsecond(2)
  5212. end
  5213.  
  5214. tcase << TestAction.new(:Startnewmessage) do
  5215. $ruiObj = RUIObject.new.with('objectid', 764419066).with('selfid', 916878134).with('textdescid', 48640071).with('uniqueparentid', 1408873138)
  5216. .with('uitreeindex', 6)
  5217. .with('classname', 'ImageView')
  5218. .with('resource-id', 'com.google.android.apps.messaging:id/start_new_conversation_button')
  5219. .with('content-desc', 'Start new conversation')
  5220.  
  5221. $ruiObj.click
  5222.  
  5223. waitsecond(2)
  5224. end
  5225.  
  5226. tcase << TestAction.new(:put_recipientnumber) do
  5227. $ruiObj = RUIObject.new.with('objectid', -1173212947).with('selfid', 1163803387).with('textdescid', -2009862957).with('uniqueparentid', 955347666).with('classresourceid', 461007471)
  5228. .with('uitreeindex', 1)
  5229. .with('classname', 'MultiAutoCompleteTextView')
  5230. .with('resource-id', 'com.google.android.apps.messaging:id/recipient_text_view')
  5231.  
  5232. $ruiObj.inputtext('A01 a01')
  5233.  
  5234. waitsecond(2)
  5235. end
  5236.  
  5237. tcase << TestAction.new(:nextwindow) do
  5238. click(1354.5,2605.5)
  5239.  
  5240. waitsecond(2)
  5241. end
  5242.  
  5243. tcase << TestAction.new(:gotooption) do
  5244. $ruiObj = RUIObject.new.with('objectid', -1360420814).with('selfid', -952088716).with('textdescid', 1847611113).with('uniqueparentid', 1251875640)
  5245. .with('uitreeindex', 7)
  5246. .with('classname', 'ImageButton')
  5247. .with('resource-id', 'com.google.android.apps.messaging:id/attach_media_button')
  5248. .with('content-desc', 'Add an attachment')
  5249.  
  5250. $ruiObj.click
  5251.  
  5252. waitsecond(2)
  5253. end
  5254.  
  5255. tcase << TestAction.new(:changetorecordoption) do
  5256. $ruiObj = RUIObject.new.with('objectid', 1408822083).with('selfid', -645200276).with('textdescid', -334363612).with('uniqueparentid', -1874692983)
  5257. .with('uitreeindex', 28)
  5258. .with('classname', 'ImageButton')
  5259. .with('content-desc', 'Record audio')
  5260.  
  5261. $ruiObj.click
  5262.  
  5263. waitsecond(2)
  5264. end
  5265.  
  5266. tcase << TestAction.new(:clickallow) do
  5267. $ruiObj = RUIObject.new.with('objectid', -655699299).with('selfid', -1852985786).with('textdescid', -1480420102).with('uniqueparentid', -1331106569)
  5268. .with('uitreeindex', 13)
  5269. .with('classname', 'TextView')
  5270. .with('resource-id', 'com.google.android.apps.messaging:id/missing_permission_enable')
  5271. .with('text', 'ALLOW')
  5272.  
  5273. $ruiObj.click
  5274.  
  5275. waitsecond(2)
  5276. end
  5277.  
  5278. tcase << TestAction.new(:clickPermissionAllowButton) do
  5279. $ruiObj = RUIObject.new.with('objectid', 153379926).with('selfid', 1443382411).with('textdescid', 294474017).with('uniqueparentid', 725356101).with('classresourceid', -227364920)
  5280. .with('uitreeindex', 3)
  5281. .with('classname', 'Button')
  5282. .with('resource-id', 'com.android.packageinstaller:id/permission_allow_button')
  5283. .with('text', 'ALLOW')
  5284.  
  5285. $ruiObj.click
  5286.  
  5287. waitsecond(2)
  5288. end
  5289.  
  5290. tcase << TestAction.new(:record5secondsmessage) do
  5291. swipe(597, 2053, 842, 2298, 500)
  5292.  
  5293. waitsecond(2)
  5294. end
  5295.  
  5296. tcase << TestAction.new(:ImageButton_CloseButton_3) do
  5297. $ruiObj = RUIObject.new.with('objectid', -8145267).with('selfid', -966281882).with('textdescid', 812421240).with('uniqueparentid', 108696351)
  5298. .with('uitreeindex', 8)
  5299. .with('classname', 'ImageButton')
  5300. .with('resource-id', 'com.google.android.apps.messaging:id/close_button')
  5301. .with('content-desc', 'Discard attachment')
  5302.  
  5303. $ruiObj.click
  5304.  
  5305. waitsecond(2)
  5306. end
  5307.  
  5308. tcase << TestAction.new(:ImageButton_CloseButton_5) do
  5309. $ruiObj = RUIObject.new.with('objectid', -8145267).with('selfid', -966281882).with('textdescid', 812421240).with('uniqueparentid', 108696351)
  5310. .with('uitreeindex', 8)
  5311. .with('classname', 'ImageButton')
  5312. .with('resource-id', 'com.google.android.apps.messaging:id/close_button')
  5313. .with('content-desc', 'Discard attachment')
  5314.  
  5315. $ruiObj.isExist
  5316.  
  5317. waitsecond(0)
  5318. end
  5319.  
  5320. tcase << TestAction.new(:logstop) do
  5321. $myTestResult = !checkLastExistResult
  5322. if $myTestResult == false
  5323. $myFailReason == "Record is not deleted"
  5324. end
  5325. logStopTest("05_01_07_09_MultiMedia")
  5326.  
  5327.  
  5328. waitsecond(0)
  5329. end
  5330.  
  5331. tcase << TestAction.new(:pressBack_34) do
  5332. pressBack
  5333.  
  5334. waitsecond(0)
  5335. end
  5336.  
  5337. tcase << TestAction.new(:pressBack_35) do
  5338. pressBack
  5339.  
  5340. waitsecond(0)
  5341. end
  5342.  
  5343. tcase << TestAction.new(:pressBack_36) do
  5344. pressBack
  5345.  
  5346. waitsecond(0)
  5347. end
  5348.  
  5349. tcase << TestAction.new(:pressHome_37) do
  5350. pressHome
  5351.  
  5352. waitsecond(0)
  5353. end
  5354.  
  5355. tcase.run(loopTime)
  5356.  
  5357. end
  5358.  
  5359. def self.NFC_5_1_11_1(loopTime)
  5360.  
  5361. tcase = TestCase.new("NFC_5_1_11_1")
  5362.  
  5363. tcase << TestAction.new(:Home) do
  5364. pressHome
  5365.  
  5366. waitsecond(2)
  5367. end
  5368.  
  5369. tcase << TestAction.new(:logStart) do
  5370. logStartTest("NFC_5_1_11_1")
  5371.  
  5372. waitsecond(0)
  5373. end
  5374.  
  5375. tcase << TestAction.new(:GotoSettings) do
  5376. gotoAppPixel('Settings')
  5377.  
  5378.  
  5379. waitsecond(2)
  5380. end
  5381.  
  5382. tcase << TestAction.new(:ConnectedDevice) do
  5383. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', -2089735067).with('textdescid', 48216771).with('uniqueparentid', -1387883596)
  5384. .with('uitreeindex', 13)
  5385. .with('classname', 'TextView')
  5386. .with('resource-id', 'android:id/title')
  5387. .with('text', 'Connected devices')
  5388.  
  5389. $ruiObj.click
  5390.  
  5391. waitsecond(2)
  5392. end
  5393.  
  5394. tcase << TestAction.new(:Off1) do
  5395. $NFCon = RUIObject.new.with('objectid', 104348776).with('selfid', 411050777).with('textdescid', 2105771625).with('uniqueparentid', 1207404591)
  5396. .with('uitreeindex', 14)
  5397. .with('classname', 'Switch')
  5398. .with('resource-id', 'android:id/switch_widget')
  5399. .with('text', 'ON')
  5400.  
  5401. if $NFCon.isExist
  5402. $NFCon.click
  5403. end
  5404.  
  5405. waitsecond(2)
  5406. end
  5407.  
  5408. tcase << TestAction.new(:On) do
  5409. $NFCoff = RUIObject.new.with('objectid', 104348776).with('selfid', -142327979).with('textdescid', 854404457).with('uniqueparentid', -1225169821)
  5410. .with('uitreeindex', 13)
  5411. .with('classname', 'Switch')
  5412. .with('resource-id', 'android:id/switch_widget')
  5413. .with('text', 'OFF')
  5414.  
  5415. if $NFCoff.isExist
  5416. $NFCoff.click
  5417. end
  5418.  
  5419. waitsecond(2)
  5420. end
  5421.  
  5422. tcase << TestAction.new(:Wait10Sec) do
  5423. waitsecond(10)
  5424.  
  5425. waitsecond(2)
  5426. end
  5427.  
  5428. tcase << TestAction.new(:FailCheck) do
  5429. $ruiObj = RUIObject.new.with('objectid', 104348776).with('selfid', 411050777).with('textdescid', 2105771625).with('uniqueparentid', 1207404591)
  5430. .with('uitreeindex', 13)
  5431. .with('classname', 'Switch')
  5432. .with('resource-id', 'android:id/switch_widget')
  5433. .with('text', 'ON')
  5434.  
  5435. $ruiObj.isExist
  5436.  
  5437. waitsecond(0)
  5438. end
  5439.  
  5440. tcase << TestAction.new(:Result) do
  5441. $myTestResult = checkLastExistResult
  5442.  
  5443. waitsecond(0)
  5444. end
  5445.  
  5446. tcase << TestAction.new(:Off2) do
  5447. $NFCon = RUIObject.new.with('objectid', 104348776).with('selfid', 411050777).with('textdescid', 2105771625).with('uniqueparentid', 1207404591)
  5448. .with('uitreeindex', 14)
  5449. .with('classname', 'Switch')
  5450. .with('resource-id', 'android:id/switch_widget')
  5451. .with('text', 'ON')
  5452.  
  5453. if $NFCon.isExist
  5454. $NFCon.click
  5455. end
  5456.  
  5457. waitsecond(2)
  5458. end
  5459.  
  5460. tcase << TestAction.new(:logStop) do
  5461. logStopTest("NFC_5_1_11_1")
  5462.  
  5463. waitsecond(0)
  5464. end
  5465.  
  5466. tcase.run(loopTime)
  5467.  
  5468. end
  5469.  
  5470. def self.PIM_05_01_06_01(loopTime)
  5471.  
  5472. tcase = TestCase.new("PIM_05_01_06_01")
  5473.  
  5474. tcase << TestAction.new(:scriptAction_StartTestLog) do
  5475. logStartTest("05_01_06_01_PIM")
  5476. end
  5477.  
  5478. tcase << TestAction.new(:gotoApp_4) do
  5479. gotoApp('Calendar')
  5480.  
  5481. waitsecond(2)
  5482. end
  5483.  
  5484. tcase << TestAction.new(:ImageView_3) do
  5485. $ruiObj = RUIObject.new.with('objectid', -30724256).with('selfid', 1125864064).with('textdescid', -952451904).with('uniqueparentid', 0)
  5486. .with('uitreeindex', 23)
  5487. .with('pretext', 'SAT')
  5488. .with('classname', 'ImageView')
  5489.  
  5490. $ruiObj.click
  5491.  
  5492. waitsecond(2)
  5493. end
  5494.  
  5495. tcase << TestAction.new(:EditText_Title_7) do
  5496. $ruiObj = RUIObject.new.with('objectid', -308497519).with('selfid', 2023914653).with('textdescid', -973488465).with('uniqueparentid', 0).with('classresourceid', 1943514993)
  5497. .with('uitreeindex', 4)
  5498. .with('classname', 'EditText')
  5499. .with('resource-id', 'com.android.calendar:id/title')
  5500.  
  5501. $ruiObj.inputtext('Event')
  5502.  
  5503. waitsecond(2)
  5504. end
  5505.  
  5506. tcase << TestAction.new(:Button_BtnDone_9) do
  5507. $ruiObj = RUIObject.new.with('objectid', 2099795980).with('selfid', 2133354936).with('textdescid', -644044497).with('uniqueparentid', 0)
  5508. .with('uitreeindex', 32)
  5509. .with('classname', 'Button')
  5510. .with('resource-id', 'com.android.calendar:id/btn_done')
  5511. .with('text', 'SAVE')
  5512.  
  5513. $ruiObj.click
  5514.  
  5515. waitsecond(2)
  5516. end
  5517.  
  5518. tcase << TestAction.new(:wait1second_11) do
  5519. waitsecond(1)
  5520. end
  5521.  
  5522. tcase << TestAction.new(:scriptAction_LogStopTest) do
  5523. $myTestResult = checkLastExistResult
  5524.  
  5525. if $myTestResult == false
  5526. $myFailReason = "End button not found"
  5527. end
  5528. logStopTest("05_01_06_01_PIM")
  5529. end
  5530.  
  5531. tcase << TestAction.new(:pressBack_14) do
  5532. pressBack
  5533. end
  5534.  
  5535. tcase << TestAction.new(:pressBack_16) do
  5536. pressBack
  5537. end
  5538.  
  5539. tcase << TestAction.new(:pressHome_2) do
  5540. pressHome
  5541. end
  5542.  
  5543. tcase.run(loopTime)
  5544.  
  5545. end
  5546.  
  5547. def self.PIM_5_1_6_1(loopTime)
  5548.  
  5549. tcase = TestCase.new("PIM_5_1_6_1")
  5550.  
  5551. tcase << TestAction.new(:scriptAction_1) do
  5552. i = 0
  5553. n = 0
  5554.  
  5555. gotoAppPixel("Calendar")
  5556.  
  5557. waitsecond(3)
  5558.  
  5559. while n < 3 do
  5560. RUIObject.new.with('objectid', 1039155013).with('selfid', -773553589).with('textdescid', -1562943423).with('uniqueparentid', 1761562046)
  5561. .with('uitreeindex', 4)
  5562. .with('classname', 'ImageView')
  5563. .with('resource-id', 'com.google.android.calendar:id/right_arrow')
  5564. .with('content-desc', 'next page').click
  5565.  
  5566. waitsecond(3)
  5567.  
  5568. n += 1
  5569. end
  5570.  
  5571. RUIObject.new.with('objectid', -1343654405).with('selfid', -1828804226).with('textdescid', 769111461).with('uniqueparentid', 1254931512)
  5572. .with('uitreeindex', 4)
  5573. .with('classname', 'Button')
  5574. .with('resource-id', 'com.google.android.calendar:id/done_button')
  5575. .with('content-desc', 'Got it')
  5576. .with('text', 'GOT IT').click
  5577.  
  5578. waitsecond(3)
  5579.  
  5580. while i < 5 do
  5581.  
  5582. logStartTest("PIM_5_1_6_1")
  5583.  
  5584. RUIObject.new.with('objectid', -173740453).with('selfid', 220763148).with('textdescid', 356821123).with('uniqueparentid', -1214616113)
  5585. .with('uitreeindex', 0)
  5586. .with('classname', 'ImageButton')
  5587. .with('resource-id', 'com.google.android.calendar:id/floating_action_button')
  5588. .with('content-desc', 'Create new event and more').click
  5589.  
  5590. waitsecond(3)
  5591.  
  5592. RUIObject.new.with('objectid', 127015164).with('selfid', 498557039).with('textdescid', 42594724).with('uniqueparentid', -1133067901)
  5593. .with('uitreeindex', 4)
  5594. .with('pretext', 'Event')
  5595. .with('classname', 'ImageView')
  5596. .with('resource-id', 'com.google.android.calendar:id/speed_dial_icon')
  5597. .with('content-desc', '').click
  5598.  
  5599. waitsecond(3)
  5600.  
  5601. RUIObject.new.with('objectid', -2070965006).with('selfid', -1061118606).with('textdescid', 1487763652).with('uniqueparentid', 1410610442).with('classresourceid', 395678146)
  5602. .with('uitreeindex', 7)
  5603. .with('classname', 'TextView')
  5604. .with('resource-id', 'com.google.android.calendar:id/start_date').click
  5605.  
  5606. waitsecond(3)
  5607.  
  5608. RUIObject.new.with('objectid', -241964648).with('selfid', -834019104).with('textdescid', 1286379225).with('uniqueparentid', 507709356).with('classresourceid', 1815484335)
  5609. .with('uitreeindex', 2)
  5610. .with('classname', 'android.view.View')
  5611. .with('content-desc', '0'+db("Calendar")[i]+' May 2017')
  5612. .with('text', 'db("Calendar")[1]').click
  5613.  
  5614. waitsecond(3)
  5615.  
  5616. RUIObject.new.with('objectid', 1424815732).with('selfid', -1318451484).with('textdescid', -1879811560).with('uniqueparentid', -2069065518).with('classresourceid', 1834539358)
  5617. .with('uitreeindex', 36)
  5618. .with('classname', 'Button')
  5619. .with('resource-id', 'android:id/button1')
  5620. .with('text', 'OK').click
  5621.  
  5622. waitsecond(3)
  5623.  
  5624.  
  5625.  
  5626. RUIObject.new.with('objectid', -1341455097).with('selfid', 870535911).with('textdescid', 1753902570).with('uniqueparentid', -1107284276)
  5627. .with('uitreeindex', 2)
  5628. .with('classname', 'Button')
  5629. .with('resource-id', 'com.google.android.calendar:id/save')
  5630. .with('text', 'SAVE').click
  5631.  
  5632. waitsecond(3)
  5633.  
  5634. RUIObject.new.with('objectid', -173740453).with('selfid', 220763148).with('textdescid', 356821123).with('uniqueparentid', -1214616113)
  5635. .with('uitreeindex', 0)
  5636. .with('classname', 'ImageButton')
  5637. .with('resource-id', 'com.google.android.calendar:id/floating_action_button')
  5638. .with('content-desc', 'Create new event and more').isExist
  5639.  
  5640. waitsecond(3)
  5641.  
  5642. $myTestResult = checkLastExistResult
  5643.  
  5644. logStopTest("PIM_5_1_6_1")
  5645.  
  5646.  
  5647. i += 1
  5648. end
  5649.  
  5650. pressBack
  5651. pressHome
  5652.  
  5653. waitsecond(2)
  5654. end
  5655.  
  5656. tcase.run(loopTime)
  5657.  
  5658. end
  5659.  
  5660. def self.PIM_5_1_6_2(loopTime)
  5661.  
  5662. tcase = TestCase.new("PIM_5_1_6_2")
  5663.  
  5664. tcase << TestAction.new(:Start_Log) do
  5665. logStartTest("PIM_5_1_6_2")
  5666.  
  5667. waitsecond(0)
  5668. end
  5669.  
  5670. tcase << TestAction.new(:Clock) do
  5671. gotoAppPixel("Clock")
  5672.  
  5673. waitsecond(2)
  5674. end
  5675.  
  5676. tcase << TestAction.new(:Click_AlarmTab) do
  5677. $ruiObj = RUIObject.new.with('objectid', 1398250823).with('selfid', 1155694879).with('textdescid', -2067701496).with('uniqueparentid', 1343446106)
  5678. .with('uitreeindex', 0)
  5679. .with('classname', 'TextView')
  5680. .with('text', 'ALARM')
  5681.  
  5682. $ruiObj.click
  5683.  
  5684. waitsecond(2)
  5685. end
  5686.  
  5687. tcase << TestAction.new(:Create_Alarm) do
  5688. $ruiObj = RUIObject.new.with('objectid', -675199108).with('selfid', 1376996000).with('textdescid', -42904882).with('uniqueparentid', -647720292)
  5689. .with('uitreeindex', 16)
  5690. .with('classname', 'ImageButton')
  5691. .with('resource-id', 'com.google.android.deskclock:id/fab')
  5692. .with('content-desc', 'Add alarm')
  5693.  
  5694. $ruiObj.click
  5695.  
  5696. waitsecond(2)
  5697. end
  5698.  
  5699. tcase << TestAction.new(:Click_OK) do
  5700. $ruiObj = RUIObject.new.with('objectid', 1329788078).with('selfid', -1318451484).with('textdescid', 1447865170).with('uniqueparentid', 1005760344).with('classresourceid', 1834539358)
  5701. .with('uitreeindex', 19)
  5702. .with('classname', 'Button')
  5703. .with('resource-id', 'android:id/button1')
  5704. .with('text', 'OK')
  5705.  
  5706. $ruiObj.click
  5707.  
  5708. waitsecond(2)
  5709. end
  5710.  
  5711. tcase << TestAction.new(:Check_Delete) do
  5712. $ruiObj = RUIObject.new.with('objectid', 30134492).with('selfid', 16045296).with('textdescid', -946628495).with('uniqueparentid', -579144048)
  5713. .with('uitreeindex', 23)
  5714. .with('classname', 'Button')
  5715. .with('resource-id', 'com.google.android.deskclock:id/delete')
  5716. .with('text', 'Delete')
  5717.  
  5718. $ruiObj.isExist
  5719.  
  5720. waitsecond(0)
  5721. end
  5722.  
  5723. tcase << TestAction.new(:Alarm_Off) do
  5724. $ruiObj = RUIObject.new.with('objectid', 1189886877).with('selfid', -1968976493).with('textdescid', 957014814).with('uniqueparentid', 1693277107)
  5725. .with('uitreeindex', 7)
  5726. .with('classname', 'Switch')
  5727. .with('resource-id', 'com.google.android.deskclock:id/onoff')
  5728. .with('text', 'ON')
  5729.  
  5730. $ruiObj.click
  5731.  
  5732. waitsecond(2)
  5733. end
  5734.  
  5735. tcase << TestAction.new(:End_Log) do
  5736. $myTestResult = checkLastExistResult
  5737.  
  5738. logStopTest("PIM_5_1_6_2")
  5739.  
  5740. waitsecond(0)
  5741. end
  5742.  
  5743. tcase << TestAction.new(:pressBack_11) do
  5744. pressBack
  5745.  
  5746. waitsecond(0)
  5747. end
  5748.  
  5749. tcase << TestAction.new(:pressHome_12) do
  5750. pressHome
  5751.  
  5752. waitsecond(0)
  5753. end
  5754.  
  5755. tcase.run(loopTime)
  5756.  
  5757. end
  5758.  
  5759. def self.PIM_5_1_6_3(loopTime)
  5760.  
  5761. tcase = TestCase.new("PIM_5_1_6_3")
  5762.  
  5763. tcase << TestAction.new(:scriptAction_1) do
  5764. i = 0
  5765.  
  5766. gotoAppPixel("Calendar")
  5767.  
  5768. waitsecond(3)
  5769.  
  5770. RUIObject.new.with('objectid', -947681391).with('selfid', -2132232079).with('textdescid', 1447189041).with('uniqueparentid', -648635418)
  5771. .with('uitreeindex', 1)
  5772. .with('classname', 'ImageButton')
  5773. .with('content-desc', 'Show Calendar List and Settings drawer').click
  5774.  
  5775. waitsecond(3)
  5776.  
  5777. RUIObject.new.with('objectid', 1940182694).with('selfid', -657992039).with('textdescid', -1445067654).with('uniqueparentid', 1633433281).with('classresourceid', -498129859)
  5778. .with('uitreeindex', 31)
  5779. .with('classname', 'TextView')
  5780. .with('resource-id', 'com.google.android.calendar:id/label')
  5781. .with('text', 'Month').click
  5782.  
  5783. waitsecond(3)
  5784.  
  5785. uitree.q("android.view.View@@0@").click
  5786.  
  5787. waitsecond(3)
  5788.  
  5789. while i < 5 do
  5790.  
  5791. logStartTest("PIM_5_1_6_3")
  5792.  
  5793. waitsecond(3)
  5794.  
  5795. if i > 0
  5796.  
  5797. uitree.q("android.view.View@@0@").click
  5798.  
  5799. waitsecond(3)
  5800.  
  5801. swipe_horizontal 50
  5802.  
  5803. uitree.q("android.view.View@@0@").click
  5804.  
  5805. waitsecond(3)
  5806.  
  5807. uitree.q("android.view.View@@0@").click
  5808.  
  5809. waitsecond(3)
  5810.  
  5811. uitree.q("android.view.View@@0@").click
  5812.  
  5813. waitsecond(3)
  5814.  
  5815. else
  5816.  
  5817. uitree.q("android.view.View@@0@").click
  5818.  
  5819. waitsecond(3)
  5820.  
  5821. uitree.q("android.view.View@@0@").click
  5822.  
  5823. waitsecond(3)
  5824.  
  5825. end
  5826.  
  5827. RUIObject.new.with('objectid', -1337459766).with('selfid', 1290820192).with('textdescid', -1829626039).with('uniqueparentid', -1060096944)
  5828. .with('uitreeindex', 1)
  5829. .with('classname', 'ImageButton')
  5830. .with('content-desc', 'More options').click
  5831.  
  5832. waitsecond(3)
  5833.  
  5834. RUIObject.new.with('objectid', 1212207054).with('selfid', -342341268).with('textdescid', 1759216995).with('uniqueparentid', -382238014).with('classresourceid', 490183159)
  5835. .with('uitreeindex', 0)
  5836. .with('classname', 'TextView')
  5837. .with('resource-id', 'android:id/title')
  5838. .with('text', 'Delete').click
  5839.  
  5840. waitsecond(3)
  5841.  
  5842. RUIObject.new.with('objectid', 1424815732).with('selfid', 982364851).with('textdescid', 502569513).with('uniqueparentid', -102833181).with('classresourceid', 1834539358)
  5843. .with('uitreeindex', 3)
  5844. .with('classname', 'Button')
  5845. .with('resource-id', 'android:id/button1')
  5846. .with('text', 'DELETE').isExist
  5847.  
  5848. waitsecond(3)
  5849.  
  5850. RUIObject.new.with('objectid', 1424815732).with('selfid', 982364851).with('textdescid', 502569513).with('uniqueparentid', -102833181).with('classresourceid', 1834539358)
  5851. .with('uitreeindex', 3)
  5852. .with('classname', 'Button')
  5853. .with('resource-id', 'android:id/button1')
  5854. .with('text', 'DELETE').click
  5855.  
  5856. waitsecond(3)
  5857.  
  5858. uitree.q("android.view.View@@0@").click
  5859.  
  5860. waitsecond(3)
  5861.  
  5862. $myTestResult = checkLastExistResult
  5863.  
  5864. logStopTest("PIM_5_1_6_3")
  5865.  
  5866.  
  5867. i += 1
  5868. end
  5869.  
  5870. pressBack
  5871. pressHome
  5872.  
  5873. waitsecond(2)
  5874. end
  5875.  
  5876. tcase.run(loopTime)
  5877.  
  5878. end
  5879.  
  5880. def self.PIM_5_1_6_4(loopTime)
  5881.  
  5882. tcase = TestCase.new("PIM_5_1_6_4")
  5883.  
  5884. tcase << TestAction.new(:Start_Log) do
  5885. logStartTest("PIM_5_1_6_4")
  5886.  
  5887. waitsecond(0)
  5888. end
  5889.  
  5890. tcase << TestAction.new(:Clock) do
  5891. gotoAppPixel("Clock")
  5892.  
  5893. waitsecond(2)
  5894. end
  5895.  
  5896. tcase << TestAction.new(:Click_AlarmTab) do
  5897. $ruiObj = RUIObject.new.with('objectid', 1398250823).with('selfid', 1155694879).with('textdescid', -2067701496).with('uniqueparentid', 1343446106)
  5898. .with('uitreeindex', 0)
  5899. .with('classname', 'TextView')
  5900. .with('text', 'ALARM')
  5901.  
  5902. $ruiObj.click
  5903.  
  5904. waitsecond(2)
  5905. end
  5906.  
  5907. tcase << TestAction.new(:Check_Alarm) do
  5908. $ruiObj = RUIObject.new.with('objectid', -1717301025).with('selfid', -1665247246).with('textdescid', -993494140).with('uniqueparentid', 2079641362)
  5909. .with('uitreeindex', 8)
  5910. .with('classname', 'CheckBox')
  5911. .with('resource-id', 'com.google.android.deskclock:id/repeat_onoff')
  5912. .with('text', 'Repeat')
  5913.  
  5914. $ruiObj.isNotExist
  5915. ifFailJumpTo(:Click_Delete)
  5916.  
  5917. waitsecond(0)
  5918. end
  5919.  
  5920. tcase << TestAction.new(:Expand_Alarm) do
  5921. $ruiObj = RUIObject.new.with('objectid', -553129188).with('selfid', 380069409).with('textdescid', 1044151343).with('uniqueparentid', 792291641)
  5922. .with('uitreeindex', 9)
  5923. .with('classname', 'ImageButton')
  5924. .with('resource-id', 'com.google.android.deskclock:id/arrow')
  5925. .with('content-desc', 'Expand alarm')
  5926.  
  5927. $ruiObj.click
  5928.  
  5929. waitsecond(2)
  5930. end
  5931.  
  5932. tcase << TestAction.new(:Click_Delete) do
  5933. $ruiObj = RUIObject.new.with('objectid', 30134492).with('selfid', 16045296).with('textdescid', -946628495).with('uniqueparentid', -53158187)
  5934. .with('uitreeindex', 13)
  5935. .with('classname', 'Button')
  5936. .with('resource-id', 'com.google.android.deskclock:id/delete')
  5937. .with('text', 'Delete')
  5938.  
  5939. $ruiObj.click
  5940.  
  5941. waitsecond(2)
  5942. end
  5943.  
  5944. tcase << TestAction.new(:Check_Delete_DNE) do
  5945. $ruiObj = RUIObject.new.with('objectid', 30134492).with('selfid', 16045296).with('textdescid', -946628495).with('uniqueparentid', -53158187)
  5946. .with('uitreeindex', 13)
  5947. .with('classname', 'Button')
  5948. .with('resource-id', 'com.google.android.deskclock:id/delete')
  5949. .with('text', 'Delete')
  5950.  
  5951. $ruiObj.isExist
  5952.  
  5953. waitsecond(0)
  5954. end
  5955.  
  5956. tcase << TestAction.new(:End_Log) do
  5957. $myTestResult = !checkLastExistResult
  5958.  
  5959. logStopTest("PIM_5_1_6_4")
  5960.  
  5961. waitsecond(0)
  5962. end
  5963.  
  5964. tcase << TestAction.new(:pressBack_10) do
  5965. pressBack
  5966.  
  5967. waitsecond(0)
  5968. end
  5969.  
  5970. tcase << TestAction.new(:pressHome_11) do
  5971. pressHome
  5972.  
  5973. waitsecond(0)
  5974. end
  5975.  
  5976. tcase.run(loopTime)
  5977.  
  5978. end
  5979.  
  5980. def self.mainLoop(loopTime)
  5981.  
  5982. WebSocketXServer.setAutoUpdate(false)
  5983.  
  5984. index = $mainResumeMainLoop
  5985. $mainResumeMainLoop = 0
  5986.  
  5987. writelog("mainLoop::#{index}::Resume") if index > 0
  5988.  
  5989. while index < loopTime
  5990.  
  5991. $curMainLoopNum = index
  5992.  
  5993. $actionParamInput = "none"
  5994. startTest 1
  5995.  
  5996. waitsecond(2)
  5997.  
  5998. $actionParamInput = "none"
  5999. Telephony_5_1_1_1 80
  6000.  
  6001. waitsecond(2)
  6002.  
  6003. $actionParamInput = "none"
  6004. Telephony_5_1_1_3 80
  6005.  
  6006. waitsecond(2)
  6007.  
  6008. $actionParamInput = "none"
  6009. Telephony_5_1_1_6_7 20
  6010.  
  6011. waitsecond(2)
  6012.  
  6013. $actionParamInput = "none"
  6014. Messaging_5_1_2_3 50
  6015.  
  6016. waitsecond(2)
  6017.  
  6018. $actionParamInput = "none"
  6019. Messaging_5_1_2_5 50
  6020.  
  6021. waitsecond(2)
  6022.  
  6023. $actionParamInput = "none"
  6024. Messaging_5_1_2_6 50
  6025.  
  6026. waitsecond(2)
  6027.  
  6028. $actionParamInput = "none"
  6029. Store_Front_5_1_5_1 20
  6030.  
  6031. waitsecond(2)
  6032.  
  6033. $actionParamInput = "none"
  6034. Store_Front_5_1_5_2 10
  6035.  
  6036. waitsecond(2)
  6037.  
  6038. $actionParamInput = "none"
  6039. Store_Front_5_1_5_3 10
  6040.  
  6041. waitsecond(2)
  6042.  
  6043. $actionParamInput = "none"
  6044. PIM_5_1_6_1 1
  6045.  
  6046. waitsecond(2)
  6047.  
  6048. $actionParamInput = "none"
  6049. PIM_5_1_6_2 1
  6050.  
  6051. waitsecond(2)
  6052.  
  6053. $actionParamInput = "none"
  6054. PIM_5_1_6_3 1
  6055.  
  6056. waitsecond(2)
  6057.  
  6058. $actionParamInput = "none"
  6059. PIM_5_1_6_4 1
  6060.  
  6061. waitsecond(2)
  6062.  
  6063. $actionParamInput = "none"
  6064. Multimedia_5_1_7_1 1
  6065.  
  6066. waitsecond(2)
  6067.  
  6068. $actionParamInput = "none"
  6069. Multimedia_5_1_7_2 1
  6070.  
  6071. waitsecond(2)
  6072.  
  6073. $actionParamInput = "none"
  6074. Multimedia_5_1_7_3 1
  6075.  
  6076. waitsecond(2)
  6077.  
  6078. $actionParamInput = "none"
  6079. Multimedia_5_1_7_4 20
  6080.  
  6081. waitsecond(2)
  6082.  
  6083. $actionParamInput = "none"
  6084. Multimedia_5_1_7_5 20
  6085.  
  6086. waitsecond(2)
  6087.  
  6088. $actionParamInput = "none"
  6089. Multimedia_5_1_7_6 20
  6090.  
  6091. waitsecond(2)
  6092.  
  6093. $actionParamInput = "none"
  6094. Multimedia_5_1_7_7 1
  6095.  
  6096. waitsecond(2)
  6097.  
  6098. $actionParamInput = "none"
  6099. Multimedia_5_1_7_8 1
  6100.  
  6101. waitsecond(2)
  6102.  
  6103. $actionParamInput = "none"
  6104. Multimedia_5_1_7_9 1
  6105.  
  6106. waitsecond(2)
  6107.  
  6108. $actionParamInput = "none"
  6109. Multimedia_5_1_7_10 10
  6110.  
  6111. waitsecond(2)
  6112.  
  6113. $actionParamInput = "none"
  6114. Multimedia_5_1_7_11 20
  6115.  
  6116. waitsecond(2)
  6117.  
  6118. $actionParamInput = "none"
  6119. Multimedia_5_1_7_12 50
  6120.  
  6121. waitsecond(2)
  6122.  
  6123. $actionParamInput = "none"
  6124. Multimedia_5_1_7_13 1
  6125.  
  6126. waitsecond(2)
  6127.  
  6128. $actionParamInput = "none"
  6129. MultiTasking_5_1_8_1 1
  6130.  
  6131. waitsecond(2)
  6132.  
  6133. $actionParamInput = "none"
  6134. MultiTasking_5_1_8_2 50
  6135.  
  6136. waitsecond(2)
  6137.  
  6138. $actionParamInput = "none"
  6139. MultiTasking_5_1_8_3 1
  6140.  
  6141. waitsecond(2)
  6142.  
  6143. $actionParamInput = "none"
  6144. MultiTasking_5_1_8_4 1
  6145.  
  6146. waitsecond(2)
  6147.  
  6148. $actionParamInput = "none"
  6149. MultiTasking_5_1_8_5 50
  6150.  
  6151. waitsecond(2)
  6152.  
  6153. $actionParamInput = "none"
  6154. MultiTasking_5_1_8_6 1
  6155.  
  6156. waitsecond(2)
  6157.  
  6158. $actionParamInput = "none"
  6159. MenuNav_5_1_9_1 1
  6160.  
  6161. waitsecond(2)
  6162.  
  6163. $actionParamInput = "none"
  6164. WiFi_5_1_10_1 20
  6165.  
  6166. waitsecond(2)
  6167.  
  6168. $actionParamInput = "none"
  6169. WiFi_5_1_10_2 20
  6170.  
  6171. waitsecond(2)
  6172.  
  6173. $actionParamInput = "none"
  6174. IPME_5_1_15_2 75
  6175.  
  6176. waitsecond(2)
  6177.  
  6178. $actionParamInput = "none"
  6179. IPME_5_1_15_4 75
  6180.  
  6181. waitsecond(2)
  6182.  
  6183. $actionParamInput = "none"
  6184. EMAIL_5_1_3_1 50
  6185.  
  6186. waitsecond(2)
  6187.  
  6188. $actionParamInput = "none"
  6189. EMAIL_5_1_3_2 50
  6190.  
  6191. waitsecond(2)
  6192.  
  6193. $actionParamInput = "none"
  6194. Browser_5_1_4_1 50
  6195.  
  6196. waitsecond(2)
  6197.  
  6198. $actionParamInput = "none"
  6199. Browser_5_1_4_2 50
  6200.  
  6201. waitsecond(2)
  6202.  
  6203. $actionParamInput = "none"
  6204. Browser_5_1_4_3 10
  6205.  
  6206. waitsecond(2)
  6207.  
  6208. $actionParamInput = "none"
  6209. NFC_5_1_11_1 20
  6210.  
  6211. waitsecond(2)
  6212.  
  6213.  
  6214. sendStatus("Done::mainLoop::Loop::#{index}")
  6215.  
  6216.  
  6217. writelog("Finish::Loop::#{$curMainLoopNum}")
  6218.  
  6219.  
  6220. saveLogFileToGist if $saveLogToGist
  6221.  
  6222. index += 1
  6223.  
  6224. end
  6225.  
  6226. $engineStatus = "Idle"
  6227. resetStatus
  6228. sendStatus("Finish::mainLoop::END")
  6229.  
  6230. end
  6231.  
  6232. def self.Store_Front_5_1_5_1(loopTime)
  6233.  
  6234. tcase = TestCase.new("Store_Front_5_1_5_1")
  6235.  
  6236. tcase << TestAction.new(:Start_Log) do
  6237. logStartTest("Store_Front_5_1_5_1")
  6238.  
  6239. waitsecond(0)
  6240. end
  6241.  
  6242. tcase << TestAction.new(:Play_Store) do
  6243. gotoAppPixel("Play Store")
  6244.  
  6245. waitsecond(2)
  6246. end
  6247.  
  6248. tcase << TestAction.new(:AppSearch_Check) do
  6249. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 42455286)
  6250. .with('uitreeindex', 49)
  6251. .with('classname', 'ImageView')
  6252. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  6253. .with('content-desc', 'Search')
  6254.  
  6255. $ruiObj.isExist
  6256.  
  6257. waitsecond(2)
  6258. end
  6259.  
  6260. tcase << TestAction.new(:pressHome_6) do
  6261. pressHome
  6262.  
  6263. waitsecond(0)
  6264. end
  6265.  
  6266. tcase << TestAction.new(:End_Log) do
  6267. $myTestResult = checkLastExistResult
  6268.  
  6269. logStopTest("Store_Front_5_1_5_1")
  6270.  
  6271. waitsecond(0)
  6272. end
  6273.  
  6274. tcase.run(loopTime)
  6275.  
  6276. end
  6277.  
  6278. def self.Store_Front_5_1_5_2(loopTime)
  6279.  
  6280. tcase = TestCase.new("Store_Front_5_1_5_2")
  6281.  
  6282. tcase << TestAction.new(:Start_Log_5_1_5_2) do
  6283. logStartTest("Store_Front_5_1_5_2")
  6284.  
  6285. waitsecond(0)
  6286. end
  6287.  
  6288. tcase << TestAction.new(:Play_Store_1) do
  6289. gotoAppPixel('Play Store')
  6290.  
  6291. waitsecond(2)
  6292. end
  6293.  
  6294. tcase << TestAction.new(:Click_Search) do
  6295. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 42455286)
  6296. .with('uitreeindex', 49)
  6297. .with('classname', 'ImageView')
  6298. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  6299. .with('content-desc', 'Search')
  6300.  
  6301. $ruiObj.click
  6302.  
  6303. waitsecond(2)
  6304. end
  6305.  
  6306. tcase << TestAction.new(:Input_Search) do
  6307. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 1316281134)
  6308. .with('uitreeindex', 50)
  6309. .with('classname', 'EditText')
  6310. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  6311.  
  6312. $ruiObj.inputtext('Clash Royale')
  6313.  
  6314. waitsecond(2)
  6315. end
  6316.  
  6317. tcase << TestAction.new(:pressEnter_3) do
  6318. pressEnter
  6319.  
  6320. waitsecond(2)
  6321. end
  6322.  
  6323. tcase << TestAction.new(:Click_Clash_Royale) do
  6324. $ruiObj = RUIObject.new.with('objectid', 1456557201).with('selfid', 911224488).with('textdescid', 1328898808).with('uniqueparentid', 944556771)
  6325. .with('uitreeindex', 1)
  6326. .with('classname', 'TextView')
  6327. .with('resource-id', 'com.android.vending:id/li_title')
  6328. .with('content-desc', 'App: Clash Royale')
  6329. .with('text', 'Clash Royale')
  6330.  
  6331. $ruiObj.click
  6332.  
  6333. waitsecond(2)
  6334. end
  6335.  
  6336. tcase << TestAction.new(:Click_Install) do
  6337. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 998476585).with('textdescid', 915934888).with('uniqueparentid', -349714783)
  6338. .with('uitreeindex', 11)
  6339. .with('classname', 'Button')
  6340. .with('text', 'INSTALL')
  6341.  
  6342. $ruiObj.click
  6343.  
  6344. waitsecond(2)
  6345. end
  6346.  
  6347. tcase << TestAction.new(:Confirm_Install) do
  6348. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1471442810).with('textdescid', 2077853872).with('uniqueparentid', -1070189422)
  6349. .with('uitreeindex', 4)
  6350. .with('classname', 'Button')
  6351. .with('resource-id', 'android:id/button1')
  6352. .with('text', 'PROCEED')
  6353.  
  6354. $ruiObj.click
  6355.  
  6356. waitsecond(2)
  6357. end
  6358.  
  6359. tcase << TestAction.new(:Wait_Loop) do
  6360. count = 0
  6361. waitsecond(4)
  6362. $UninstallStatus = RUIObject.new.with('classname', 'Button').with('text', 'UNINSTALL')
  6363.  
  6364. while ($UninstallStatus.isNotExist) && count < 30 do
  6365. waitsecond(5)
  6366. count += 1
  6367. end
  6368.  
  6369.  
  6370.  
  6371.  
  6372.  
  6373. waitsecond(2)
  6374. end
  6375.  
  6376. tcase << TestAction.new(:Uninstall_Check) do
  6377. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 1103650544).with('textdescid', 926077825).with('uniqueparentid', 488799519)
  6378. .with('uitreeindex', 10)
  6379. .with('classname', 'Button')
  6380. .with('text', 'UNINSTALL')
  6381.  
  6382. $ruiObj.isExist
  6383.  
  6384. waitsecond(0)
  6385. end
  6386.  
  6387. tcase << TestAction.new(:End_Log_5_1_5_2) do
  6388. $myTestResult = checkLastExistResult
  6389.  
  6390. logStopTest("Store_Front_5_1_5_2")
  6391.  
  6392. waitsecond(2)
  6393. end
  6394.  
  6395. tcase << TestAction.new(:Start_Log_5_1_5_5) do
  6396. logStartTest("Store_Front_5_1_5_5")
  6397.  
  6398. waitsecond(2)
  6399. end
  6400.  
  6401. tcase << TestAction.new(:Click_Open) do
  6402. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 343626588).with('textdescid', -876702381).with('uniqueparentid', 488799519)
  6403. .with('uitreeindex', 14)
  6404. .with('classname', 'Button')
  6405. .with('text', 'OPEN')
  6406.  
  6407. $ruiObj.click
  6408.  
  6409. waitsecond(2)
  6410. end
  6411.  
  6412. tcase << TestAction.new(:wait_1) do
  6413. waitsecond(6)
  6414. end
  6415.  
  6416. tcase << TestAction.new(:App_Loop) do
  6417. count = 0
  6418. waitsecond(4)
  6419. $AppStatus = RUIObject.new.with('classname', 'Button').with('resource-id', 'android:id/button1').with('text', 'INSTALL')
  6420.  
  6421. while ($AppStatus.isNotExist) && count < 30 do
  6422. waitsecond(5)
  6423. count += 1
  6424. end
  6425.  
  6426.  
  6427. waitsecond(2)
  6428. end
  6429.  
  6430. tcase << TestAction.new(:Check_App) do
  6431. $ruiObj = RUIObject.new.with('classname', 'Button').with('resource-id', 'android:id/button1').with('text', 'INSTALL')
  6432.  
  6433. $ruiObj.isExist
  6434.  
  6435. waitsecond(0)
  6436. end
  6437.  
  6438. tcase << TestAction.new(:pressHome_10) do
  6439. pressHome
  6440.  
  6441. waitsecond(2)
  6442. end
  6443.  
  6444. tcase << TestAction.new(:End_Log_5_1_5_5) do
  6445. $myTestResult = checkLastExistResult
  6446.  
  6447. logStopTest("Store_Front_5_1_5_5")
  6448.  
  6449. waitsecond(2)
  6450. end
  6451.  
  6452. tcase << TestAction.new(:Start_Log_5_1_5_7) do
  6453. logStartTest("Store_Front_5_1_5_7")
  6454.  
  6455. waitsecond(2)
  6456. end
  6457.  
  6458. tcase << TestAction.new(:Play_Store_2) do
  6459. gotoAppPixel('Play Store')
  6460.  
  6461. waitsecond(2)
  6462. end
  6463.  
  6464. tcase << TestAction.new(:Click_Uninstall) do
  6465. $ruiObj = RUIObject.new.with('objectid', 82686867).with('selfid', -895718918).with('textdescid', 1814403659).with('uniqueparentid', 1781270761)
  6466. .with('uitreeindex', 9)
  6467. .with('classname', 'Button')
  6468. .with('resource-id', 'com.android.vending:id/uninstall_button')
  6469. .with('text', 'UNINSTALL')
  6470.  
  6471. $ruiObj.click
  6472.  
  6473. waitsecond(2)
  6474. end
  6475.  
  6476. tcase << TestAction.new(:Confirm_Uninstall) do
  6477. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', -1645912444)
  6478. .with('uitreeindex', 2)
  6479. .with('classname', 'Button')
  6480. .with('resource-id', 'android:id/button1')
  6481. .with('text', 'OK')
  6482.  
  6483. $ruiObj.click
  6484.  
  6485. waitsecond(2)
  6486. end
  6487.  
  6488. tcase << TestAction.new(:Check_Install) do
  6489. $ruiObj = RUIObject.new.with('objectid', -329901969).with('selfid', -652886121).with('textdescid', 992432790).with('uniqueparentid', -1937838608)
  6490. .with('uitreeindex', 9)
  6491. .with('classname', 'Button')
  6492. .with('resource-id', 'com.android.vending:id/buy_button')
  6493. .with('text', 'INSTALL')
  6494.  
  6495. $ruiObj.isExist
  6496.  
  6497. waitsecond(0)
  6498. end
  6499.  
  6500. tcase << TestAction.new(:End_Log_5_1_5_7) do
  6501. $myTestResult = checkLastExistResult
  6502.  
  6503. logStopTest("Store_Front_5_1_5_7")
  6504.  
  6505. waitsecond(0)
  6506. end
  6507.  
  6508. tcase << TestAction.new(:pressBack_14) do
  6509. pressBack
  6510.  
  6511. waitsecond(0)
  6512. end
  6513.  
  6514. tcase << TestAction.new(:pressBack_14_1) do
  6515. pressBack
  6516.  
  6517. waitsecond(0)
  6518. end
  6519.  
  6520. tcase << TestAction.new(:pressBack_14_1_1) do
  6521. pressBack
  6522.  
  6523. waitsecond(0)
  6524. end
  6525.  
  6526. tcase << TestAction.new(:pressHome_18) do
  6527. pressHome
  6528.  
  6529. waitsecond(0)
  6530. end
  6531.  
  6532. tcase.run(loopTime)
  6533.  
  6534. end
  6535.  
  6536. def self.Store_Front_5_1_5_3(loopTime)
  6537.  
  6538. tcase = TestCase.new("Store_Front_5_1_5_3")
  6539.  
  6540. tcase << TestAction.new(:Start_Log_5_1_5_3) do
  6541. logStartTest("Store_Front_5_1_5_3")
  6542.  
  6543. waitsecond(0)
  6544. end
  6545.  
  6546. tcase << TestAction.new(:Play_Store_1) do
  6547. gotoAppPixel('Play Store')
  6548.  
  6549. waitsecond(2)
  6550. end
  6551.  
  6552. tcase << TestAction.new(:Click_Search) do
  6553. $ruiObj = RUIObject.new.with('objectid', 1987043402).with('selfid', 88317888).with('textdescid', -133777698).with('uniqueparentid', 42455286)
  6554. .with('uitreeindex', 49)
  6555. .with('classname', 'ImageView')
  6556. .with('resource-id', 'com.android.vending:id/search_box_idle_text')
  6557. .with('content-desc', 'Search')
  6558.  
  6559. $ruiObj.click
  6560.  
  6561. waitsecond(2)
  6562. end
  6563.  
  6564. tcase << TestAction.new(:Input_Search) do
  6565. $ruiObj = RUIObject.new.with('objectid', 1660565057).with('selfid', 209465679).with('textdescid', -62090753).with('uniqueparentid', 1316281134)
  6566. .with('uitreeindex', 50)
  6567. .with('classname', 'EditText')
  6568. .with('resource-id', 'com.android.vending:id/search_box_text_input')
  6569.  
  6570. $ruiObj.inputtext('ColorNote')
  6571.  
  6572. waitsecond(2)
  6573. end
  6574.  
  6575. tcase << TestAction.new(:pressEnter_3) do
  6576. pressEnter
  6577.  
  6578. waitsecond(2)
  6579. end
  6580.  
  6581. tcase << TestAction.new(:Click_Install) do
  6582. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 998476585).with('textdescid', 915934888).with('uniqueparentid', -349714783)
  6583. .with('uitreeindex', 11)
  6584. .with('classname', 'Button')
  6585. .with('text', 'INSTALL')
  6586.  
  6587. $ruiObj.click
  6588.  
  6589. waitsecond(2)
  6590. end
  6591.  
  6592. tcase << TestAction.new(:Confirm_Install) do
  6593. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1471442810).with('textdescid', 2077853872).with('uniqueparentid', -1070189422)
  6594. .with('uitreeindex', 4)
  6595. .with('classname', 'Button')
  6596. .with('resource-id', 'android:id/button1')
  6597. .with('text', 'PROCEED')
  6598.  
  6599. $ruiObj.click
  6600.  
  6601. waitsecond(2)
  6602. end
  6603.  
  6604. tcase << TestAction.new(:scriptAction_2) do
  6605. count = 0
  6606. waitsecond(4)
  6607. $UninstallStatus = RUIObject.new.with('classname', 'Button').with('text', 'UNINSTALL')
  6608.  
  6609. while ($UninstallStatus.isNotExist) && count < 30 do
  6610. waitsecond(5)
  6611. count += 1
  6612. end
  6613.  
  6614. waitsecond(2)
  6615. end
  6616.  
  6617. tcase << TestAction.new(:Check_Unisntall) do
  6618. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 1103650544).with('textdescid', 926077825).with('uniqueparentid', 488799519)
  6619. .with('uitreeindex', 10)
  6620. .with('classname', 'Button')
  6621. .with('text', 'UNINSTALL')
  6622.  
  6623. $ruiObj.isExist
  6624.  
  6625. waitsecond(2)
  6626. end
  6627.  
  6628. tcase << TestAction.new(:End_Log_5_1_5_3) do
  6629. $myTestResult = checkLastExistResult
  6630.  
  6631. logStopTest("Store_Front_5_1_5_3")
  6632.  
  6633. waitsecond(0)
  6634. end
  6635.  
  6636. tcase << TestAction.new(:Start_Log_5_1_5_6) do
  6637. logStartTest("Store_Front_5_1_5_6")
  6638.  
  6639. waitsecond(0)
  6640. end
  6641.  
  6642. tcase << TestAction.new(:Click_Open) do
  6643. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 343626588).with('textdescid', -876702381).with('uniqueparentid', 488799519)
  6644. .with('uitreeindex', 14)
  6645. .with('classname', 'Button')
  6646. .with('text', 'OPEN')
  6647.  
  6648. $ruiObj.click
  6649.  
  6650. waitsecond(2)
  6651. end
  6652.  
  6653. tcase << TestAction.new(:wait_1) do
  6654. waitsecond(4)
  6655. end
  6656.  
  6657. tcase << TestAction.new(:Check_ColorNote) do
  6658. $ruiObj = RUIObject.new.with('objectid', 39336378).with('selfid', -1815503323).with('textdescid', -1889368720).with('uniqueparentid', 2031216929).with('classresourceid', 71951079)
  6659. .with('uitreeindex', 1)
  6660. .with('classname', 'TextView')
  6661. .with('resource-id', 'com.android.packageinstaller:id/permission_message')
  6662. .with('text', 'Allow ColorNote to access photos media and files on your device')
  6663.  
  6664. $ruiObj.isExist
  6665.  
  6666. waitsecond(2)
  6667. end
  6668.  
  6669. tcase << TestAction.new(:pressHome_10) do
  6670. pressHome
  6671.  
  6672. waitsecond(2)
  6673. end
  6674.  
  6675. tcase << TestAction.new(:End_Log_5_1_5_6) do
  6676. $myTestResult = checkLastExistResult
  6677.  
  6678. logStopTest("Store_Front_5_1_5_6")
  6679.  
  6680. waitsecond(0)
  6681. end
  6682.  
  6683. tcase << TestAction.new(:Start_Log_5_1_5_8) do
  6684. logStartTest("Store_Front_5_1_5_8")
  6685.  
  6686. waitsecond(0)
  6687. end
  6688.  
  6689. tcase << TestAction.new(:Play_Store_2) do
  6690. gotoAppPixel('Play Store')
  6691.  
  6692. waitsecond(2)
  6693. end
  6694.  
  6695. tcase << TestAction.new(:Click_Uninstall) do
  6696. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 1103650544).with('textdescid', 926077825).with('uniqueparentid', 488799519)
  6697. .with('uitreeindex', 10)
  6698. .with('classname', 'Button')
  6699. .with('text', 'UNINSTALL')
  6700.  
  6701. $ruiObj.click
  6702.  
  6703. waitsecond(2)
  6704. end
  6705.  
  6706. tcase << TestAction.new(:Confirm_Uninstall) do
  6707. $ruiObj = RUIObject.new.with('objectid', 1379336962).with('selfid', -1318451484).with('textdescid', -1993773146).with('uniqueparentid', -1645912444)
  6708. .with('uitreeindex', 2)
  6709. .with('classname', 'Button')
  6710. .with('resource-id', 'android:id/button1')
  6711. .with('text', 'OK')
  6712.  
  6713. $ruiObj.click
  6714.  
  6715. waitsecond(2)
  6716. end
  6717.  
  6718. tcase << TestAction.new(:Check_Install) do
  6719. $ruiObj = RUIObject.new.with('objectid', 1227366429).with('selfid', 998476585).with('textdescid', 915934888).with('uniqueparentid', -349714783)
  6720. .with('uitreeindex', 11)
  6721. .with('classname', 'Button')
  6722. .with('text', 'INSTALL')
  6723.  
  6724. $ruiObj.isExist
  6725.  
  6726. waitsecond(2)
  6727. end
  6728.  
  6729. tcase << TestAction.new(:End_Log_5_1_5_8) do
  6730. $myTestResult = checkLastExistResult
  6731.  
  6732. logStopTest("Store_Front_5_1_5_8")
  6733.  
  6734. waitsecond(0)
  6735. end
  6736.  
  6737. tcase << TestAction.new(:pressBack_14) do
  6738. pressBack
  6739.  
  6740. waitsecond(0)
  6741. end
  6742.  
  6743. tcase << TestAction.new(:pressBack_14_1) do
  6744. pressBack
  6745.  
  6746. waitsecond(0)
  6747. end
  6748.  
  6749. tcase << TestAction.new(:pressBack_14_1_1) do
  6750. pressBack
  6751.  
  6752. waitsecond(0)
  6753. end
  6754.  
  6755. tcase << TestAction.new(:pressHome_18) do
  6756. pressHome
  6757.  
  6758. waitsecond(0)
  6759. end
  6760.  
  6761. tcase.run(loopTime)
  6762.  
  6763. end
  6764.  
  6765. def self.Telephony_5_1_1_1(loopTime)
  6766.  
  6767. tcase = TestCase.new("Telephony_5_1_1_1")
  6768.  
  6769. tcase << TestAction.new(:Start_Log) do
  6770. logStartTest("Telephony_5_1_1_1")
  6771.  
  6772. waitsecond(0)
  6773. end
  6774.  
  6775. tcase << TestAction.new(:Phone) do
  6776. gotoAppPixel("Phone")
  6777.  
  6778. waitsecond(2)
  6779. end
  6780.  
  6781. tcase << TestAction.new(:Check_Send) do
  6782. $ruiObj = RUIObject.new.with('objectid', 633567).with('selfid', -361167454).with('textdescid', -433420335).with('uniqueparentid', -308205312)
  6783. .with('uitreeindex', 27)
  6784. .with('classname', 'ImageButton')
  6785. .with('resource-id', 'com.android.dialer:id/dialpad_floating_action_button')
  6786. .with('content-desc', 'dial')
  6787.  
  6788. $ruiObj.isExist
  6789. ifFailJumpTo(:Click_Search_Contacts)
  6790.  
  6791. waitsecond(2)
  6792. end
  6793.  
  6794. tcase << TestAction.new(:pressBack_7) do
  6795. pressBack
  6796.  
  6797. waitsecond(2)
  6798. end
  6799.  
  6800. tcase << TestAction.new(:Click_Search_Contacts) do
  6801. $ruiObj = RUIObject.new.with('objectid', -704390840).with('selfid', -1478003981).with('textdescid', 1372423649).with('uniqueparentid', -369013492)
  6802. .with('uitreeindex', 10)
  6803. .with('classname', 'TextView')
  6804. .with('resource-id', 'com.google.android.dialer:id/search_box_start_search')
  6805. .with('text', 'Search contacts places')
  6806.  
  6807. $ruiObj.click
  6808.  
  6809. waitsecond(2)
  6810. end
  6811.  
  6812. tcase << TestAction.new(:Input_Contact) do
  6813. $ruiObj = RUIObject.new.with('objectid', 497288161).with('selfid', 1558211317).with('textdescid', -1763936161).with('uniqueparentid', 1665093136)
  6814. .with('uitreeindex', 4)
  6815. .with('classname', 'EditText')
  6816. .with('resource-id', 'com.google.android.dialer:id/search_view')
  6817.  
  6818. $ruiObj.inputtext('A01 A01')
  6819.  
  6820. waitsecond(2)
  6821. end
  6822.  
  6823. tcase << TestAction.new(:Call_Contact) do
  6824. $ruiObj = RUIObject.new.with('objectid', 16812765).with('selfid', -1896714852).with('textdescid', 1407388027).with('uniqueparentid', 550790424).with('classresourceid', 496450640)
  6825. .with('uitreeindex', 2)
  6826. .with('classname', 'TextView')
  6827. .with('resource-id', 'com.google.android.dialer:id/cliv_label_textview')
  6828. .with('text', 'MOBILE')
  6829.  
  6830. $ruiObj.click
  6831.  
  6832. waitsecond(4)
  6833. end
  6834.  
  6835. tcase << TestAction.new(:Send_CMD_Answer) do
  6836. sendBTCmd("answerCall")
  6837.  
  6838. waitsecond(2)
  6839. end
  6840.  
  6841. tcase << TestAction.new(:Check_End_Button) do
  6842. $ruiObj = RUIObject.new.with('objectid', 2131066002).with('selfid', 279498384).with('textdescid', -733664719).with('uniqueparentid', -837339317)
  6843. .with('uitreeindex', 11)
  6844. .with('classname', 'ImageButton')
  6845. .with('resource-id', 'com.google.android.dialer:id/incall_end_call')
  6846. .with('content-desc', 'End call')
  6847.  
  6848. $ruiObj.isExist
  6849.  
  6850. waitsecond(0)
  6851. end
  6852.  
  6853. tcase << TestAction.new(:Click_End_Button) do
  6854. $ruiObj = RUIObject.new.with('objectid', 2131066002).with('selfid', 279498384).with('textdescid', -733664719).with('uniqueparentid', 1725432907)
  6855. .with('uitreeindex', 11)
  6856. .with('classname', 'ImageButton')
  6857. .with('resource-id', 'com.google.android.dialer:id/incall_end_call')
  6858. .with('content-desc', 'End call')
  6859.  
  6860. $ruiObj.click
  6861.  
  6862. waitsecond(2)
  6863. end
  6864.  
  6865. tcase << TestAction.new(:Send_CMD_End) do
  6866. sendBTCmd("endCall")
  6867.  
  6868. waitsecond(2)
  6869. end
  6870.  
  6871. tcase << TestAction.new(:End_Log) do
  6872. $myTestResult = checkLastExistResult
  6873.  
  6874. logStopTest("Telephony_5_1_1_1")
  6875.  
  6876. waitsecond(0)
  6877. end
  6878.  
  6879. tcase << TestAction.new(:pressBack_2) do
  6880. pressBack
  6881.  
  6882. waitsecond(2)
  6883. end
  6884.  
  6885. tcase << TestAction.new(:pressBack_2_1) do
  6886. pressBack
  6887.  
  6888. waitsecond(2)
  6889. end
  6890.  
  6891. tcase.run(loopTime)
  6892.  
  6893. end
  6894.  
  6895. def self.Telephony_5_1_1_3(loopTime)
  6896.  
  6897. tcase = TestCase.new("Telephony_5_1_1_3")
  6898.  
  6899. tcase << TestAction.new(:Start_Log) do
  6900. logStartTest("Telephony_5_1_1_3")
  6901.  
  6902. waitsecond(2)
  6903. end
  6904.  
  6905. tcase << TestAction.new(:Phone) do
  6906. gotoAppPixel("Phone")
  6907.  
  6908. waitsecond(2)
  6909. end
  6910.  
  6911. tcase << TestAction.new(:Check_Send) do
  6912. $ruiObj = RUIObject.new.with('objectid', 633567).with('selfid', -361167454).with('textdescid', -433420335).with('uniqueparentid', -308205312)
  6913. .with('uitreeindex', 27)
  6914. .with('classname', 'ImageButton')
  6915. .with('resource-id', 'com.android.dialer:id/dialpad_floating_action_button')
  6916. .with('content-desc', 'dial')
  6917.  
  6918. $ruiObj.isExist
  6919. ifFailJumpTo(:Click_History)
  6920.  
  6921. waitsecond(2)
  6922. end
  6923.  
  6924. tcase << TestAction.new(:pressBack_4) do
  6925. pressBack
  6926.  
  6927. waitsecond(2)
  6928. end
  6929.  
  6930. tcase << TestAction.new(:Click_History) do
  6931. $ruiObj = RUIObject.new.with('objectid', 1729076897).with('selfid', 1544291637).with('textdescid', 126528520).with('uniqueparentid', -905047454)
  6932. .with('uitreeindex', 1)
  6933. .with('classname', 'ImageView')
  6934. .with('resource-id', 'com.android.dialer:id/icon')
  6935. .with('content-desc', 'Call History tab.')
  6936.  
  6937. $ruiObj.click
  6938.  
  6939. waitsecond(2)
  6940. end
  6941.  
  6942. tcase << TestAction.new(:Call_A01_A01) do
  6943. $ruiObj = RUIObject.new.with('objectid', -275416008).with('selfid', 1173845123).with('textdescid', 500493226).with('uniqueparentid', -5887122)
  6944. .with('uitreeindex', 9)
  6945. .with('classname', 'ImageView')
  6946. .with('resource-id', 'com.android.dialer:id/primary_action_button')
  6947. .with('content-desc', 'Call A01 A01')
  6948.  
  6949. $ruiObj.click
  6950.  
  6951. waitsecond(8)
  6952. end
  6953.  
  6954. tcase << TestAction.new(:Send_CMD_Answer) do
  6955. sendBTCmd("answerCall")
  6956.  
  6957. waitsecond(2)
  6958. end
  6959.  
  6960. tcase << TestAction.new(:Check_End) do
  6961. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', -1050162627)
  6962. .with('uitreeindex', 13)
  6963. .with('classname', 'ImageButton')
  6964. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  6965. .with('content-desc', 'End call')
  6966.  
  6967. $ruiObj.isExist
  6968.  
  6969. waitsecond(0)
  6970. end
  6971.  
  6972. tcase << TestAction.new(:Click_End) do
  6973. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', 0)
  6974. .with('uitreeindex', 13)
  6975. .with('classname', 'ImageButton')
  6976. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  6977. .with('content-desc', 'End call')
  6978.  
  6979. $ruiObj.click
  6980.  
  6981. waitsecond(2)
  6982. end
  6983.  
  6984. tcase << TestAction.new(:scriptAction_2) do
  6985. sendBTCmd("endCall")
  6986.  
  6987. waitsecond(2)
  6988. end
  6989.  
  6990. tcase << TestAction.new(:End_Log) do
  6991. $myTestResult = checkLastExistResult
  6992.  
  6993. logStopTest("Telephony_5_1_1_3")
  6994.  
  6995. waitsecond(2)
  6996. end
  6997.  
  6998. tcase << TestAction.new(:pressBack_6) do
  6999. pressBack
  7000.  
  7001. waitsecond(2)
  7002. end
  7003.  
  7004. tcase << TestAction.new(:pressBack_6_1) do
  7005. pressBack
  7006.  
  7007. waitsecond(2)
  7008. end
  7009.  
  7010. tcase.run(loopTime)
  7011.  
  7012. end
  7013.  
  7014. def self.Telephony_5_1_1_5(loopTime)
  7015.  
  7016. tcase = TestCase.new("Telephony_5_1_1_5")
  7017.  
  7018. tcase << TestAction.new(:Start_Log) do
  7019. logStartTest("Telephony_5_1_1_5")
  7020.  
  7021. waitsecond(0)
  7022. end
  7023.  
  7024. tcase << TestAction.new(:Settings) do
  7025. gotoSettings
  7026.  
  7027. waitsecond(2)
  7028. end
  7029.  
  7030. tcase << TestAction.new(:Click_Network) do
  7031. $ruiObj = RUIObject.new.with('objectid', -1980252617).with('selfid', 1379611054).with('textdescid', 223764122).with('uniqueparentid', 1077985656)
  7032. .with('uitreeindex', 16)
  7033. .with('classname', 'TextView')
  7034. .with('resource-id', 'android:id/title')
  7035. .with('text', 'Network Internet')
  7036.  
  7037. $ruiObj.click
  7038.  
  7039. waitsecond(2)
  7040. end
  7041.  
  7042. tcase << TestAction.new(:Click_Mobile_Network) do
  7043. $ruiObj = RUIObject.new.with('objectid', 1887322852).with('selfid', -194627727).with('textdescid', -38060012).with('uniqueparentid', -1915761805)
  7044. .with('uitreeindex', 10)
  7045. .with('classname', 'TextView')
  7046. .with('resource-id', 'android:id/title')
  7047. .with('text', 'Mobile network')
  7048.  
  7049. $ruiObj.click
  7050.  
  7051. waitsecond(2)
  7052. end
  7053.  
  7054. tcase << TestAction.new(:Click_Preferred) do
  7055. $ruiObj = RUIObject.new.with('objectid', 559310926).with('selfid', 517165292).with('textdescid', 482560099).with('uniqueparentid', -1016225766).with('classresourceid', 490183159)
  7056. .with('uitreeindex', 5)
  7057. .with('classname', 'TextView')
  7058. .with('resource-id', 'android:id/title')
  7059. .with('text', 'Preferred network type')
  7060.  
  7061. $ruiObj.click
  7062.  
  7063. waitsecond(2)
  7064. end
  7065.  
  7066. tcase << TestAction.new(:Click_LTE_TMUS) do
  7067. $ruiObj = RUIObject.new.with('objectid', -442050023).with('selfid', 1679268164).with('textdescid', 1652493263).with('uniqueparentid', -990483570).with('classresourceid', 2074814108)
  7068. .with('uitreeindex', 2)
  7069. .with('classname', 'CheckedTextView')
  7070. .with('resource-id', 'android:id/text1')
  7071. .with('text', 'LTE recommended')
  7072.  
  7073. $ruiObj.click
  7074.  
  7075. waitsecond(2)
  7076. end
  7077.  
  7078. tcase << TestAction.new(:Click_LTE_VZW) do
  7079. $ruiObj = RUIObject.new.with('objectid', -442050023).with('selfid', -196746481).with('textdescid', 587737118).with('uniqueparentid', 9112671).with('classresourceid', 2074814108)
  7080. .with('uitreeindex', 4)
  7081. .with('classname', 'CheckedTextView')
  7082. .with('resource-id', 'android:id/text1')
  7083. .with('text', 'LTE GSM UMTS')
  7084.  
  7085. $ruiObj.click
  7086.  
  7087. waitsecond(2)
  7088. end
  7089.  
  7090. tcase << TestAction.new(:Send_CMD_Phone) do
  7091. sendBTCmd("gotoApp('Phone')")
  7092.  
  7093. waitsecond(2)
  7094. end
  7095.  
  7096. tcase << TestAction.new(:Send_CMD_Click_Dialer) do
  7097. sendBTCmd("RUIObject.new.with('classname', 'TextView').with('text', 'Dial').click")
  7098.  
  7099. waitsecond(2)
  7100. end
  7101.  
  7102. tcase << TestAction.new(:Send_CMD_Input_DB) do
  7103. sendBTCmd("RUIObject.new.with('classname', 'EditText').inputtext('#{db('CallNumber')[0]}')")
  7104.  
  7105. waitsecond(2)
  7106. end
  7107.  
  7108. tcase << TestAction.new(:Send_CMD_Call) do
  7109. sendBTCmd("RUIObject.new.with('classname', 'ImageButton').with('content-desc', 'Call').click")
  7110.  
  7111. waitsecond(8)
  7112. end
  7113.  
  7114. tcase << TestAction.new(:Refresh) do
  7115. refreshScreen
  7116.  
  7117. waitsecond(2)
  7118. end
  7119.  
  7120. tcase << TestAction.new(:Answer_Call) do
  7121. click(1048.5,409.5)
  7122.  
  7123. waitsecond(8)
  7124. end
  7125.  
  7126. tcase << TestAction.new(:Check_End) do
  7127. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', -909340709)
  7128. .with('uitreeindex', 13)
  7129. .with('classname', 'ImageButton')
  7130. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  7131. .with('content-desc', 'End call')
  7132.  
  7133. $ruiObj.isExist
  7134.  
  7135. waitsecond(0)
  7136. end
  7137.  
  7138. tcase << TestAction.new(:Click_End) do
  7139. $ruiObj = RUIObject.new.with('objectid', -1474401675).with('selfid', 714657135).with('textdescid', -724844434).with('uniqueparentid', -909340709)
  7140. .with('uitreeindex', 13)
  7141. .with('classname', 'ImageButton')
  7142. .with('resource-id', 'com.android.dialer:id/incall_end_call')
  7143. .with('content-desc', 'End call')
  7144.  
  7145. $ruiObj.click
  7146.  
  7147. waitsecond(2)
  7148. end
  7149.  
  7150. tcase << TestAction.new(:Send_CMD_End) do
  7151. sendBTCmd("endCall")
  7152.  
  7153. waitsecond(2)
  7154. end
  7155.  
  7156. tcase << TestAction.new(:Stop_Log) do
  7157. $myTestResult = checkLastExistResult
  7158.  
  7159. logStopTest("Telephony_5_1_1_5")
  7160.  
  7161. waitsecond(0)
  7162. end
  7163.  
  7164. tcase << TestAction.new(:pressBack_2) do
  7165. pressBack
  7166.  
  7167. waitsecond(2)
  7168. end
  7169.  
  7170. tcase << TestAction.new(:pressBack_2_1) do
  7171. pressBack
  7172.  
  7173. waitsecond(2)
  7174. end
  7175.  
  7176. tcase.run(loopTime)
  7177.  
  7178. end
  7179.  
  7180. def self.Telephony_5_1_1_6_7(loopTime)
  7181.  
  7182. tcase = TestCase.new("Telephony_5_1_1_6_7")
  7183.  
  7184. tcase << TestAction.new(:scriptAction_2) do
  7185. logStartTest("Telephony_5_1_1_7")
  7186.  
  7187. waitsecond(0)
  7188. end
  7189.  
  7190. tcase << TestAction.new(:scriptAction_1) do
  7191. gotoAppPixel("Phone")
  7192.  
  7193. waitsecond(2)
  7194. end
  7195.  
  7196. tcase << TestAction.new(:ImageView_Icon_29) do
  7197. $ruiObj = RUIObject.new.with('objectid', 1729076897).with('selfid', -1616608746).with('textdescid', -1107521081).with('uniqueparentid', -1902824159)
  7198. .with('uitreeindex', 2)
  7199. .with('classname', 'ImageView')
  7200. .with('resource-id', 'com.android.dialer:id/icon')
  7201. .with('content-desc', 'Contacts tab.')
  7202.  
  7203. $ruiObj.click
  7204.  
  7205. waitsecond(2)
  7206. end
  7207.  
  7208. tcase << TestAction.new(:ImageButton_FloatingActionButton_41) do
  7209. $ruiObj = RUIObject.new.with('objectid', -563620762).with('selfid', 586481042).with('textdescid', 1205026070).with('uniqueparentid', -529133278)
  7210. .with('uitreeindex', 28)
  7211. .with('classname', 'ImageButton')
  7212. .with('resource-id', 'com.android.dialer:id/floating_action_button')
  7213. .with('content-desc', 'Create new contact')
  7214.  
  7215. $ruiObj.click
  7216.  
  7217. waitsecond(2)
  7218. end
  7219.  
  7220. tcase << TestAction.new(:EditText_6) do
  7221. $ruiObj = RUIObject.new.with('objectid', 819811840).with('selfid', 1666676343).with('textdescid', -355636704).with('uniqueparentid', 1682676351).with('classresourceid', 1666676343)
  7222. .with('uitreeindex', 12)
  7223. .with('pretext', 'lgeqcttest4gmailcom?0')
  7224. .with('classname', 'EditText')
  7225.  
  7226. $ruiObj.inputtext('tn tn')
  7227.  
  7228. waitsecond(2)
  7229. end
  7230.  
  7231. tcase << TestAction.new(:ImageView_KindIcon_18) do
  7232. $ruiObj = RUIObject.new.with('objectid', 1187803482).with('selfid', 565066917).with('textdescid', -854093455).with('uniqueparentid', 833678705).with('classresourceid', -301662486)
  7233. .with('uitreeindex', 11)
  7234. .with('classname', 'ImageView')
  7235. .with('resource-id', 'com.google.android.contacts:id/kind_icon')
  7236. .with('content-desc', 'Name')
  7237.  
  7238. $ruiObj.click
  7239.  
  7240. waitsecond(2)
  7241. end
  7242.  
  7243. tcase << TestAction.new(:EditText_20) do
  7244. $ruiObj = RUIObject.new.with('objectid', 819811840).with('selfid', 1666676343).with('textdescid', -355636704).with('uniqueparentid', 301757543).with('classresourceid', 1666676343)
  7245. .with('uitreeindex', 16)
  7246. .with('pretext', 'lgeqcttest4gmailcom?2')
  7247. .with('classname', 'EditText')
  7248.  
  7249. $ruiObj.inputtext('0000000000')
  7250.  
  7251. waitsecond(2)
  7252. end
  7253.  
  7254. tcase << TestAction.new(:Button_EditorMenuSaveButton_22) do
  7255. $ruiObj = RUIObject.new.with('objectid', -1708784447).with('selfid', -1130240991).with('textdescid', -1687078364).with('uniqueparentid', 2006790125)
  7256. .with('uitreeindex', 2)
  7257. .with('classname', 'Button')
  7258. .with('resource-id', 'com.google.android.contacts:id/editor_menu_save_button')
  7259. .with('text', 'SAVE')
  7260.  
  7261. $ruiObj.isExist
  7262.  
  7263. waitsecond(0)
  7264. end
  7265.  
  7266. tcase << TestAction.new(:Button_EditorMenuSaveButton_22_1) do
  7267. $ruiObj = RUIObject.new.with('objectid', -1708784447).with('selfid', -1130240991).with('textdescid', -1687078364).with('uniqueparentid', 2006790125)
  7268. .with('uitreeindex', 2)
  7269. .with('classname', 'Button')
  7270. .with('resource-id', 'com.google.android.contacts:id/editor_menu_save_button')
  7271. .with('text', 'SAVE')
  7272.  
  7273. $ruiObj.click
  7274.  
  7275. waitsecond(2)
  7276. end
  7277.  
  7278. tcase << TestAction.new(:scriptAction_4) do
  7279. logStopTest("Telephony_5_1_1_7")
  7280.  
  7281. waitsecond(0)
  7282. end
  7283.  
  7284. tcase << TestAction.new(:scriptAction_2_1) do
  7285. logStartTest("Telephony_5_1_1_6")
  7286.  
  7287. waitsecond(0)
  7288. end
  7289.  
  7290. tcase << TestAction.new(:scriptAction_12) do
  7291. gotoAppPixel("Phone")
  7292.  
  7293. waitsecond(2)
  7294. end
  7295.  
  7296. tcase << TestAction.new(:ImageView_Icon_3) do
  7297. $ruiObj = RUIObject.new.with('objectid', 1729076897).with('selfid', -1616608746).with('textdescid', -1107521081).with('uniqueparentid', -1902824159)
  7298. .with('uitreeindex', 2)
  7299. .with('classname', 'ImageView')
  7300. .with('resource-id', 'com.android.dialer:id/icon')
  7301. .with('content-desc', 'Contacts tab.')
  7302.  
  7303. $ruiObj.click
  7304.  
  7305. waitsecond(2)
  7306. end
  7307.  
  7308. tcase << TestAction.new(:TextView_SearchBoxStartSearch_5) do
  7309. $ruiObj = RUIObject.new.with('objectid', 923652289).with('selfid', -1151038352).with('textdescid', 1007284052).with('uniqueparentid', 183054914)
  7310. .with('uitreeindex', 30)
  7311. .with('classname', 'TextView')
  7312. .with('resource-id', 'com.android.dialer:id/search_box_start_search')
  7313. .with('text', 'Search contacts')
  7314.  
  7315. $ruiObj.click
  7316.  
  7317. waitsecond(2)
  7318. end
  7319.  
  7320. tcase << TestAction.new(:EditText_SearchView_9) do
  7321. $ruiObj = RUIObject.new.with('objectid', 633166156).with('selfid', -1518126622).with('textdescid', -1846685612).with('uniqueparentid', 1793823206)
  7322. .with('uitreeindex', 1)
  7323. .with('classname', 'EditText')
  7324. .with('resource-id', 'com.android.dialer:id/search_view')
  7325.  
  7326. $ruiObj.inputtext('tn tn')
  7327.  
  7328. waitsecond(2)
  7329. end
  7330.  
  7331. tcase << TestAction.new(:clickXY_117_441_17) do
  7332. click(117,441)
  7333.  
  7334. waitsecond(2)
  7335. end
  7336.  
  7337. tcase << TestAction.new(:ImageButton_More_19) do
  7338. $ruiObj = RUIObject.new.with('objectid', 1906984818).with('selfid', 1290820192).with('textdescid', 1695157921).with('uniqueparentid', 1370851987)
  7339. .with('uitreeindex', 6)
  7340. .with('classname', 'ImageButton')
  7341. .with('content-desc', 'More options')
  7342.  
  7343. $ruiObj.click
  7344.  
  7345. waitsecond(2)
  7346. end
  7347.  
  7348. tcase << TestAction.new(:TextView_Title_21) do
  7349. $ruiObj = RUIObject.new.with('objectid', -374621661).with('selfid', -342341268).with('textdescid', -931837256).with('uniqueparentid', 749545879).with('classresourceid', 490183159)
  7350. .with('uitreeindex', 1)
  7351. .with('classname', 'TextView')
  7352. .with('resource-id', 'android:id/title')
  7353. .with('text', 'Delete')
  7354.  
  7355. $ruiObj.click
  7356.  
  7357. waitsecond(2)
  7358. end
  7359.  
  7360. tcase << TestAction.new(:Button_Button1_23) do
  7361. $ruiObj = RUIObject.new.with('objectid', 1890289855).with('selfid', 982364851).with('textdescid', 319664500).with('uniqueparentid', 864646072).with('classresourceid', 1834539358)
  7362. .with('uitreeindex', 3)
  7363. .with('classname', 'Button')
  7364. .with('resource-id', 'android:id/button1')
  7365. .with('text', 'DELETE')
  7366.  
  7367. $ruiObj.isExist
  7368.  
  7369. waitsecond(0)
  7370. end
  7371.  
  7372. tcase << TestAction.new(:Button_Button1_23_1) do
  7373. $ruiObj = RUIObject.new.with('objectid', 1890289855).with('selfid', 982364851).with('textdescid', 319664500).with('uniqueparentid', 864646072).with('classresourceid', 1834539358)
  7374. .with('uitreeindex', 3)
  7375. .with('classname', 'Button')
  7376. .with('resource-id', 'android:id/button1')
  7377. .with('text', 'DELETE')
  7378.  
  7379. $ruiObj.click
  7380.  
  7381. waitsecond(2)
  7382. end
  7383.  
  7384. tcase << TestAction.new(:scriptAction_4_1) do
  7385. logStopTest("Telephony_5_1_1_6")
  7386.  
  7387. waitsecond(0)
  7388. end
  7389.  
  7390. tcase.run(loopTime)
  7391.  
  7392. end
  7393.  
  7394. def self.startTest(loopTime)
  7395.  
  7396. tcase = TestCase.new("startTest")
  7397.  
  7398. tcase << TestAction.new(:blankaction) do
  7399. waitsecond(0)
  7400. end
  7401.  
  7402. tcase.run(loopTime)
  7403.  
  7404. end
  7405.  
  7406. def self.WiFi_5_1_10_1(loopTime)
  7407.  
  7408. tcase = TestCase.new("WiFi_5_1_10_1")
  7409.  
  7410. tcase << TestAction.new(:logstart) do
  7411. logStartTest("05_01_10_01_WiFi")
  7412.  
  7413. waitsecond(0)
  7414. end
  7415.  
  7416. tcase << TestAction.new(:swipenotification) do
  7417. swipe(720,18,720,1881,100)
  7418.  
  7419. waitsecond(2)
  7420. end
  7421.  
  7422. tcase << TestAction.new(:clickwifi) do
  7423. $ruiObj = RUIObject.new.with('objectid', 507839883).with('selfid', -359220911).with('textdescid', 672961582).with('uniqueparentid', 848298487)
  7424. .with('classname', 'Switch')
  7425. .with('content-desc', 'Wi-Fi,')
  7426. .with('text', 'Off')
  7427.  
  7428. $ruiObj.longClick
  7429.  
  7430. waitsecond(2)
  7431. end
  7432.  
  7433. tcase << TestAction.new(:ifwifiison_turnoffwifi) do
  7434. $WiFiOn= RUIObject.new.with('objectid', -312510337).with('selfid', 1955659484).with('textdescid', -940514592).with('uniqueparentid', 2062568066)
  7435. .with('uitreeindex', 3)
  7436. .with('classname', 'TextView')
  7437. .with('resource-id', 'com.android.settings:id/switch_text')
  7438. .with('text', 'On')
  7439.  
  7440. if $WiFiOn.isExist
  7441. RUIObject.new.with('objectid', 1169510804).with('selfid', -1921366703).with('textdescid', -522574443).with('uniqueparentid', 2062568066)
  7442. .with('uitreeindex', 4)
  7443. .with('classname', 'Switch')
  7444. .with('resource-id', 'com.android.settings:id/switch_widget')
  7445. .with('text', 'ON').click
  7446. end
  7447.  
  7448. waitsecond(2)
  7449. end
  7450.  
  7451. tcase << TestAction.new(:TurnOnWifi) do
  7452. $ruiObj = RUIObject.new.with('objectid', 1169510804).with('selfid', -1921366703).with('textdescid', -522574443).with('uniqueparentid', 2062568066)
  7453. .with('uitreeindex', 4)
  7454. .with('classname', 'Switch')
  7455. .with('resource-id', 'com.android.settings:id/switch_widget')
  7456. .with('text', 'ON')
  7457.  
  7458. $ruiObj.click
  7459.  
  7460. waitsecond(2)
  7461. end
  7462.  
  7463. tcase << TestAction.new(:wait10second_4) do
  7464. waitsecond(10)
  7465. end
  7466.  
  7467. tcase << TestAction.new(:ON_Exist) do
  7468. $ruiObj = RUIObject.new.with('objectid', -312510337).with('selfid', 1955659484).with('textdescid', -940514592).with('uniqueparentid', 2062568066)
  7469. .with('uitreeindex', 2)
  7470. .with('classname', 'TextView')
  7471. .with('resource-id', 'com.android.settings:id/switch_text')
  7472. .with('text', 'On')
  7473.  
  7474. $ruiObj.isExist
  7475.  
  7476. waitsecond(0)
  7477. end
  7478.  
  7479. tcase << TestAction.new(:TurnoffWifi) do
  7480. $ruiObj = RUIObject.new.with('objectid', 1169510804).with('selfid', -1921366703).with('textdescid', -522574443).with('uniqueparentid', 2062568066)
  7481. .with('uitreeindex', 3)
  7482. .with('classname', 'Switch')
  7483. .with('resource-id', 'com.android.settings:id/switch_widget')
  7484. .with('text', 'ON')
  7485.  
  7486. $ruiObj.click
  7487.  
  7488. waitsecond(2)
  7489. end
  7490.  
  7491. tcase << TestAction.new(:stoplog) do
  7492. $myTestResult = checkLastExistResult
  7493.  
  7494. if $myTestResult == false
  7495. $myFailReason = "WiFi cannot turn ON"
  7496. end
  7497. logStopTest("05_01_10_01_WiFi")
  7498.  
  7499.  
  7500. waitsecond(0)
  7501. end
  7502.  
  7503. tcase << TestAction.new(:pressBack_8) do
  7504. pressBack
  7505.  
  7506. waitsecond(0)
  7507. end
  7508.  
  7509. tcase << TestAction.new(:pressBack_9) do
  7510. pressBack
  7511.  
  7512. waitsecond(0)
  7513. end
  7514.  
  7515. tcase << TestAction.new(:pressBack_10) do
  7516. pressBack
  7517.  
  7518. waitsecond(0)
  7519. end
  7520.  
  7521. tcase << TestAction.new(:pressBack_11) do
  7522. pressBack
  7523.  
  7524. waitsecond(0)
  7525. end
  7526.  
  7527. tcase << TestAction.new(:pressHome_12) do
  7528. pressHome
  7529.  
  7530. waitsecond(0)
  7531. end
  7532.  
  7533. tcase.run(loopTime)
  7534.  
  7535. end
  7536.  
  7537. def self.WiFi_5_1_10_2(loopTime)
  7538.  
  7539. tcase = TestCase.new("WiFi_5_1_10_2")
  7540.  
  7541. tcase << TestAction.new(:logstart) do
  7542. logStartTest("05_01_10_02_WiFi")
  7543.  
  7544. waitsecond(0)
  7545. end
  7546.  
  7547. tcase << TestAction.new(:swipenotification_1) do
  7548. swipe(720,18,720,1881,100)
  7549.  
  7550. waitsecond(2)
  7551. end
  7552.  
  7553. tcase << TestAction.new(:clickwifi) do
  7554. $ruiObj = RUIObject.new.with('objectid', 507839883).with('selfid', -427229763).with('textdescid', 991539940).with('uniqueparentid', -1358108677)
  7555. .with('classname', 'Switch')
  7556. .with('content-desc', 'Wi-Fi,')
  7557. .with('text', 'On')
  7558.  
  7559. $ruiObj.longClick
  7560.  
  7561. waitsecond(2)
  7562. end
  7563.  
  7564. tcase << TestAction.new(:ifwifiison_turnoffwifi) do
  7565. $WiFiOn= RUIObject.new.with('objectid', -312510337).with('selfid', 1955659484).with('textdescid', -940514592).with('uniqueparentid', 2062568066)
  7566. .with('uitreeindex', 3)
  7567. .with('classname', 'TextView')
  7568. .with('resource-id', 'com.android.settings:id/switch_text')
  7569. .with('text', 'On')
  7570.  
  7571. if $WiFiOn.isExist
  7572. RUIObject.new.with('objectid', 1169510804).with('selfid', -1921366703).with('textdescid', -522574443).with('uniqueparentid', 2062568066)
  7573. .with('uitreeindex', 4)
  7574. .with('classname', 'Switch')
  7575. .with('resource-id', 'com.android.settings:id/switch_widget')
  7576. .with('text', 'ON').click
  7577. end
  7578.  
  7579. waitsecond(2)
  7580. end
  7581.  
  7582. tcase << TestAction.new(:TurnOnWifi) do
  7583. $ruiObj = RUIObject.new.with('objectid', 1169510804).with('selfid', -1921366703).with('textdescid', -522574443).with('uniqueparentid', 2062568066)
  7584. .with('uitreeindex', 4)
  7585. .with('classname', 'Switch')
  7586. .with('resource-id', 'com.android.settings:id/switch_widget')
  7587. .with('text', 'ON')
  7588.  
  7589. $ruiObj.click
  7590.  
  7591. waitsecond(2)
  7592. end
  7593.  
  7594. tcase << TestAction.new(:wait5second_4) do
  7595. waitsecond(5)
  7596. end
  7597.  
  7598. tcase << TestAction.new(:clickMTBFATT24GHZ) do
  7599. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', -2006843326).with('textdescid', 445555028).with('uniqueparentid', -1447642125)
  7600. .with('uitreeindex', 21)
  7601. .with('classname', 'TextView')
  7602. .with('resource-id', 'android:id/title')
  7603. .with('text', 'MTBFATT24Ghz')
  7604.  
  7605. $ruiObj.click
  7606.  
  7607. waitsecond(2)
  7608. end
  7609.  
  7610. tcase << TestAction.new(:putpassword) do
  7611. $ruiObj = RUIObject.new.with('objectid', 780695774).with('selfid', 8195995).with('textdescid', -1568234750).with('uniqueparentid', -1143128344).with('classresourceid', 1413676103)
  7612. .with('uitreeindex', 2)
  7613. .with('classname', 'EditText')
  7614. .with('resource-id', 'com.android.settings:id/password')
  7615.  
  7616. $ruiObj.inputtext('12abcdef34')
  7617.  
  7618. waitsecond(2)
  7619. end
  7620.  
  7621. tcase << TestAction.new(:pressEnter_13) do
  7622. pressEnter
  7623.  
  7624. waitsecond(2)
  7625. end
  7626.  
  7627. tcase << TestAction.new(:wait5second_15) do
  7628. waitsecond(5)
  7629. end
  7630.  
  7631. tcase << TestAction.new(:ifwifionexist) do
  7632. $ruiObj = RUIObject.new.with('objectid', -312510337).with('selfid', 1955659484).with('textdescid', -940514592).with('uniqueparentid', 2062568066)
  7633. .with('uitreeindex', 1)
  7634. .with('classname', 'TextView')
  7635. .with('resource-id', 'com.android.settings:id/switch_text')
  7636. .with('text', 'On')
  7637.  
  7638. $ruiObj.isExist
  7639.  
  7640. waitsecond(2)
  7641. end
  7642.  
  7643. tcase << TestAction.new(:gotowifisetting) do
  7644. $ruiObj = RUIObject.new.with('objectid', 1540349781).with('selfid', -2006843326).with('textdescid', 445555028).with('uniqueparentid', 589819388)
  7645. .with('uitreeindex', 6)
  7646. .with('classname', 'TextView')
  7647. .with('resource-id', 'android:id/title')
  7648. .with('text', 'MTBFATT24Ghz')
  7649.  
  7650. $ruiObj.click
  7651.  
  7652. waitsecond(2)
  7653. end
  7654.  
  7655. tcase << TestAction.new(:disconnectwifi) do
  7656. $ruiObj = RUIObject.new.with('objectid', 699987448).with('selfid', 2030417820).with('textdescid', 281870763).with('uniqueparentid', -1500304950)
  7657. .with('uitreeindex', 4)
  7658. .with('classname', 'Button')
  7659. .with('resource-id', 'com.android.settings:id/left_button')
  7660. .with('text', 'FORGET')
  7661.  
  7662. $ruiObj.click
  7663.  
  7664. waitsecond(2)
  7665. end
  7666.  
  7667. tcase << TestAction.new(:stoplog) do
  7668. $myTestResult = checkLastExistResult
  7669.  
  7670. if $myTestResult == false
  7671. $myFailReason == "WiFi cannot connected"
  7672. end
  7673. logStopTest("05_01_10_02_WiFi")
  7674.  
  7675.  
  7676. waitsecond(0)
  7677. end
  7678.  
  7679. tcase << TestAction.new(:pressBack_8) do
  7680. pressBack
  7681.  
  7682. waitsecond(0)
  7683. end
  7684.  
  7685. tcase << TestAction.new(:pressBack_9) do
  7686. pressBack
  7687.  
  7688. waitsecond(0)
  7689. end
  7690.  
  7691. tcase << TestAction.new(:pressBack_10) do
  7692. pressBack
  7693.  
  7694. waitsecond(0)
  7695. end
  7696.  
  7697. tcase << TestAction.new(:pressBack_11) do
  7698. pressBack
  7699.  
  7700. waitsecond(0)
  7701. end
  7702.  
  7703. tcase << TestAction.new(:pressHome_12) do
  7704. pressHome
  7705.  
  7706. waitsecond(0)
  7707. end
  7708.  
  7709. tcase.run(loopTime)
  7710.  
  7711. end
  7712.  
  7713. def self.Multimedia_5_1_7_4(loopTime)
  7714.  
  7715. tcase = TestCase.new("Multimedia_5_1_7_4")
  7716.  
  7717. tcase << TestAction.new(:logstart) do
  7718. logStartTest("05_01_07_04_MultiMedia")
  7719.  
  7720. waitsecond(0)
  7721. end
  7722.  
  7723. tcase << TestAction.new(:scriptAction_2) do
  7724. gotoAppPixel("Camera")
  7725.  
  7726. waitsecond(2)
  7727. end
  7728.  
  7729. tcase << TestAction.new(:clickcamera) do
  7730. $ruiObj = RUIObject.new.with('objectid', 1308773867).with('selfid', -690989467).with('textdescid', 1917284245).with('uniqueparentid', -149577887)
  7731. .with('uitreeindex', 12)
  7732. .with('classname', 'ImageView')
  7733. .with('resource-id', 'com.google.android.GoogleCamera:id/smooth_rotate_photo_switch_icon')
  7734.  
  7735. $ruiObj.click
  7736.  
  7737. waitsecond(2)
  7738. end
  7739.  
  7740. tcase << TestAction.new(:takeaphoto) do
  7741. $ruiObj = RUIObject.new.with('objectid', 897368612).with('selfid', -2009867863).with('textdescid', -1833878127).with('uniqueparentid', 1343212356)
  7742. .with('uitreeindex', 16)
  7743. .with('classname', 'ImageButton')
  7744. .with('resource-id', 'com.google.android.GoogleCamera:id/shutter_button')
  7745. .with('content-desc', 'Shutter')
  7746.  
  7747. $ruiObj.click
  7748.  
  7749. waitsecond(2)
  7750. end
  7751.  
  7752. tcase << TestAction.new(:shutterbuttonexist) do
  7753. $ruiObj = RUIObject.new.with('objectid', 897368612).with('selfid', -2009867863).with('textdescid', -1833878127).with('uniqueparentid', 1343212356)
  7754. .with('uitreeindex', 16)
  7755. .with('classname', 'ImageButton')
  7756. .with('resource-id', 'com.google.android.GoogleCamera:id/shutter_button')
  7757. .with('content-desc', 'Shutter')
  7758.  
  7759. $ruiObj.isExist
  7760.  
  7761. waitsecond(0)
  7762. end
  7763.  
  7764. tcase << TestAction.new(:logstop) do
  7765. $myTestResult = checkLastExistResult
  7766.  
  7767. if $myTestResult == false
  7768. $myFailReason == "Take picture FAILED"
  7769. end
  7770. logStopTest("05_01_07_04_MultiMedia")
  7771.  
  7772.  
  7773. waitsecond(0)
  7774. end
  7775.  
  7776. tcase << TestAction.new(:pressBack_8) do
  7777. pressBack
  7778.  
  7779. waitsecond(0)
  7780. end
  7781.  
  7782. tcase << TestAction.new(:pressHome_9) do
  7783. pressHome
  7784.  
  7785. waitsecond(0)
  7786. end
  7787.  
  7788. tcase.run(loopTime)
  7789.  
  7790. end
  7791.  
  7792. def self.Multimedia_5_1_7_2(loopTime)
  7793.  
  7794. tcase = TestCase.new("Multimedia_5_1_7_2")
  7795.  
  7796. tcase << TestAction.new(:logstart) do
  7797. logStartTest("05_01_07_02_MultiMedia")
  7798.  
  7799. waitsecond(0)
  7800. end
  7801.  
  7802. tcase << TestAction.new(:gotophotos) do
  7803. gotoAppPixel("Photos")
  7804.  
  7805. waitsecond(2)
  7806. end
  7807.  
  7808. tcase << TestAction.new(:Switch_AutoBackupSwitch_2) do
  7809. $ruiObj = RUIObject.new.with('objectid', 1900129037).with('selfid', 1682285764).with('textdescid', 1396382350).with('uniqueparentid', -1851031688).with('classresourceid', -402277641)
  7810. .with('uitreeindex', 2)
  7811. .with('classname', 'Switch')
  7812. .with('resource-id', 'com.google.android.apps.photos:id/auto_backup_switch')
  7813. .with('text', 'ON')
  7814.  
  7815. $ruiObj.click
  7816.  
  7817. waitsecond(2)
  7818. end
  7819.  
  7820. tcase << TestAction.new(:Button_DoneButton_7) do
  7821. $ruiObj = RUIObject.new.with('objectid', 1857204703).with('selfid', -544460817).with('textdescid', -1623853219).with('uniqueparentid', -1190962124)
  7822. .with('uitreeindex', 9)
  7823. .with('classname', 'Button')
  7824. .with('resource-id', 'com.google.android.apps.photos:id/done_button')
  7825. .with('text', 'DONE')
  7826.  
  7827. $ruiObj.click
  7828.  
  7829. waitsecond(2)
  7830. end
  7831.  
  7832. tcase << TestAction.new(:Keepoff) do
  7833. $ruiObj = RUIObject.new.with('objectid', -767191036).with('selfid', 780820477).with('textdescid', 1663022928).with('uniqueparentid', -1776182139).with('classresourceid', 1834539359)
  7834. .with('uitreeindex', 3)
  7835. .with('classname', 'Button')
  7836. .with('resource-id', 'android:id/button2')
  7837. .with('text', 'KEEP OFF')
  7838.  
  7839. $ruiObj.click
  7840.  
  7841. waitsecond(2)
  7842. end
  7843.  
  7844. tcase << TestAction.new(:clickdone) do
  7845. $ruiObj = RUIObject.new.with('objectid', 1857204703).with('selfid', -544460817).with('textdescid', -1623853219).with('uniqueparentid', 1110794213)
  7846. .with('uitreeindex', 11)
  7847. .with('classname', 'Button')
  7848. .with('resource-id', 'com.google.android.apps.photos:id/done_button')
  7849. .with('text', 'DONE')
  7850.  
  7851. $ruiObj.click
  7852.  
  7853. waitsecond(2)
  7854. end
  7855.  
  7856. tcase << TestAction.new(:clickgotit) do
  7857. $ruiObj = RUIObject.new.with('objectid', -767191037).with('selfid', 1077689959).with('textdescid', 1333340036).with('uniqueparentid', 1950016636).with('classresourceid', 1834539358)
  7858. .with('uitreeindex', 3)
  7859. .with('classname', 'Button')
  7860. .with('resource-id', 'android:id/button1')
  7861. .with('text', 'GOT IT')
  7862.  
  7863. $ruiObj.click
  7864.  
  7865. waitsecond(2)
  7866. end
  7867.  
  7868. tcase << TestAction.new(:clickmostrecentvideo) do
  7869. click(180,792)
  7870.  
  7871. waitsecond(2)
  7872. end
  7873.  
  7874. tcase << TestAction.new(:clicktoallowfullscreen) do
  7875. $ruiObj = RUIObject.new.with('objectid', 421858869).with('selfid', 1817701202).with('textdescid', -941601866).with('uniqueparentid', -965863814)
  7876. .with('uitreeindex', 5)
  7877. .with('classname', 'Button')
  7878. .with('resource-id', 'android:id/ok')
  7879. .with('text', 'GOT IT')
  7880.  
  7881. $ruiObj.click
  7882.  
  7883. waitsecond(2)
  7884. end
  7885.  
  7886. tcase << TestAction.new(:View_Dismiss_10) do
  7887. $ruiObj = RUIObject.new.with('objectid', 1250577209).with('selfid', 2045596453).with('textdescid', 1467340739).with('uniqueparentid', -1059167548)
  7888. .with('uitreeindex', 3)
  7889. .with('classname', 'android.view.View')
  7890. .with('content-desc', 'Dismiss')
  7891.  
  7892. $ruiObj.click
  7893.  
  7894. waitsecond(2)
  7895. end
  7896.  
  7897. tcase << TestAction.new(:wait10seconds) do
  7898. for i in 1..2
  7899.  
  7900. waitsecond(i)
  7901. refreshScreen
  7902.  
  7903. end
  7904.  
  7905. end
  7906.  
  7907. tcase << TestAction.new(:clickthescreen) do
  7908. click(1080,1516.5)
  7909.  
  7910. waitsecond(2)
  7911. end
  7912.  
  7913. tcase << TestAction.new(:checkforpausebutton) do
  7914. $ruiObj = RUIObject.new.with('objectid', 1760472289).with('selfid', -1751474194).with('textdescid', -1538603918).with('uniqueparentid', 542296211)
  7915. .with('uitreeindex', 2)
  7916. .with('classname', 'ImageButton')
  7917. .with('resource-id', 'com.google.android.apps.photos:id/photos_videoplayer_pause_button')
  7918. .with('content-desc', 'Pause video')
  7919.  
  7920. $ruiObj.isExist
  7921.  
  7922. waitsecond(0)
  7923. end
  7924.  
  7925. tcase << TestAction.new(:refreshscreen) do
  7926. refreshScreen
  7927.  
  7928. waitsecond(0)
  7929. end
  7930.  
  7931. tcase << TestAction.new(:wait16second) do
  7932. for i in 1..2
  7933.  
  7934. waitsecond(i)
  7935. refreshScreen
  7936.  
  7937. end
  7938.  
  7939. end
  7940.  
  7941. tcase << TestAction.new(:pausevideo) do
  7942. $ruiObj = RUIObject.new.with('objectid', 1760472289).with('selfid', -1751474194).with('textdescid', -1538603918).with('uniqueparentid', 542296211)
  7943. .with('uitreeindex', 2)
  7944. .with('classname', 'ImageButton')
  7945. .with('resource-id', 'com.google.android.apps.photos:id/photos_videoplayer_pause_button')
  7946. .with('content-desc', 'Pause video')
  7947.  
  7948. $ruiObj.click
  7949.  
  7950. waitsecond(2)
  7951. end
  7952.  
  7953. tcase << TestAction.new(:stoplog) do
  7954. $myTestResult = checkLastExistResult
  7955.  
  7956. logStopTest("05_01_07_02_MultiMedia")
  7957.  
  7958.  
  7959.  
  7960. waitsecond(0)
  7961. end
  7962.  
  7963. tcase << TestAction.new(:pressBack_4) do
  7964. pressBack
  7965.  
  7966. waitsecond(0)
  7967. end
  7968.  
  7969. tcase << TestAction.new(:pressBack_6) do
  7970. pressBack
  7971.  
  7972. waitsecond(0)
  7973. end
  7974.  
  7975. tcase << TestAction.new(:pressHome_7) do
  7976. pressHome
  7977.  
  7978. waitsecond(0)
  7979. end
  7980.  
  7981. tcase.run(loopTime)
  7982.  
  7983. end
  7984.  
  7985. def self.Multimedia_5_1_7_3(loopTime)
  7986.  
  7987. tcase = TestCase.new("Multimedia_5_1_7_3")
  7988.  
  7989. tcase << TestAction.new(:logstart) do
  7990. logStartTest("05_01_07_03_MultiMedia")
  7991.  
  7992. waitsecond(0)
  7993. end
  7994.  
  7995. tcase << TestAction.new(:gotoPhotos) do
  7996. gotoAppPixel("Photos")
  7997.  
  7998. waitsecond(2)
  7999. end
  8000.  
  8001. tcase << TestAction.new(:gotovideo) do
  8002. click(166.5,666)
  8003.  
  8004. waitsecond(2)
  8005. end
  8006.  
  8007. tcase << TestAction.new(:clicktheview) do
  8008. $ruiObj = RUIObject.new.with('objectid', 969208524).with('selfid', 1815484335).with('textdescid', -19306796).with('uniqueparentid', -87074755)
  8009. .with('uitreeindex', 0)
  8010. .with('classname', 'android.view.View')
  8011.  
  8012. $ruiObj.click
  8013.  
  8014. waitsecond(0)
  8015. end
  8016.  
  8017. tcase << TestAction.new(:refreshscreen) do
  8018. refreshScreen
  8019.  
  8020. waitsecond(0)
  8021. end
  8022.  
  8023. tcase << TestAction.new(:deletebuttonexist) do
  8024. $ruiObj = RUIObject.new.with('objectid', -1328088200).with('selfid', 1434121712).with('textdescid', 864436336).with('uniqueparentid', -2095656440)
  8025. .with('uitreeindex', 14)
  8026. .with('classname', 'ImageView')
  8027. .with('resource-id', 'com.google.android.apps.photos:id/trash')
  8028. .with('content-desc', 'Trash')
  8029.  
  8030. $ruiObj.isExist
  8031.  
  8032. waitsecond(2)
  8033. end
  8034.  
  8035. tcase << TestAction.new(:deletethevideo) do
  8036. $ruiObj = RUIObject.new.with('objectid', -1328088200).with('selfid', 1434121712).with('textdescid', 864436336).with('uniqueparentid', -2095656440)
  8037. .with('uitreeindex', 14)
  8038. .with('classname', 'ImageView')
  8039. .with('resource-id', 'com.google.android.apps.photos:id/trash')
  8040. .with('content-desc', 'Trash')
  8041.  
  8042. $ruiObj.click
  8043.  
  8044. waitsecond(2)
  8045. end
  8046.  
  8047. tcase << TestAction.new(:confirmdelete) do
  8048. $ruiObj = RUIObject.new.with('objectid', -767191037).with('selfid', 2007729818).with('textdescid', -414128773).with('uniqueparentid', 158965951).with('classresourceid', 1834539358)
  8049. .with('uitreeindex', 7)
  8050. .with('classname', 'Button')
  8051. .with('resource-id', 'android:id/button1')
  8052. .with('text', 'MOVE TO TRASH')
  8053.  
  8054. $ruiObj.click
  8055.  
  8056. waitsecond(2)
  8057. end
  8058.  
  8059. tcase << TestAction.new(:confirmdelete_2) do
  8060. $ruiObj = RUIObject.new.with('objectid', -767191037).with('selfid', -1194431314).with('textdescid', -875578979).with('uniqueparentid', 1357736153).with('classresourceid', 1834539358)
  8061. .with('uitreeindex', 4)
  8062. .with('classname', 'Button')
  8063. .with('resource-id', 'android:id/button1')
  8064. .with('text', 'DELETE PERMANENTLY')
  8065.  
  8066. $ruiObj.click
  8067.  
  8068. waitsecond(2)
  8069. end
  8070.  
  8071. tcase << TestAction.new(:logstop) do
  8072. $myTestResult = checkLastExistResult
  8073.  
  8074. if $myTestResult == false
  8075. $myFailReason == "Video fail to delete"
  8076.  
  8077. end
  8078. logStopTest("05_01_07_03_MultiMedia")
  8079.  
  8080.  
  8081. waitsecond(0)
  8082. end
  8083.  
  8084. tcase << TestAction.new(:pressBack_11) do
  8085. pressBack
  8086.  
  8087. waitsecond(0)
  8088. end
  8089.  
  8090. tcase << TestAction.new(:pressBack_12) do
  8091. pressBack
  8092.  
  8093. waitsecond(0)
  8094. end
  8095.  
  8096. tcase << TestAction.new(:pressHome_13) do
  8097. pressHome
  8098.  
  8099. waitsecond(0)
  8100. end
  8101.  
  8102. tcase.run(loopTime)
  8103.  
  8104. end
  8105.  
  8106. def self.exception_handler
  8107. puts "Module Exception Hanlder..."
  8108. end
  8109.  
  8110. def self.run(loop)
  8111. mainLoop loop
  8112. end
  8113.  
  8114. end
  8115.  
  8116. $exceptionPackageNameList = []
  8117. $exceptionPackageNameList_exclude = []
  8118.  
  8119. def exception_handler
  8120. SNOWBIRD_MTBF.exception_handler
  8121. end
  8122.  
  8123. $curProjectLogFile = $useLastLogFile
  8124.  
  8125. $curProjectLogFile = "SNOWBIRD_MTBF_#{getTimeStamp}.log" if $useLastLogFile.nil?
  8126.  
  8127. $useLastLogFile = nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement