无法使用webview android studio播放视频,但是在取消静音时可以播放
const link = element(...);
const beforeText = await link.getText();
await link.click()
const afterText = await link.getText();
expect(beforeText).toEqual(afterText);
答案 0 :(得分:0)
WebSettings settings = mWb.getSettings();
settings.setLoadWithOverviewMode(true);
settings.setAllowFileAccess(true);
settings.setJavaScriptEnabled(true);
settings.setDefaultTextEncodingName("utf-8");
settings.setCacheMode(WebSettings.LOAD_NO_CACHE);
settings.setRenderPriority(WebSettings.RenderPriority.HIGH);
settings.setPluginState(WebSettings.PluginState.ON_DEMAND);
mWb.loadDataWithBaseURL("file:///android_asset/", "assets read string data", "text/html", "UTF-8", null);