Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package TestScripts;
- import java.lang.reflect.Method;
- import java.util.List;
- import org.openqa.selenium.By;
- import org.openqa.selenium.WebElement;
- import Library.MB_AppFunctions;
- import Library.MB_CommonFunctions;
- import Library.MB_HeaderFunctions;
- import Library.MB_RunManager;
- import Library.MB_Initialization;
- import Library.MB_ReportingFunctions;
- public class Header_Mobile extends MB_Initialization {
- public static Integer intCnt=1;
- MB_RunManager cfn = new MB_RunManager();
- MB_ReportingFunctions repfn = new MB_ReportingFunctions();
- MB_AppFunctions app = new MB_AppFunctions();
- MB_CommonFunctions cnf = new MB_CommonFunctions();
- MB_HeaderFunctions hef = new MB_HeaderFunctions();
- String device=m1.get("Device").toString();
- public static boolean blnFlag=false;
- public Method getMethod() {
- return this.getClass().getEnclosingMethod();
- }
- /**
- * Method Name : FNHeader_MTS_031
- * Method Description : Verify the TV landing page after clicking on TV menu from Global header
- * @param none
- * @return void
- * @author Dhivya Durairaj
- * @throws Exception
- */
- public void FNHeader_MTS_031()
- {
- m1.put("OVERALLSTATUS", "PASS");
- try
- {
- for (int iCount=0; iCount<7;iCount++)
- {
- switch(iCount)
- {
- case 0:blnFlag= app.FnLaunchApp();
- break;
- case 1:
- blnFlag=app.FN_NavigateTV();
- break;
- case 2:
- blnFlag=app.FN_SignOut();
- break;
- }
- if(!blnFlag)
- {
- repfn.FnCom_AbortExec();
- break;
- }
- }
- repfn.FnUpdateEndTest();
- }catch(Exception e)
- {
- repfn.FnCom_ThrowException(e);
- }
- }
- /**
- * Method Name : FNHeader_MTS_004
- * Method Description : Verify the Menu icons and the profile page display after clicking on the balloon icon
- * @param none
- * @return void
- * @author Dhivya Durairaj
- * @throws Exception
- */
- public void FNHeader_MTS_004()
- {
- m1.put("OVERALLSTATUS", "PASS");
- try
- {
- for (int iCount=0; iCount<7;iCount++)
- {
- switch(iCount)
- {
- case 0:blnFlag= app.FnLaunchApp();
- break;
- case 1:
- blnFlag=app.FN_MenuIcons();
- break;
- case 2:
- blnFlag=app.FN_ProfileNavigation();
- break;
- case 3:
- blnFlag=app.FN_SignOut();
- break;
- }
- if(!blnFlag)
- {
- repfn.FnCom_AbortExec();
- break;
- }
- }
- repfn.FnUpdateEndTest();
- }catch(Exception e)
- {
- repfn.FnCom_ThrowException(e);
- }
- }
- /**
- * Method Name : FNHeader_MTS_016
- * Method Description : Verify the Menu icons and location of Email icon
- * @param none
- * @return void
- * @author Dhivya Durairaj
- * @throws Exception
- */
- public void FNHeader_MTS_016()
- {
- m1.put("OVERALLSTATUS", "PASS");
- try
- {
- for (int iCount=0; iCount<7;iCount++)
- {
- switch(iCount)
- {
- case 0:blnFlag= app.FnLaunchApp();
- break;
- case 1:
- blnFlag=app.FN_MenuIcons();
- break;
- case 2:
- blnFlag=app.FN_EmailLocation();
- break;
- case 3:
- blnFlag=app.FN_SignOut();
- break;
- }
- if(!blnFlag)
- {
- repfn.FnCom_AbortExec();
- break;
- }
- }
- repfn.FnUpdateEndTest();
- }catch(Exception e)
- {
- repfn.FnCom_ThrowException(e);
- }
- }
- /**
- * Method Name : FNHeader_MTS_012
- * Method Description : Verify the Menu icons and location of Voicemail icon
- * @param none
- * @return void
- * @author Dhivya Durairaj
- * @throws Exception
- */
- public void FNHeader_MTS_012()
- {
- m1.put("OVERALLSTATUS", "PASS");
- try
- {
- for (int iCount=0; iCount<7;iCount++)
- {
- switch(iCount)
- {
- case 0:blnFlag= app.FnLaunchApp();
- break;
- case 1:
- blnFlag=app.FN_MenuIcons();
- break;
- case 2:
- blnFlag=app.FN_VoicemailLocation();
- break;
- case 3:
- blnFlag=app.FN_SignOut();
- break;
- }
- if(!blnFlag)
- {
- repfn.FnCom_AbortExec();
- break;
- }
- }
- repfn.FnUpdateEndTest();
- }catch(Exception e)
- {
- repfn.FnCom_ThrowException(e);
- }
- }
- /**
- * Method Name : FNHeader_MTS_032
- * Method Description : Verify the TV landing page after clicking on TV menu from Global header
- * @param none
- * @return void
- * @author Dhivya Durairaj
- * @throws Exception
- */
- public void FNHeader_MTS_032()
- {
- m1.put("OVERALLSTATUS", "PASS");
- try
- {
- for (int iCount=0; iCount<7;iCount++)
- {
- switch(iCount)
- {
- case 0:blnFlag= app.FnLaunchApp();
- break;
- case 1:
- blnFlag=app.FN_NavigateTV();
- break;
- case 2:
- blnFlag=app.FN_SignOut();
- break;
- }
- if(!blnFlag)
- {
- repfn.FnCom_AbortExec();
- break;
- }
- }
- repfn.FnUpdateEndTest();
- }catch(Exception e)
- {
- repfn.FnCom_ThrowException(e);
- }
- }
- /**
- * Method Name : FNHeader_MTS_028
- * Method Description : Verify the Phone landing page after clicking on Phone menu from Global header
- * @param none
- * @return void
- * @author Dhivya Durairaj
- * @throws Exception
- */
- public void FNHeader_MTS_028()
- {
- m1.put("OVERALLSTATUS", "PASS");
- try
- {
- for (int iCount=0; iCount<7;iCount++)
- {
- switch(iCount)
- {
- case 0:blnFlag= app.FnLaunchApp();
- break;
- case 1:
- blnFlag=app.FN_NavigatePhone();
- break;
- case 2:
- blnFlag=app.FN_SignOut();
- break;
- }
- if(!blnFlag)
- {
- repfn.FnCom_AbortExec();
- break;
- }
- }
- repfn.FnUpdateEndTest();
- }catch(Exception e)
- {
- repfn.FnCom_ThrowException(e);
- }
- }
- /**
- * Method Name : FNHeader_MTS_030
- * Method Description : Verify the PayBill landing page after clicking on PayBill menu from Global header
- * @param none
- * @return void
- * @author Dhivya Durairaj
- * @throws Exception
- */
- public void FNHeader_MTS_030()
- {
- m1.put("OVERALLSTATUS", "PASS");
- try
- {
- for (int iCount=0; iCount<7;iCount++)
- {
- switch(iCount)
- {
- case 0:blnFlag= app.FnLaunchApp();
- break;
- case 1:
- blnFlag=app.FN_NavigatePayBill();
- break;
- case 2:
- blnFlag=app.FN_SignOut();
- break;
- }
- if(!blnFlag)
- {
- repfn.FnCom_AbortExec();
- break;
- }
- }
- repfn.FnUpdateEndTest();
- }catch(Exception e)
- {
- repfn.FnCom_ThrowException(e);
- }
- }
- /**
- * Method Name : FNHeader_MTS_029
- * Method Description : Verify the Internet landing page after clicking on Internet menu from Global header
- * @param none
- * @return void
- * @author Dhivya Durairaj
- * @throws Exception
- */
- public void FNHeader_MTS_029()
- {
- m1.put("OVERALLSTATUS", "PASS");
- try
- {
- for (int iCount=0; iCount<7;iCount++)
- {
- switch(iCount)
- {
- case 0:blnFlag= app.FnLaunchApp();
- break;
- case 1:
- blnFlag=app.FN_NavigateInternet();
- break;
- case 2:
- blnFlag=app.FN_SignOut();
- break;
- }
- if(!blnFlag)
- {
- repfn.FnCom_AbortExec();
- break;
- }
- }
- repfn.FnUpdateEndTest();
- }catch(Exception e)
- {
- repfn.FnCom_ThrowException(e);
- }
- }
- /**
- * Method Name : FNHeader_MTS_033
- * Method Description : Verify the support page options
- * @param none
- * @return void
- * @author Dhivya Durairaj
- * @throws Exception
- */
- public void FNHeader_MTS_033()
- {
- m1.put("OVERALLSTATUS", "PASS");
- try
- {
- for (int iCount=0; iCount<7;iCount++)
- {
- switch(iCount)
- {
- case 0:blnFlag= app.FnLaunchApp();
- break;
- case 1:
- blnFlag=app.FN_NavigateSupport();
- break;
- case 2:
- blnFlag=app.FN_SupportLinks();
- break;
- case 3:
- blnFlag=app.FN_SignOut();
- break;
- }
- if(!blnFlag)
- {
- repfn.FnCom_AbortExec();
- break;
- }
- }
- repfn.FnUpdateEndTest();
- }catch(Exception e)
- {
- repfn.FnCom_ThrowException(e);
- }
- }
- /**
- * Method Name : FNHeader_MTS_019
- * Method Description : Verify navigating to Espanol page
- * @param none
- * @return void
- * @author Matt Chan
- * @throws Exception
- */
- public void FNHeader_MTS_019()
- {
- m1.put("OVERALLSTATUS", "PASS");
- try
- {
- for (int iCount=0; iCount<4;iCount++)
- {
- switch(iCount)
- {
- case 0:
- blnFlag = app.FnLaunchApp();
- break;
- case 1:
- blnFlag = hef.FNMenuBtn();
- break;
- case 2:
- blnFlag = hef.FNNavigateEspanol();
- break;
- case 3:
- blnFlag = hef.FNMenuBtn();
- break;
- // case 4:
- // blnFlag = hef.FNNavigateEnglishPage();
- // break;
- }
- if(!blnFlag){
- repfn.FnCom_AbortExec();
- break;
- }
- }
- repfn.FnUpdateEndTest();
- }catch(Exception e)
- {
- repfn.FnCom_ThrowException(e);
- }
- }
- public void FnTesting(){
- try{
- app.FnGlobalLaunchApp();
- }
- catch(Exception e){
- }
- }
- }//END
Advertisement
Add Comment
Please, Sign In to add comment