playwright-core
Advanced tools
Comparing version
@@ -74,3 +74,6 @@ "use strict"; | ||
}, | ||
onPageClose: () => this._emitSnapshot(false) | ||
onPageClose: () => this._emitSnapshot(false), | ||
onBrowserClose: () => { | ||
this._emitSnapshot(false); | ||
} | ||
}; | ||
@@ -77,0 +80,0 @@ this._playwright.instrumentation.addListener(listener, null); |
@@ -638,7 +638,10 @@ "use strict"; | ||
throwElementIsNotAttached(); | ||
return result2.matches; | ||
return { matches: result2.matches, isRadio: result2.isRadio }; | ||
}; | ||
await this._markAsTargetElement(progress); | ||
if (await isChecked() === state) | ||
const checkedState = await isChecked(); | ||
if (checkedState.matches === state) | ||
return "done"; | ||
if (!state && checkedState.isRadio) | ||
throw new NonRecoverableDOMError("Cannot uncheck radio button. Radio buttons can only be unchecked by selecting another radio button in the same group."); | ||
const result = await this._click(progress, { ...options, waitAfter: "disabled" }); | ||
@@ -649,3 +652,4 @@ if (result !== "done") | ||
return "done"; | ||
if (await isChecked() !== state) | ||
const finalState = await isChecked(); | ||
if (finalState.matches !== state) | ||
throw new NonRecoverableDOMError("Clicking the checkbox did not change its state"); | ||
@@ -652,0 +656,0 @@ return "done"; |
{ | ||
"name": "playwright-core", | ||
"version": "1.56.0-alpha-2025-08-29", | ||
"version": "1.56.0-alpha-2025-08-30", | ||
"description": "A high-level API to automate web browsers", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
8036135
0.01%115879
0.01%