
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
har-recorder
Advanced tools
Use this package to capture HAR recordings from Chrome sessions or Selenium tests.
const { startRecording, endRecording } = HarRecorder();
// enable chrome remote debugging on port 9223
let chrome_options = new chrome.Options()
.addArguments("--remote-debugging-port=9223");
driver = await new Builder()
.setChromeOptions(chrome_options)
.forBrowser('chrome')
.build();
// start the recording on port 9223
await startRecording({ port: 9223 });
// do Selenium stuff
await driver.navigate().to('http://www.google.com');
await driver.wait(until.elementLocated(By.name('identification')));
// save recording to file
endRecording('create-blog-post.har');
driver.quit();
npm install har-recorder
An instance of either Chrome itself or another implementation needs to be
running on a known port in order to use this module (defaults to
localhost:9222
).
The API consists of three parts:
The constractor function which creates a new HarRecorder.
startRecording([options])
which starts recording a given Chrome instance. The recording defaults to
localhost:9222
. Overide this by passing a CDP options object.
endRecording(filePath)
which saves the HAR recording to a file and resets the stored requests.
FAQs
capture HAR recordings from Chrome sessions or Selenium tests
The npm package har-recorder receives a total of 3 weekly downloads. As such, har-recorder popularity was classified as not popular.
We found that har-recorder demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.