Is your feature request related to a problem? Please describe.
New baseURL option in browser.newContext([options]) and browser.newPage([options]) was introduced in Playwright v1.13.
We often need to get the baseURL, and try to get it from somewhere such as browserContext.
But I couldn't find the proper method or property to get the baseURL.
Describe the solution you'd like
I'm glad if the jest-playwright provides the method for getting the baseURL.
How about defining baseURL as global variable like these?
Is your feature request related to a problem? Please describe. New
baseURL
option inbrowser.newContext([options])
andbrowser.newPage([options])
was introduced in Playwright v1.13.We often need to get the
baseURL
, and try to get it from somewhere such asbrowserContext
. But I couldn't find the proper method or property to get thebaseURL
.Describe the solution you'd like
I'm glad if the jest-playwright provides the method for getting the
baseURL
. How about definingbaseURL
as global variable like these?https://github.com/playwright-community/jest-playwright/blob/6054b72f5ee937b9673683c806b02d91e2c8e379/src/PlaywrightEnvironment.ts#L259-L260
Additional context
I've already asked playwright repository. https://github.com/microsoft/playwright/issues/9439