Rayrun
โ† Back to Discord Forum

BaseURL can be used in page.goto(), page.route(), page.waitForURL(), page.waitForRequest() BUT

.aleksandaraleksandrovposted in #help-playwright
Open in Discord
.aleksandaraleksandrov
.aleksandaraleksandrov

I can't use it in const responsePromise = page.waitForResponse(response => response.url() === 'https://mycoolurl/api/endpoint' && response.status() === 200);

I won't be able to ===, So I should be able to only match the URL?

const responsePromise = page.waitForResponse(response => response.url().match('api/endpoint') !== null && response.status() === 200);

As I can see I can't use baseURL in await request.get/post/delete too ๐Ÿ˜ฆ

This thread is trying to answer question "How can I use baseURL in page.waitForResponse() and request.get/post/delete?"

0 replies

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 [email protected].