Advertisement
bebo231312312321

Untitled

Jul 5th, 2023
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. await page.fill('input[name=title]', 'Title');
  2.         await page.fill('input[name=author]', 'Author');
  3.  
  4.         const [request] = await Promise.all([
  5.             page.waitForRequest(request => request.method() === 'POST'),
  6.             page.click('text=Submit'),
  7.         ]);
  8.         const data = JSON.parse(request.postData());
  9.  
  10.         expect(data.title).to.be.equal('Title');
  11.         expect(data.author).to.be.equal('Author');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement