I am getting Null pointer exception error in line "wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(ElementPath)));" in below code.
Could you please help me on this.
private static FluentWait<WebDriver> wait;
String ElementPath = null;
clickAnElementByLinkText(ElementPath);
public static void clickAnElementByLinkText(String ElementPath) { wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(ElementPath)));
driver.findElement(By.xpath(ElementPath)).click();
}