ModHeader for Chrome Selenium (WebDriver)
This is for using ModHeader in Selenium WebDriver for Chrome. For the Firefox version, look for firefox-modheader instead.
Installation:
npm install chrome-modheader
Usage
const { getExtension, getAddHeaderUrl } = require('chrome-modheader');
const options = new chrome.Options().addExtensions(getExtension());
const driver = await new Builder().forBrowser('chrome').setChromeOptions(options).build();
await driver.get(getAddHeaderUrl('HeaderName', 'HeaderValue'));
Please visit ModHeader webdriver documentation page for more details on how to use ModHeader in Selenium WebDriver.