public void WhenIViewTheRemainingTransferAllowanceTab() { var estimateCostsPage = Get <EstimateCostsPage>(); if (!WebSite.CurrentUrl.Contains("apprenticeship/add")) { var isAnyapprenticeshipExist = estimateCostsPage.IsApprenticeshipsTableVisible(); while (isAnyapprenticeshipExist) { estimateCostsPage.RemoveFirstApprenticeship(); isAnyapprenticeshipExist = estimateCostsPage.IsApprenticeshipsTableVisible(); } WebSite.ClickOnElement("a[href*='apprenticeship/add']"); } AddApprenticeshipsToEstimateCostPage addApprenticeshipPage = new AddApprenticeshipsToEstimateCostPage(WebSite.getDriver()); addApprenticeshipPage.UseTransferAllowance.Click(); addApprenticeshipPage.SelectApprenticeshipDropdown.SelectDropDown(WebSite.getDriver(), "Actuary, Level: 7 (Standard)"); addApprenticeshipPage.PageHeader.ClickThisElement(); addApprenticeshipPage.NumberOfApprenticesInput.EnterTextInThisElement("1"); addApprenticeshipPage.StartDateMonthInput.EnterTextInThisElement("10"); addApprenticeshipPage.StartDateYearInput.EnterTextInThisElement("2018"); addApprenticeshipPage.ContinueButton.ClickThisElement(); estimateCostsPage.SwitchToRemainingTransferAllowanceTab(); }