I am using POM with having some common operations like, click, checkText, etc declared in my TestBase class. I have the problem while transition from one step to another. To overcome this issue i want to add explicit wait, and i want to put it in my common operations in TestBase class. i am writing the code as,
For test base class,
public WebDriverWait wait = new WebDriverWait(webDriver,10);
And on the specific page;
landingPage.wait.until(ExpectedConditions.visibilityOf(WebElement)
I am getting the error java.lang.NullPointerException
because of TestBase class. May be i am using WebDriver multiple times? I am not sure about that as i have tried many possibilities but still failed.
please help me out.