Advertisement
Guest User

Untitled

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