RE: Cannot find elements when the XPath expression is null.

Answered

Hi All;
I’m getting this error.Can anyone please explain me about this?
java.lang.IllegalArgumentException: Cannot find elements when the XPath expression is null.

Thanks

Priya Train Asked on September 9, 2014 in Selenium WebDriver.
Add Comment
3 Answers

Hi,

You need to put the xpath in the place ┬ádriver.findElement(By.xpath(“your xpath”));

Else webdriver will not be able to locate the webelement.

If you are using properties file please check whether you have put in the xpath in the properties file.

Thanks,
Vishal S

Doctor Answered on September 9, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.