Skip to content

Commit 05092fd

Browse files
authored
Merge pull request #2204 from AzureAD/jarias/automation-forceTap-done-button
MSAL automation force tap done button
2 parents 89adec0 + c5e1720 commit 05092fd

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

MSAL/test/automation/tests/MSALBaseUITest.m

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,21 @@ - (void)closeAuthUIUsingWebViewType:(MSIDWebviewType)webViewType
214214
// We take the second one and tap it
215215
XCUIElement *secondButton = [elementQuery elementBoundByIndex:1];
216216
[secondButton msidTap];
217-
} else
217+
}
218+
else
218219
{
219-
[self.testApp.buttons[buttonTitle] msidTap];
220+
if (webViewType == MSIDWebviewTypeSafariViewController)
221+
{
222+
// We take the first one and force tap it, for some reason tap doesn't work
223+
XCUIElement *firstButton = [elementQuery elementBoundByIndex:0];
224+
225+
__auto_type coordinate = [firstButton coordinateWithNormalizedOffset:CGVectorMake(0, 0)];
226+
[coordinate tap];
227+
}
228+
else
229+
{
230+
[self.testApp.buttons[buttonTitle] msidTap];
231+
}
220232
}
221233
}
222234

0 commit comments

Comments
 (0)