Requestly for Selenium
Add Network Interception & Modification powers to Selenium without code. Modify Headers, Insert Custom Scripts, Set up Redirects, Add Throttles and much more to Selenium using Requestly.

The @requestly/selenium package is deprecated. Use @requestly/rq-automation instead for integrating Requestly with your automation framework.
Takes less than a minute
Use Boilerplate Code
Turn your E2E tests into power tools with Requestly. Use the @requestly/rq-automation package to integrate easily, create rules without code, and apply them using a shared list URL or API key.
const {
addRequestHeaderUrl, addRequestHeadersUrl,
removeRequestHeaderUrl, removeRequestHeadersUrl,
addResponseHeaderUrl, addResponseHeadersUrl,
removeResponseHeaderUrl, removeResponseHeadersUrl,
importRules,
closeWelcomePage,
} = require("@requestly/rq-automation");
const { Builder } = require("selenium-webdriver");
const chrome = require("selenium-webdriver/chrome");
const { getExtension } = require("@requestly/rq-automation");
async function setupDriver() {
const options = new chrome.Options();
// Load Requestly extension
const extensionPath = getExtension("unpacked");
options.addArguments(`--load-extension=${extensionPath}`);
options.addArguments(`--disable-extensions-except=${extensionPath}`);
const driver = await new Builder()
.forBrowser("chrome")
.setChromeOptions(options)
.build();
return driver;
}
async function seleniumExample() {
const driver = await setupDriver();
await closeWelcomePage(driver);
// Add a single request header
await driver.get(addRequestHeaderUrl("X-Custom-Header", "MyValue"));
// Add multiple request headers
await driver.get(
addRequestHeadersUrl({
Authorization: "Bearer token123",
"X-Another-Header": "AnotherValue",
})
);
// Remove a request header
await driver.get(removeRequestHeaderUrl("X-Another-Header"));
// Remove multiple request headers
await driver.get(
removeRequestHeadersUrl(["Authorization", "X-Custom-Header"])
);
// Add a response header
await driver.get(addResponseHeaderUrl("Access-Control-Allow-Origin", "*"));
// Add multiple response headers
await driver.get(
addResponseHeadersUrl({
"X-Response-Header": "ResponseValue",
"X-Another-Response-Header": "AnotherResponseValue",
})
);
// Remove a response header
await driver.get(removeResponseHeaderUrl("X-Another-Response-Header"));
// Remove multiple response headers
await driver.get(
removeResponseHeadersUrl(["X-Response-Header", "X-Another-Response-Header"])
);
// Import a shared list of rules
await driver.get(importRules("YOUR_API_KEY"));
// Your test code here
await driver.get("https://example.com");
await driver.quit();
}
seleniumExample();
Loved by developers around the World
Developers around the world trust us to simplify debugging, speed up workflows, and make development more efficient.
Modifying requests and/or responses is the killer feature area for me. Redirect JS in prod, generate mocks, modify headers, map local, map remote, SessionReplay, Load a local JS bundle, override scripts, etc. etc. etc. - TOTALLY worth it and very useful.


Requestly is an incredibly useful tool for developers working on a large team with multiple staging envs, or numerous app endpoints for various APIs in a local environment. The Sessions feature is especially useful for documenting solutions or sharing with others since it captures the relevant network traffic, and screen recording enables others to easily reproduce. Requestly combines all the power of complicated tools like Charles Proxy and Postman in one app/chrome extension. I highly recommend giving it a try if you haven't already–it will make your dev work so much easier. (Summarized)


Just loved the way Requestly saved several person hours for our dev team by allowing us to redirect and intercept requests. The simple yet efficient rules allowed us to seamlessly redirect requests from a single staging front-end server to local backend servers. This meant that our devs didn't need to build or run the front-end server locally when focusing on backend tasks.


Requestly is an amazing tool to get your development work less hassle. The product itself has evolved so much since day-1 and the company is really serious on helping their customer solves their problems. We had this nice session where they shared Requestly features and we were very impressed on its potential. A truly 5-star worthy.


Requestly is user-friendly, brilliant and easy-to-use. I use it on an daily basis and it makes my work easier. After using other tools like Charles - Requestly is a nice new breath of air that I highly vouch for. Apart from the tool being amazing - the support from the Requestly team is phenomenal with them always going above and beyond for their clients.


App works as expected! Ran into some small issues while creating the rules but the support team was able to help and overcome those.


Awesome tool. I use it almost daily for my projects to modify request body, headers, etc. Would recommend it to every frontend developer out there. Thank me later 🙂 (Case Study)


I'm a big fan of Requestly, and use it on a daily basis as a QA Engineer. It removes the need to use Charles Proxy often, which is always nice. I can just use Requestly directly in Chrome


Requestly not just made it easier for us to develop, test & debug our code on our customer sites but also helped us do engaging product demos to our prospective clients.
