It's my first time using Playwright and I just can't figure out how to check if a request is made to the server. I want to press a button that sends request and and validate if it was successful or not. I am using chromium from Playwright and making tests with Mocha and Chai. This is my code:
const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto(url);
await page.click('text=Send');
// Validate if the request is send
await browser.close();
I may be trying to do it wrong, but I don't have much experience with Playwright, so any help will be appreciated.