Advertisement
Guest User

Untitled

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