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

KIF causes exception on using WKWebView #1269

Open
gerchicovy opened this issue Nov 4, 2022 · 2 comments
Open

KIF causes exception on using WKWebView #1269

gerchicovy opened this issue Nov 4, 2022 · 2 comments

Comments

@gerchicovy
Copy link

I add empty fullscreen empty WKWebView and try to click it but get exception:
Thread 1: "[<WKWebView 0x7fcdf002f600> valueForUndefinedKey:]: this class is not key value coding-compliant for the key _internal."
Sources:
https://github.com/kif-framework/KIF/blob/master/Sources/KIF/Additions/UIView-KIFAdditions.m

Let check:

BOOL isWebView = [self isKindOfClass:[WKWebView class]]; //YES
...
if ([NSStringFromClass([self class]) isEqual:@"UIWebBrowserView"]) { //NO
} else if (isWebView) { //YES
  id webViewInternal = [self valueForKey:@"_internal"]; //Exception
  ...
}

What is @"_internal" for WKWebView?

@dostrander
Copy link
Contributor

This was likely an ivar, but i don't know what it was used for. This was last updated 9 years ago… Might not really be necessary to check for it anymore at all

@gerchicovy
Copy link
Author

@dostrander could you please fix it? I don't know concrete steps which cause this problem but it obviously always will crash here on using WKWebView

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

No branches or pull requests

2 participants