Skip to content

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

fix(locators): not waiting until handle is disposed (#8735)

Kai Haoa1f26976b08c
diff --git a/src/client/locator.ts b/src/client/locator.ts
index fade145f1a..5cc07e36d6 100644
--- a/src/client/locator.ts
+++ b/src/client/locator.ts
@@ -41,7 +41,7 @@ export class Locator implements api.Locator {
try {
return await task(handle, deadline ? deadline - monotonicTime() : 0);
} finally {
- handle.dispose();
+ await handle.dispose();
}
}