playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[Feature]: remove exposed function

Open elyran opened this issue 1 year ago • 2 comments

🚀 Feature Request

Currently there's page.exposeFunction(). We need page.removeExposedFunction().

I saw https://github.com/microsoft/playwright/issues/30422 , but removeExposedFunction is crucial for testing.

Example

No response

Motivation

it would enable event based testing which is crucial to us.

elyran avatar May 09 '24 20:05 elyran

alternatively, just replace the function, without the Function "xyz" has been already registered error it currently throws.

elyran avatar May 09 '24 20:05 elyran

puppeteer implemented it https://github.com/puppeteer/puppeteer/pull/10297

Any plan to do this on playwright?

ohroy avatar Aug 26 '24 09:08 ohroy