I was reading up on it in the docs, and found these 3 lines code:
// Start waiting for response before clicking. Note no await. const responsePromise = page.waitForResponse('https://example.com/resource'); await page.getByText('trigger response').click(); const response = await responsePromise;``` I am fairly new and don't seem to understand this. Isn't in this case response being a unused variable?
This thread is trying to answer question "Isn't in this case response being a unused variable? Why is my test not always able to find the data inside a dropdown even after the waitForResponse is done?"
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 firstname.lastname@example.org.