Advertisement
Guest User

Untitled

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