Skip to content

Commit

Permalink
Changed consent handler to find element by name instead of ID (#4897)
Browse files Browse the repository at this point in the history
Enabled InteractiveConsentPromptAsync test and change element search from id to name
  • Loading branch information
Ugonnaak1 authored Aug 22, 2024
1 parent 5ff5d21 commit c7eb345
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public static void PerformLogin(this IWebDriver driver, LabUser user, Prompt pro

HandlePrompt(driver, "otherTile");
EnterUsername(driver, user, withLoginHint, adfsOnly, fields);
HandlePrompt(driver, CoreUiTestConstants.NextButton);
HandlePrompt(driver, CoreUiTestConstants.WebSubmitId);
EnterPassword(driver, user, fields);

HandleConsent(driver, user, fields, prompt);
Expand Down Expand Up @@ -251,7 +251,7 @@ private static void HandleConsent(IWebDriver driver, LabUser user, UserInformati
if (prompt == Prompt.Consent)
{
Trace.WriteLine("Consenting...");
driver.WaitForElementToBeVisibleAndEnabled(By.Id(fields.AADSignInButtonId)).Click();
driver.WaitForElementToBeVisibleAndEnabled(By.Name(fields.AADSignInButtonId)).Click();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ public async Task Interactive_AdfsV4_FederatedAsync()
}

[RunOn(TargetFrameworks.NetCore)]
// See https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/4879
[Ignore]
public async Task InteractiveConsentPromptAsync()
{
var labResponse = await LabUserHelper.GetDefaultUserAsync().ConfigureAwait(false);
Expand Down

0 comments on commit c7eb345

Please sign in to comment.