I have a separate driver class which implements WebDriver and has all the common methods. I wrote another class called Screenshot util in which I wrote implementation of screenshots using Ashot, baseLinePageScreenshots(Driver driver, String name) here name is screenshot and name driver is Driver class object. In my test case I called the above method and passed Driver class object only
sutil.baseLinePageScreenshots(driver, method.getName());
but when I execute I facing following exception:
java.lang.IllegalArgumentException: Driver must have capabilities