HtmlUnitDriver Usage in Selenium WebDRiver
Can anyone please help me the usage of HtmlunitDriver?
I tried in Google, I am bit new to Selenium So i am unable to understand the examples provided in Google?
Is it open any browser? where exactly we will use this one?
Is there any extra configuration required to use this driver?
Thanks in Advance,
HTMLUnit is a headless browser. But these days more people will generally opt to use the PhantomJS driver instead because it more closely mimics Chrome while HTMLUnit does not render close to any production browsers out there.
What HTMLUnit browser is good for is if you're a framework developer that wants his unit tests to run quickly for testing extensions you're writing for Selenium. HTML unit is a good way to go since it doesn't incur extra dependencies of deploying PhantomJS on the host machine when running it CI on a open source cloud environment.
Still confusion is going on, how Selenium will interact with this browser if there is no UI for the application?
i tried below piece of code but it fails at identifying the locator
WebDriver driver = new HtmlUnitDriver();
Originally Posted by Chowdary287
Use something like https://github.com/detro/ghostdriver instead for headless testing.