Skip to main content

Set Playwright project baseURL

Learn how to set the baseURL for a Playwright project via BrowserStack SDK configuration

The baseURL parameter in Playwright is used to configure the base (root) URL for all your tests. When you navigate to a relative URL in a test, it’s resolved against your baseURL. In the absense of baseURL, you must use the complete URL in your test scripts. In a Playwright test project, the base URL is set as a configuration option within the use object.

To set baseURL for a Playwright project via the BrowserStack SDK, nest it under the use section within playwrightConfigOptions in the browserstack.yml file as shown here:

browserstack.yml
Copy icon Copy snippet

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Download Copy