Skip to content

Commit

Permalink
Update NatWest sandbox UI code
Browse files Browse the repository at this point in the history
  • Loading branch information
markm77 committed Feb 4, 2023
1 parent 30c9c50 commit 54258d5
Showing 1 changed file with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,20 @@ public async Task PerformConsentAuthUiInteractions(
await page.ClickAsync(textBoxes[elements.Count - 1]); // seems necessary
await page.ClickAsync("#login-button");

// Select accounts then confirm access
string selector = _natWestBank switch
if (consentVariety is ConsentVariety.DomesticPaymentConsent)
{
NatWestBank.NatWestSandbox => "#account-list > li:nth-child(2) > dl > dd.action.col-size-1 > button",
NatWestBank.RoyalBankOfScotlandSandbox =>
"#account-list > .row-element:nth-child(2) > dl > .action > button",
_ => throw new ArgumentOutOfRangeException()
};
await page.ClickAsync(selector);
await page.ClickAsync("#approveButton");
// Select accounts then confirm access
string selector = _natWestBank switch
{
NatWestBank.NatWestSandbox =>
"#account-list > li:nth-child(2) > dl > dd.action.col-size-1 > button",
NatWestBank.RoyalBankOfScotlandSandbox =>
"#account-list > .row-element:nth-child(2) > dl > .action > button",
_ => throw new ArgumentOutOfRangeException()
};
await page.ClickAsync(selector);
await page.ClickAsync("#approveButton");
}
}
}
}

0 comments on commit 54258d5

Please sign in to comment.