Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-[UIAutomationHelper acknowledgeSystemAlertWithIndex] Does Not Work In Xcode 11.1 #1127

Closed
patmalt opened this issue Oct 15, 2019 · 1 comment

Comments

@patmalt
Copy link

patmalt commented Oct 15, 2019

Related to #1125

The fix implemented in #1126, helped but does not completely solve the issue that system alerts cannot be dismissed.

The fix allows ![alert isKindOfClass:[self nilElementClass]] to pass. However, [self _alertIsValidAndVisible:alert] still fails. Also, alert.buttons.count is zero, so isIndexInRange is false.

It appears [[alert valueForKeyPath:@"isVisible"] boolValue] is throwing, in _alertIsValidAndVisible. Additionally, calling [alert isVisible] returns false, but does not throw.

UIAAlert *alert = [self currentSystemAlert];
BOOL isIndexInRange = index < alert.buttons.count;
if (![alert isKindOfClass:[self nilElementClass]] && [self _alertIsValidAndVisible:alert] && isIndexInRange) {

@try {
visible = [[alert valueForKeyPath:@"isVisible"] boolValue];
}
@catch (NSException *exception) { }

@justinseanmartin
Copy link
Contributor

@patmalt - Please try out the latest master version of KIF and see if the latest PR merged fixes your issue, and reopen if the issue persists. Thanks!

I'll make a release with Xcode 11 fixes once things settle down and things are confirmed to be working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants