I've used Pagefactory to set up all of my pages in Selenium. The thing is the test are dynamic in that some elements only exist in some of the test. From m understanding AjaxElementFactory works like this:
PageFactory.initElements(new AjaxElementLocatorFactory(driver,5), this);
@FindBy(id="ctl00_DefaultContent_RbIndividual")
WebElement OwnershipIndividual;
public void sendString(String stuff){
OwnershipIndividual.sendKeys(stuff);
}
But if the element OwnershipIndividual is not located in 5 seconds then it would throw a NoSuchElementException. My Problem is that although I have set the timeout for 5 seconds it still takes 50-60 seconds to timeout. Why is that?