I getting null value from web element object in code below.
Im currently getting a null pointer exception error.
WebElement element = null;
String locatorVal = "userId";
element = Constant.driver.findElement(By.id(locatorVal));
I getting null value from web element object in code below.
Im currently getting a null pointer exception error.
WebElement element = null;
String locatorVal = "userId";
element = Constant.driver.findElement(By.id(locatorVal));
probably you should change code as below. Or share more info
element = driver.findElement(By.id(locatorVal));