Open lucatorella opened 7 years ago
@lucatorella I think the problem is that the WKWebView has not finished loading.
Can you try wait for the page to load?
Here is an example: https://github.com/calabash/ios-webview-test-app/blob/master/CalWebViewApp/features/pages/wkwebview.rb#L24
We are investigating whether or not we can wait for the page to load in the LPServer, but it might not be possible.
When I push a new view controller containing a
WKWebView
, if I wait for a element to exist withwait_for_element_exists("WKWebView xpath:'//...
, then the app freezes. If I pause the Xcode debugger, I can see it's somehow stuck inLPWKWebViewCalabashStringByEvaulatingJavaScriptIMP
:If instead I wait for a second then I do the
wait_for_element_exists
everything works fine.My guess is that the completion handler is not called and so the finish property is never set to
YES
, therefore this while loop will run forever: