Hacker News new | past | comments | ask | show | jobs | submit login

Do you need to use selenium to control Firefox in headless mode or does it have something lower level like Chrome's devtools protocol?



1. 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

[1] https://github.com/mozilla/geckodriver

[2] https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionet...


You 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


Patch 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/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: