-
Notifications
You must be signed in to change notification settings - Fork 558
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
Timeouts on WKWebView image snapshot #126
Comments
Ah, good point, embedded web views shouldn’t time out if possible. Will look into this soon! Thanks for so thoroughly testing things 🙌 |
Applications I am covering now with snapshot tests (fortunately) have a lot of weird things 😅 |
@kaqu I can't seem to reproduce this failure. WKWebView snapshots should only time out if the web view thinks that it |
Ok, I will try to reproduce it outside or find if there is some other case here. |
This makes timeout:
It turns out that it was loading url, but it was kind of invalid. |
I am wondering if loading other valid URL like base64 data which is accepted by browsers will behave similarly. |
Ah. I think it’s kind of correct to fail in this case. Any way to modify your code to avoid the loading for the test? Or to load a valid HTML string instead? |
(Up for other suggestions, too! We just want to wait for loading web pages to load.) |
Thanks for help though, sorry for incomplete debug 🙂 I agree that timeout in that case is good (loading base64 data seems to work correctly) |
Going to close this issue and track the improvement here #136. |
Hi, one more issue from me 😇 It looks like WKWebView is never performing image snapshot when there is no content loaded. I have the case where one of my views contains WKWebView that have no content initially. If I've debugged that correctly image snapshot on web view waits until the page finishes loading. But when there is no page loading it never occurs resulting in a timeout.
I am wondering if making it possible to take a snapshot when there is no content in web view is a good solution here.
Workaround for this is to load any file from disk into, even empty one.
The text was updated successfully, but these errors were encountered: