Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(playwright): recording WS messages #3789

Merged
merged 1 commit into from Aug 19, 2023
Merged

Conversation

kobenguyent
Copy link
Collaborator

Motivation/Description of the PR

  • feat(playwright): recording WS messages

Recording WS messages:

      await I.startRecordingWebSocketMessages();
      await I.amOnPage('https://websocketstest.com/');
      I.waitForText('Work for You!');
      const wsMessages = I.grabWebSocketMessages();
      expect(wsMessages.length).to.greaterThan(0);

flushing WS messages:

      await I.startRecordingWebSocketMessages();
      I.amOnPage('https://websocketstest.com/');
      I.waitForText('Work for You!');
      I.flushNetworkTraffics();
      const wsMessages = I.grabWebSocketMessages();
      expect(wsMessages.length).to.equal(0);

Applicable helpers:

  • Playwright

Type of change

  • 馃殌 New functionality

Checklist:

  • Tests have been added
  • Documentation has been added (Run npm run docs)
  • Lint checking (Run npm run lint)
  • Local tests are passed (Run npm test)

@Arhell Arhell requested a review from DavertMik August 4, 2023 00:14
@DavertMik DavertMik merged commit 9971514 into 3.x Aug 19, 2023
9 checks passed
@DavertMik DavertMik deleted the feat/pw-grab-ws-messages branch August 19, 2023 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants