Skip to content

feat(webdriver): network traffics manipulation - #4166

Merged
kobenguyent merged 3 commits into
3.xfrom
feat-grab-network-traffics-webdriver
Feb 7, 2024
Merged

feat(webdriver): network traffics manipulation#4166
kobenguyent merged 3 commits into
3.xfrom
feat-grab-network-traffics-webdriver

Conversation

@kobenguyent

@kobenguyent kobenguyent commented Jan 31, 2024

Copy link
Copy Markdown
Collaborator

Motivation/Description of the PR

🛩️ Features

  • [Webdriver] Added commands to check network traffics - supported only with devtoolsProtocol
    • startRecordingTraffic
    • grabRecordedNetworkTraffics
    • flushNetworkTraffics
    • stopRecordingTraffic
    • seeTraffic
    • dontSeeTraffic

Examples:

// recording traffics and verify the traffic
  I.startRecordingTraffic();
  I.amOnPage('https://codecept.io/');
  I.seeTraffic({ name: 'traffics', url: 'https://codecept.io/img/companies/BC_LogoScreen_C.jpg' });
// check the traffic with advanced params
  I.amOnPage('https://openai.com/blog/chatgpt');
  I.startRecordingTraffic();
  I.seeTraffic({
    name: 'sentry event',
    url: 'https://images.openai.com/blob/cf717bdb-0c8c-428a-b82b-3c3add87a600',
    parameters: {
      width: '1919',
      height: '1138',
    },
  });

Applicable helpers:

  • Playwright
  • WebDriver

Type of change

  • 📋 Documentation changes/updates
  • 🔨 Markdown files fix - not related to source code

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)

@kobenguyent
kobenguyent merged commit f1acf77 into 3.x Feb 7, 2024
@kobenguyent
kobenguyent deleted the feat-grab-network-traffics-webdriver branch February 7, 2024 04:52
@kobenguyent kobenguyent mentioned this pull request Feb 16, 2024
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.

1 participant