So far i browsed the same topic over the internet but not getting the right answer.
I want to execute the script/suite with HTMLUnit driver but it getting fail and showing exception:
Exception while taking screenshot org.openqa.selenium.htmlunit.HtmlUnitDriver cannot be cast to org.openqa.selenium.TakesScreenshot
As I understood it got stuck at Screenshot capturing code. So my question is . Is there any way to capture screenshot while executing script using HTMLUnit driver ?
Because in My framework i'm calling the common takeScreenshot method from so many places wherever any change happening on the page like:
before filling the form --> after filling the form --> after submit the form
So i can't remove all those method call from whole suite.