Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

test: unflake webview tests (#6644)

Dmitry Gozmane804d16dcef4
diff --git a/tests/android/webview.spec.ts b/tests/android/webview.spec.ts
index 34a44752c7..58fd4b92ed 100644
--- a/tests/android/webview.spec.ts
+++ b/tests/android/webview.spec.ts
@@ -16,6 +16,10 @@
import { androidTest as test, expect } from './androidTest';
+test.afterEach(async ({ androidDevice }) => {
+ await androidDevice.shell('am force-stop org.chromium.webview_shell');
+});
+
test('androidDevice.webView', async function({ androidDevice }) {
expect(androidDevice.webViews().length).toBe(0);
await androidDevice.shell('am start org.chromium.webview_shell/.WebViewBrowserActivity');