Hi All,
Any leads would be helpful
Iam getting the error:
java.lang.IllegalArgumentException: Driver must be set
in :at utils.FreeCRMApplicationUtil.menuclick(FreeCRMApplicationUtil.java:167)
Below is the method:
public void menuclick(By parentmenu,By childmenu)
{
Actions action = new Actions(driver);
action.moveToElement(getElement(parentmenu)).perform();
action.moveToElement(getElement(childmenu)).click().perform();
}
public WebElement getElement(By locator) {
WebElement element = driver.findElement(locator);
return element;
}
have created the constructor of the class
public FreeCRMApplicationUtil(WebDriver driver) {
this.driver = driver;
}