The pages I am testing have different page load time, some load in 2 second some in 4 or longer. I am using page object model with PageFactory and explicit wait as shown below but it didn't work. Could you please show me the correct way of using explicit wait with page factory? If page factory is not the best choise for using explicit wait, could you show me an example using object model without page factory? Do I also need to use a pageLoadTimeout along with explicit wait?
PageFactory.initElements(new AjaxElementLocatorFactory(driver, 40), this);