Recording from WebView

Bitbar, the mobile devops company. Logo, large

Hi all,

I would like to present how to implement WebView in your application for good cooperation with Testdroid Recorder.

First issue is, that we can’t handle any events from WebView, if you don’t use own WebClient and don’t override method shouldOverrideUrlLoading with command view.loadUrl(url) For example:

[sourcecode language=”java”]
webView.setWebViewClient(new MyWebViewClient());

private class MyWebViewClient extends WebViewClient {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
return false; //it doesn’t matter true or false for recording

If you override this method websites are opened directly in WebView, not in default browser. Anyway, all what we are able to record from WebView are clicks on screen (x, y), drags, send keys and enter texts. I hope this help you testing your application with WebViews.