Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- await page.fill('input[name=title]', 'Title');
- await page.fill('input[name=author]', 'Author');
- const [request] = await Promise.all([
- page.waitForRequest(request => request.method() === 'POST'),
- page.click('text=Submit'),
- ]);
- const data = JSON.parse(request.postData());
- expect(data.title).to.be.equal('Title');
- expect(data.author).to.be.equal('Author');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement