Function: getPlaywrightVersion()
getPlaywrightVersion():
PlaywrightVersion
Reads the installed @playwright/test version from disk.
Returns
Parsed Playwright version.
Remarks
Uses createRequire to resolve and load the @playwright/test/package.json.
This works in both ESM and CJS contexts.
Example
const version = getPlaywrightVersion();
logger.info(version.raw); // '1.58.2'