def test_HeaderLinks_VAB(self):
     self.LaunchFP = LaunchFP(self.driver)
     HmePg = self.LaunchFP.LoginToFP(scd.UsrName, scd.UsrPwd)
     HmePg.getHeaderElements(HomePage.VehicleAppointmentBooking,
                             hptd.VAB_title)
     HdrLnk_title = self.driver.title
     assert hptd.VAB_title == HdrLnk_title
 def test_MyVehicleDetails(self, InRegNo, InOptVal):
     self.LaunchFP = LaunchFP(self.driver)
     self.HomePage = HomePage(self.driver)
     HmePg = self.LaunchFP.LoginToFP(scd.UsrName, scd.UsrPwd)
     HP_MyVeh = self.HomePage.getMyVehicles()
     Title, VRN, actVehOptSel = HP_MyVeh.get_vehiclesdetails(
         InRegNo, InOptVal)
     actVRN = VRN[-7:]
     assert mvtd.VP_title == Title
     assert actVRN == InRegNo
     assert actVehOptSel == InOptVal
Beispiel #3
0
 def test_ValidateUserLogin(self):
     self.LaunchFP = LaunchFP(self.driver)
     self.LaunchFP.LoginToFP(scd.UsrName,scd.UsrPwd)
     time.sleep(3)
     HmePgTitle = self.LaunchFP.getCurrentPgTitle()
     self.LaunchFP.GetScreenShot(lptd.SSpath, hptd.HP_ssName) 
     exp_LogInUsr = scd.UsrName[:-7].replace('.', ' ').title()
     locVal = "//a[contains(text(),'"+exp_LogInUsr+"')]"
     LoggedInUsr = self.driver.find_element(By.XPATH,locVal).text
     assert HmePgTitle == hptd.HP_title
     assert LoggedInUsr == exp_LogInUsr
     print('LoggedInUsr:{} matches exp_LogInUsr:{} '.format(LoggedInUsr,exp_LogInUsr))
Beispiel #4
0
class XTest_LaunchFP(BaseTest):
    
    def test_ValidateUserLogin(self):
        self.LaunchFP = LaunchFP(self.driver)
        self.LaunchFP.LoginToFP(scd.UsrName,scd.UsrPwd)
        time.sleep(3)
        HmePgTitle = self.LaunchFP.getCurrentPgTitle()
        self.LaunchFP.GetScreenShot(lptd.SSpath, hptd.HP_ssName) 
        exp_LogInUsr = scd.UsrName[:-7].replace('.', ' ').title()
        locVal = "//a[contains(text(),'"+exp_LogInUsr+"')]"
        LoggedInUsr = self.driver.find_element(By.XPATH,locVal).text
        assert HmePgTitle == hptd.HP_title
        assert LoggedInUsr == exp_LogInUsr
        print('LoggedInUsr:{} matches exp_LogInUsr:{} '.format(LoggedInUsr,exp_LogInUsr))
          
    @pytest.mark.parametrize("Usr,Pwd",
                              [ pytest.param(scd.UsrName,scd.UsrPwd, id = "valid creds"),
                               pytest.param("Usrabc","Pwdqdfe",marks = pytest.mark.xfail,id="invalid creds")]
                              )   
    def test_ValidateUserLogin_withMultipleInput(self,Usr,Pwd):
        self.LaunchFP = LaunchFP(self.driver)
        self.LaunchFP.LoginToFP(Usr,Pwd)       
class Test_HPMyVehicles(BaseTest):
    @pytest.mark.parametrize("InRegNo,InOptVal", mvtd.MyVehicleDetails_td())
    def test_MyVehicleDetails(self, InRegNo, InOptVal):
        self.LaunchFP = LaunchFP(self.driver)
        self.HomePage = HomePage(self.driver)
        HmePg = self.LaunchFP.LoginToFP(scd.UsrName, scd.UsrPwd)
        HP_MyVeh = self.HomePage.getMyVehicles()
        Title, VRN, actVehOptSel = HP_MyVeh.get_vehiclesdetails(
            InRegNo, InOptVal)
        actVRN = VRN[-7:]
        assert mvtd.VP_title == Title
        assert actVRN == InRegNo
        assert actVehOptSel == InOptVal
Beispiel #6
0
 def test_ValidateUserLogin_withMultipleInput(self,Usr,Pwd):
     self.LaunchFP = LaunchFP(self.driver)
     self.LaunchFP.LoginToFP(Usr,Pwd)