Skip to content

Commit

Permalink
Merge pull request #67 from DEFRA/feature/APMagicPwdFix
Browse files Browse the repository at this point in the history
Fix for magic pwd page
  • Loading branch information
pallaviyewaleDefra authored Jan 23, 2025
2 parents 3ea564e + 1283ad5 commit d1c70ff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public PetsNamePage(IObjectContainer container)
#region Page objects

private IWebDriver _driver => _objectContainer.Resolve<IWebDriver>();
public IWebElement PageHeading => _driver.WaitForElement(By.XPath("//h1[@for='PetName']"), true);
public IWebElement PageHeading => _driver.WaitForElement(By.XPath("//label[@for='PetName']"), true);
private IWebElement txtPetsName => _driver.WaitForElement(By.Id("PetName"));
private IReadOnlyCollection<IWebElement> lblErrorMessages => _driver.WaitForElements(By.XPath("//div[@class='govuk-error-summary__body']//a"));
private IWebElement btnContinue => _driver.WaitForElement(By.XPath("//button[contains(text(),'Continue')]"));
Expand Down
2 changes: 1 addition & 1 deletion nipts-pts-automation-tests/Pages/SignInPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public bool IsSignedOut()

public void EnterPassword()
{
if (PageHeading.Text.Contains("This is for testing use only"))
if (PageHeading.Text.Contains("Private beta testing login"))
{
EnvPassword.SendKeys(ConfigSetup.BaseConfiguration.TestConfiguration.EnvPassword);
Continue.Click();
Expand Down
2 changes: 1 addition & 1 deletion nipts-pts-automation-tests/Steps/AP-GB/LoginSteps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void GivenINavigateToPETSATravelDocumentURL()
{
var url = urlBuilder.Default("App").Build();
_driver?.Navigate().GoToUrl(url);
Assert.True(landingPage?.IsPageLoaded("This is for testing use only"), "Application page not loaded");
Assert.True(landingPage?.IsPageLoaded("Private beta testing login"), "Application page not loaded");
}

[Given(@"I have provided the password for Landing page")]
Expand Down

0 comments on commit d1c70ff

Please sign in to comment.