Sha256: 371a707b66a965b53b78373142ca51e20e31f0dfeed21b65d7642ee207a1f277

Contents?: true

Size: 869 Bytes

Versions: 32

Compression:

Stored size: 869 Bytes

Contents

package sh.calaba.instrumentationbackend.actions.webview;


import sh.calaba.instrumentationbackend.Result;
import sh.calaba.instrumentationbackend.actions.Action;
import android.webkit.WebView;

public class DumpHtml implements Action {

    @Override
    public Result execute(String... args) {
    	                         
    	Result result = Result.successResult();
    	for (CalabashChromeClient ccc : CalabashChromeClient.findAndPrepareWebViews()) {
    		WebView webView = ccc.getWebView();
			
			webView.loadUrl("javascript:(function() {" +
				"prompt('calabash:' + document.body.parentNode.innerHTML);" + 
				"})()");

			String r = ccc.getResult();
			System.out.println("Html:");
			System.out.println("" + r);
			result.addBonusInformation(r);
		}
    	return result;
    }

    @Override
    public String key() {
        return "dump_html";
    }
}

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
calabash-android-0.0.13 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/webview/DumpHtml.java
calabash-android-0.0.12 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/webview/DumpHtml.java
calabash-android-0.0.11 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/webview/DumpHtml.java
calabash-android-0.0.10 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/webview/DumpHtml.java
calabash-android-0.0.8 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/webview/DumpHtml.java
calabash-android-0.0.7 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/webview/DumpHtml.java
calabash-android-0.0.6 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/webview/DumpHtml.java
calabash-android-0.0.5 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/webview/DumpHtml.java
calabash-android-0.0.4 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/webview/DumpHtml.java
calabash-android-0.0.3 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/webview/DumpHtml.java
calabash-android-0.0.2 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/webview/DumpHtml.java
calabash-android-0.0.1 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/webview/DumpHtml.java