Skip to content

Commit adedbaa

Browse files
Try to fix the tests failing on one branch (#4680)
1 parent 1230d24 commit adedbaa

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

tests/Microsoft.Identity.Test.Core.UIAutomation/CoreUiTestConstants.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ public static class CoreUiTestConstants
7171
public const string PasswordInput = "password";
7272
public const string AlternativePasswordInput = "Passwd";
7373
public const string NextButton = "nextButton";
74+
public const string OtherTile = "otherTile";
7475

7576
// ADFSv2 fields
7677
public const string AdfsV2WebUsernameInputId = "ContentPlaceHolder1_UsernameTextBox";

tests/Microsoft.Identity.Test.Integration.netfx/Infrastructure/SeleniumExtensions.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,28 +188,29 @@ public static void PerformLogin(this IWebDriver driver, LabUser user, Prompt pro
188188
{
189189
UserInformationFieldIds fields = new UserInformationFieldIds(user);
190190

191+
HandlePrompt(driver, "otherTile");
191192
EnterUsername(driver, user, withLoginHint, adfsOnly, fields);
192-
HandleConfirmation(driver);
193+
HandlePrompt(driver, CoreUiTestConstants.NextButton);
193194
EnterPassword(driver, user, fields);
194195

195196
HandleConsent(driver, user, fields, prompt);
196197
HandleStaySignedIn(driver);
197198
}
198199

199-
private static void HandleConfirmation(IWebDriver driver)
200+
private static void HandlePrompt(IWebDriver driver, string id)
200201
{
201202
try
202203
{
203204
Trace.WriteLine("Finding next prompt");
204205
var nextBtn = driver.WaitForElementToBeVisibleAndEnabled(
205-
ByIds(CoreUiTestConstants.NextButton),
206+
ByIds(id),
206207
waitTime: ShortExplicitTimespan,
207208
ignoreFailures: true);
208209
nextBtn?.Click();
209210
}
210211
catch
211212
{
212-
Trace.WriteLine("Next button not found. Moving on.");
213+
Trace.WriteLine($"{id} not found. Moving on.");
213214
}
214215
}
215216

0 commit comments

Comments
 (0)