Sha256: 5a7fbb432fb6502ad1cb5293bd858ae8c0760c967b0f150628e53ef79f96302e
Contents?: true
Size: 1.04 KB
Versions: 14
Compression:
Stored size: 1.04 KB
Contents
package sh.calaba.instrumentationbackend.actions.webview; import sh.calaba.instrumentationbackend.InstrumentationBackend; import sh.calaba.instrumentationbackend.Result; import sh.calaba.instrumentationbackend.actions.Action; import android.webkit.WebView; public class DumpBodyHtml implements Action { @Override public Result execute(String... args) { final Result result = Result.successResult(); for (CalabashChromeClient ccc : CalabashChromeClient.findAndPrepareWebViews()) { WebView webView = ccc.getWebView(); webView.loadUrl("javascript:(function() {" + "prompt('calabash:' + document.body.innerHTML);" + "})()"); String r = ccc.getResult(); System.out.println("Html:"); System.out.println("" + r); result.addBonusInformation(r); return result; } return new Result(false, "No WebView found"); } public String key() { return "dump_body_html"; } }
Version data entries
14 entries across 14 versions & 2 rubygems