Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

Navigating event doesn't fire on Android when using HTML source

$
0
0

In a similar vein to the question "forums.xamarin.com/discussion/138821/navigating-on-android-webview-doesnt-always-fire" (sorry, I'm too new to post links) about WebView events in Android, I found another issue with the Navigating event in Android that works in iOS.

I'm trying to implement a UITest backdoor to decouple the internet from my webview. The app itself will display the content of a URL but during the UITest, I would like to display some simple Hello World html.

When the test runs for the iOS platform, the Navigating event fires, I display a simple "Loading..." label and then hide it when the Navigated event fires.

Examining the source code, it appears the Android WebViewRenderer only fires the Navigating event if a URL is being loaded. It doesn't fire if an html string is being rendered. While this is logically reasonable, it does defeat the parity I need for my UITest.


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>