Advertisement
Guest User

Untitled

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