Mattc3303

header test case

Dec 24th, 2014
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.59 KB | None | 0 0
  1. package TestScripts;
  2.  
  3. import java.lang.reflect.Method;
  4. import java.util.List;
  5.  
  6. import org.openqa.selenium.By;
  7. import org.openqa.selenium.WebElement;
  8.  
  9. import Library.MB_AppFunctions;
  10. import Library.MB_CommonFunctions;
  11. import Library.MB_HeaderFunctions;
  12. import Library.MB_RunManager;
  13. import Library.MB_Initialization;
  14. import Library.MB_ReportingFunctions;
  15.  
  16. public class Header_Mobile extends MB_Initialization {
  17.  
  18. public static Integer intCnt=1;
  19. MB_RunManager cfn = new MB_RunManager();
  20. MB_ReportingFunctions repfn = new MB_ReportingFunctions();
  21. MB_AppFunctions app = new MB_AppFunctions();
  22. MB_CommonFunctions cnf = new MB_CommonFunctions();
  23. MB_HeaderFunctions hef = new MB_HeaderFunctions();
  24. String device=m1.get("Device").toString();
  25.  
  26. public static boolean blnFlag=false;
  27.  
  28. public Method getMethod() {
  29. return this.getClass().getEnclosingMethod();
  30. }
  31. /**
  32. * Method Name : FNHeader_MTS_031
  33. * Method Description : Verify the TV landing page after clicking on TV menu from Global header
  34. * @param none
  35. * @return void
  36. * @author Dhivya Durairaj
  37. * @throws Exception
  38. */
  39. public void FNHeader_MTS_031()
  40. {
  41. m1.put("OVERALLSTATUS", "PASS");
  42. try
  43. {
  44.  
  45. for (int iCount=0; iCount<7;iCount++)
  46. {
  47. switch(iCount)
  48. {
  49. case 0:blnFlag= app.FnLaunchApp();
  50. break;
  51. case 1:
  52. blnFlag=app.FN_NavigateTV();
  53. break;
  54. case 2:
  55. blnFlag=app.FN_SignOut();
  56. break;
  57. }
  58. if(!blnFlag)
  59. {
  60. repfn.FnCom_AbortExec();
  61. break;
  62. }
  63. }
  64. repfn.FnUpdateEndTest();
  65. }catch(Exception e)
  66. {
  67. repfn.FnCom_ThrowException(e);
  68. }
  69. }
  70. /**
  71. * Method Name : FNHeader_MTS_004
  72. * Method Description : Verify the Menu icons and the profile page display after clicking on the balloon icon
  73. * @param none
  74. * @return void
  75. * @author Dhivya Durairaj
  76. * @throws Exception
  77. */
  78. public void FNHeader_MTS_004()
  79. {
  80. m1.put("OVERALLSTATUS", "PASS");
  81. try
  82. {
  83.  
  84. for (int iCount=0; iCount<7;iCount++)
  85. {
  86. switch(iCount)
  87. {
  88. case 0:blnFlag= app.FnLaunchApp();
  89. break;
  90. case 1:
  91. blnFlag=app.FN_MenuIcons();
  92. break;
  93. case 2:
  94. blnFlag=app.FN_ProfileNavigation();
  95. break;
  96. case 3:
  97. blnFlag=app.FN_SignOut();
  98. break;
  99. }
  100. if(!blnFlag)
  101. {
  102. repfn.FnCom_AbortExec();
  103. break;
  104. }
  105. }
  106. repfn.FnUpdateEndTest();
  107. }catch(Exception e)
  108. {
  109. repfn.FnCom_ThrowException(e);
  110. }
  111. }
  112. /**
  113. * Method Name : FNHeader_MTS_016
  114. * Method Description : Verify the Menu icons and location of Email icon
  115. * @param none
  116. * @return void
  117. * @author Dhivya Durairaj
  118. * @throws Exception
  119. */
  120. public void FNHeader_MTS_016()
  121. {
  122. m1.put("OVERALLSTATUS", "PASS");
  123. try
  124. {
  125.  
  126. for (int iCount=0; iCount<7;iCount++)
  127. {
  128. switch(iCount)
  129. {
  130. case 0:blnFlag= app.FnLaunchApp();
  131. break;
  132. case 1:
  133. blnFlag=app.FN_MenuIcons();
  134. break;
  135. case 2:
  136. blnFlag=app.FN_EmailLocation();
  137. break;
  138. case 3:
  139. blnFlag=app.FN_SignOut();
  140. break;
  141. }
  142. if(!blnFlag)
  143. {
  144. repfn.FnCom_AbortExec();
  145. break;
  146. }
  147. }
  148. repfn.FnUpdateEndTest();
  149. }catch(Exception e)
  150. {
  151. repfn.FnCom_ThrowException(e);
  152. }
  153. }
  154.  
  155.  
  156.  
  157. /**
  158. * Method Name : FNHeader_MTS_012
  159. * Method Description : Verify the Menu icons and location of Voicemail icon
  160. * @param none
  161. * @return void
  162. * @author Dhivya Durairaj
  163. * @throws Exception
  164. */
  165. public void FNHeader_MTS_012()
  166. {
  167. m1.put("OVERALLSTATUS", "PASS");
  168. try
  169. {
  170.  
  171. for (int iCount=0; iCount<7;iCount++)
  172. {
  173. switch(iCount)
  174. {
  175. case 0:blnFlag= app.FnLaunchApp();
  176. break;
  177. case 1:
  178. blnFlag=app.FN_MenuIcons();
  179. break;
  180. case 2:
  181. blnFlag=app.FN_VoicemailLocation();
  182. break;
  183. case 3:
  184. blnFlag=app.FN_SignOut();
  185. break;
  186. }
  187. if(!blnFlag)
  188. {
  189. repfn.FnCom_AbortExec();
  190. break;
  191. }
  192. }
  193. repfn.FnUpdateEndTest();
  194. }catch(Exception e)
  195. {
  196. repfn.FnCom_ThrowException(e);
  197. }
  198. }
  199.  
  200.  
  201.  
  202.  
  203. /**
  204. * Method Name : FNHeader_MTS_032
  205. * Method Description : Verify the TV landing page after clicking on TV menu from Global header
  206. * @param none
  207. * @return void
  208. * @author Dhivya Durairaj
  209. * @throws Exception
  210. */
  211. public void FNHeader_MTS_032()
  212. {
  213. m1.put("OVERALLSTATUS", "PASS");
  214. try
  215. {
  216.  
  217. for (int iCount=0; iCount<7;iCount++)
  218. {
  219. switch(iCount)
  220. {
  221. case 0:blnFlag= app.FnLaunchApp();
  222. break;
  223. case 1:
  224. blnFlag=app.FN_NavigateTV();
  225. break;
  226. case 2:
  227. blnFlag=app.FN_SignOut();
  228. break;
  229. }
  230. if(!blnFlag)
  231. {
  232. repfn.FnCom_AbortExec();
  233. break;
  234. }
  235. }
  236. repfn.FnUpdateEndTest();
  237. }catch(Exception e)
  238. {
  239. repfn.FnCom_ThrowException(e);
  240. }
  241. }
  242.  
  243. /**
  244. * Method Name : FNHeader_MTS_028
  245. * Method Description : Verify the Phone landing page after clicking on Phone menu from Global header
  246. * @param none
  247. * @return void
  248. * @author Dhivya Durairaj
  249. * @throws Exception
  250. */
  251. public void FNHeader_MTS_028()
  252. {
  253. m1.put("OVERALLSTATUS", "PASS");
  254. try
  255. {
  256.  
  257. for (int iCount=0; iCount<7;iCount++)
  258. {
  259. switch(iCount)
  260. {
  261. case 0:blnFlag= app.FnLaunchApp();
  262. break;
  263. case 1:
  264. blnFlag=app.FN_NavigatePhone();
  265. break;
  266. case 2:
  267. blnFlag=app.FN_SignOut();
  268. break;
  269. }
  270. if(!blnFlag)
  271. {
  272. repfn.FnCom_AbortExec();
  273. break;
  274. }
  275. }
  276. repfn.FnUpdateEndTest();
  277. }catch(Exception e)
  278. {
  279. repfn.FnCom_ThrowException(e);
  280. }
  281. }
  282. /**
  283. * Method Name : FNHeader_MTS_030
  284. * Method Description : Verify the PayBill landing page after clicking on PayBill menu from Global header
  285. * @param none
  286. * @return void
  287. * @author Dhivya Durairaj
  288. * @throws Exception
  289. */
  290. public void FNHeader_MTS_030()
  291. {
  292. m1.put("OVERALLSTATUS", "PASS");
  293. try
  294. {
  295.  
  296. for (int iCount=0; iCount<7;iCount++)
  297. {
  298. switch(iCount)
  299. {
  300. case 0:blnFlag= app.FnLaunchApp();
  301. break;
  302. case 1:
  303. blnFlag=app.FN_NavigatePayBill();
  304. break;
  305. case 2:
  306. blnFlag=app.FN_SignOut();
  307. break;
  308. }
  309. if(!blnFlag)
  310. {
  311. repfn.FnCom_AbortExec();
  312. break;
  313. }
  314. }
  315. repfn.FnUpdateEndTest();
  316. }catch(Exception e)
  317. {
  318. repfn.FnCom_ThrowException(e);
  319. }
  320. }
  321. /**
  322. * Method Name : FNHeader_MTS_029
  323. * Method Description : Verify the Internet landing page after clicking on Internet menu from Global header
  324. * @param none
  325. * @return void
  326. * @author Dhivya Durairaj
  327. * @throws Exception
  328. */
  329. public void FNHeader_MTS_029()
  330. {
  331. m1.put("OVERALLSTATUS", "PASS");
  332. try
  333. {
  334.  
  335. for (int iCount=0; iCount<7;iCount++)
  336. {
  337. switch(iCount)
  338. {
  339. case 0:blnFlag= app.FnLaunchApp();
  340. break;
  341. case 1:
  342. blnFlag=app.FN_NavigateInternet();
  343. break;
  344. case 2:
  345. blnFlag=app.FN_SignOut();
  346. break;
  347. }
  348. if(!blnFlag)
  349. {
  350. repfn.FnCom_AbortExec();
  351. break;
  352. }
  353. }
  354. repfn.FnUpdateEndTest();
  355. }catch(Exception e)
  356. {
  357. repfn.FnCom_ThrowException(e);
  358. }
  359. }
  360.  
  361.  
  362. /**
  363. * Method Name : FNHeader_MTS_033
  364. * Method Description : Verify the support page options
  365. * @param none
  366. * @return void
  367. * @author Dhivya Durairaj
  368. * @throws Exception
  369. */
  370. public void FNHeader_MTS_033()
  371. {
  372. m1.put("OVERALLSTATUS", "PASS");
  373. try
  374. {
  375. for (int iCount=0; iCount<7;iCount++)
  376. {
  377. switch(iCount)
  378. {
  379. case 0:blnFlag= app.FnLaunchApp();
  380. break;
  381. case 1:
  382. blnFlag=app.FN_NavigateSupport();
  383. break;
  384. case 2:
  385. blnFlag=app.FN_SupportLinks();
  386. break;
  387. case 3:
  388. blnFlag=app.FN_SignOut();
  389. break;
  390. }
  391. if(!blnFlag)
  392. {
  393. repfn.FnCom_AbortExec();
  394. break;
  395. }
  396. }
  397. repfn.FnUpdateEndTest();
  398. }catch(Exception e)
  399. {
  400. repfn.FnCom_ThrowException(e);
  401. }
  402. }
  403. /**
  404. * Method Name : FNHeader_MTS_019
  405. * Method Description : Verify navigating to Espanol page
  406. * @param none
  407. * @return void
  408. * @author Matt Chan
  409. * @throws Exception
  410. */
  411. public void FNHeader_MTS_019()
  412. {
  413. m1.put("OVERALLSTATUS", "PASS");
  414. try
  415. {
  416. for (int iCount=0; iCount<4;iCount++)
  417. {
  418. switch(iCount)
  419. {
  420. case 0:
  421. blnFlag = app.FnLaunchApp();
  422. break;
  423. case 1:
  424. blnFlag = hef.FNMenuBtn();
  425. break;
  426. case 2:
  427. blnFlag = hef.FNNavigateEspanol();
  428. break;
  429. case 3:
  430. blnFlag = hef.FNMenuBtn();
  431. break;
  432. // case 4:
  433. // blnFlag = hef.FNNavigateEnglishPage();
  434. // break;
  435. }
  436. if(!blnFlag){
  437. repfn.FnCom_AbortExec();
  438. break;
  439. }
  440. }
  441. repfn.FnUpdateEndTest();
  442. }catch(Exception e)
  443. {
  444. repfn.FnCom_ThrowException(e);
  445. }
  446. }
  447. public void FnTesting(){
  448. try{
  449. app.FnGlobalLaunchApp();
  450. }
  451. catch(Exception e){
  452. }
  453. }
  454. }//END
Advertisement
Add Comment
Please, Sign In to add comment