Advertisement
Guest User

Untitled

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