- final ContentView view, TestCallbackHelperContainer viewClient,
- final String code) throws InterruptedException, TimeoutException {
- return executeJavaScriptAndWaitForResult(
- view.getContentViewCore(),
- viewClient.getOnEvaluateJavaScriptResultHelper(),
- code);
- }
-
- /**
- * Executes the given snippet of JavaScript code within the given ContentViewCore.
- * Does not depend on ContentView and TestCallbackHelperContainer.
- * Returns the result of its execution in JSON format.
- */
- public static String executeJavaScriptAndWaitForResult(
- final ContentViewCore viewCore,
- final TestCallbackHelperContainer.OnEvaluateJavaScriptResultHelper helper,
- final String code) throws InterruptedException, TimeoutException {