Firefox Selenium Browser Capabilities explained
First news isn’t really that bad. Any time invested in IDE is basically wasted time, so I don’t think there is too much to worry.
Second news is exciting though. I already announced it before in my Headless Chrome before, but now it’s live and ready to play with.
To be honest this post was meant to be about Headless Firefox, but upon testing it and using my code from Browser Capabilities explained post I realized it’s no longer valid. Using Firefox Profiles is now deprecated. From now on we should rely on Browser Capabilities and very familiar mechanism as the one already implemented for Chrome. The code changed very recently, because even official Java example in headless Firefox news is using deprecated methods.
Before I delve deeper into headless mode (which I’ll publish this month) let me show new way of handling Firefox browser in your test.
Getting started with Gecko Driver
Windows users have to also set gecko property (it’s done automatically by brew on Mac).
Using Firefox Browser Capabilities
Using Firefox browser capabilities looks exactly as in Chrome. I’m sure my readers are already very familiar with how I handle capabilities. The code almost like copy/paste from my Chrome examples.
Thankfully we no longer have to rely on flaky Firefox Profile solution. What’s even better, especially comparing to Chrome, is documentation. GeckoDriver GitHub page have it covered very well. I encourage you to take a look.
As usual I posted all the code from above in my GitHub Awesome Testing project.