ModHeader for Firefox Selenium (WebDriver)
This is for using ModHeader in Selenium WebDriver for Firefox. For the Chrome version, look for chrome-modheader instead.
Installation:
npm install firefox-modheader
Usage
const { getExtension, getAddHeaderUrl } = require('firefox-modheader');
const options = new firefox.Options();
options.addExtensions(getExtension());
const driver = await new Builder().forBrowser('firefox').setFirefoxOptions(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.