Rayrun
← Back to Discord Forum

Pass baseURL from dynamically created projects to test

Hello everyone,

I am trying to setup a multi-URL test runs. The URLs are passed from a file (it will be based on envVars in the future). The goal that I want to achieve is to have dynamically created projects in the playwright.config so that I can run same test against multiple URLs. So far, I am able to access the project name from the test, but the URL is undefined. Any ideas on how can I solve this?

projects: testData.map((url) => ({ name: url.name, baseURL: url.baseURL, })),

Thanks!

This thread is trying to answer question "How can I pass baseURL from dynamically created projects to test in Playwright?"

1 reply

I fixed it by adding the baseURL in use.. totally forgot about it

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.