In this blog, we are going to
learn how we can execute Selenium Automation Test in Headless mode or
browser using FireFox.
Before going forward, I would highly recommend
to you to visit my blog to understand about headless browser its type and its
use.
To use FireFox browser we need
to addCommandLineOptions–headless in our code and use it along
with FirefoxBinary.
Please
refer below code snippet where I have read the title of google homepage in Firefox headless mode along.
Result of above code execution would be like:
After Reading this the next logical question you would be having how to capture screenshot in Headless Mode. Please refer to this blog for more details.
Result of above code execution would be like:
After Reading this the next logical question you would be having how to capture screenshot in Headless Mode. Please refer to this blog for more details.
I get error 'The constructor FirefoxDriver(FirefoxOptions) is undefined'
Reply