11 ms·
Do you need to use selenium to control Firefox in headless mode or does it have something lower level like Chrome's devtools protocol?
by zlagen 9y ago
Do you need to use selenium to control Firefox in headless mode or does it have something lower level like Chrome's devtools protocol?
- codefined 9y agoYou can use use WebDriver/GeckoDriver[0], which is how Selenium actually runs, but most people like the abstraction layer. [0] https://github.com/mozilla/geckodriver https://github.com/mozilla/geckodriver
- masklinn 9y ago1. You can use the WebDriver protocol[0] without selenium 2. Firefox's WebDriver endpoint geckodriver[1] is a layer above Firefox/Gecko's native Marionette protocol[2] So you doubly don't need to use selenium, you can write your own WebDriver client (which should be cross-browser assuming the browsers either support WebDriver natively or have a WD layer of some sort installed) or you can use raw Marionette (either a hand-rolled client or an existing client) [0] https://w3c.github.io/webdriver/webdriver-spec.html#protocol https://w3c.github.io/webdriver/webdriver-spec.html#protocol [1] https://github.com/mozilla/geckodriver https://github.com/mozilla/geckodriver [2] https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionet...
- brendandahl 9y agoPatch author here: To add to the other comments, you could also use SlimerJS[1]. Though I don't know if I'd consider that lower level. We're open to supporting other ways of controlling FIrefox and have been gauging feedback on what to support. [1]https://slimerjs.org/ https://slimerjs.org/