0

I get a null pointer error on WebDriver Wait statement using TestNG. I use a BaseClass my @test class.

This was working fine till last week but now is throwing a null pointer exception. If I remove the Wait statement, the script runs fine. Please advice. Below is the line

new WebDriverWait(BaseClass2.driver,30).until(ExpectedConditions.visibilityOfElementLocated(By.xpath(getObject("NewButton"))));
  • How do you set value for BaseClass2.driver? – Alexey R. Oct 1 at 19:10
  • 4
    Code snippet is not enough to understand the error. Paste more of your code. At what line of code are you getting the error. Add more details to your question. – Alok Oct 1 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.