MCPcopy Index your code
hub / github.com/darkreader/darkreader / launchFirefox

Method launchFirefox

tests/browser/environment.js:129–143  ·  view source on GitHub ↗

* @returns {Promise }

()

Source from the content-addressed store, hash-verified

127 * @returns {Promise<Browser>}
128 */
129 async launchFirefox() {
130 // We need to manually launch Firefox via cmd.run() to install extension
131 // because Firefox does not support installing via CLI arguments
132 process.setMaxListeners(process.getMaxListeners() + 1);
133 const firefox = await getFirefoxPath();
134 const browser = await launch({
135 browser: 'firefox',
136 executablePath: firefox,
137 protocol: 'webDriverBiDi',
138 headless: false,
139 args: [`--remote-debugging-port=${FIREFOX_DEVTOOLS_PORT}`],
140 });
141 await browser.installExtension(firefoxExtensionDebugDir);
142 return browser;
143 }
144
145 async createTestPage() {
146 const page = await this.browser.newPage();

Callers 1

launchBrowserMethod · 0.95

Calls 1

getFirefoxPathFunction · 0.90

Tested by

no test coverage detected