1public class AjaxElementLocator extends DefaultElementLocator {2private final WebDriver driver;3private final int timeOutInSeconds;4public AjaxElementLocator(WebDriver driver, Field field, int timeOutInSeconds) {5super(driver, field);6this.driver = driver;7this.timeOutInSeconds = timeOutInSeconds;8}9public WebElement findElement() {10return new WebDriverWait(driver, timeOutInSeconds).until(ExpectedConditions.presenceOfElementLocated(by));11}12public List<WebElement> findElements() {13return new WebDriverWait(driver, timeOutInSeconds).until(ExpectedConditions.presenceOfAllElementsLocatedBy(by));14}15}16public class AjaxElementLocatorFactory implements ElementLocatorFactory {17private final WebDriver driver;18private final int timeOutInSeconds;19public AjaxElementLocatorFactory(WebDriver driver, int timeOutInSeconds) {20this.driver = driver;21this.timeOutInSeconds = timeOutInSeconds;22}23public ElementLocator createLocator(Field field) {24return new AjaxElementLocator(driver, field, timeOutInSeconds);25}26}27public class AjaxElementLocatorFactory implements ElementLocatorFactory {28private final WebDriver driver;29private final int timeOutInSeconds;30public AjaxElementLocatorFactory(WebDriver driver, int timeOutInSeconds) {31this.driver = driver;32this.timeOutInSeconds = timeOutInSeconds;33}34public ElementLocator createLocator(Field field) {35return new AjaxElementLocator(driver, field, timeOutInSeconds);36}37}38public class AjaxElementLocatorFactory implements ElementLocatorFactory {39private final WebDriver driver;40private final int timeOutInSeconds;41public AjaxElementLocatorFactory(WebDriver driver, int timeOutInSeconds) {42this.driver = driver;43this.timeOutInSeconds = timeOutInSeconds;44}45public ElementLocator createLocator(Field field) {46return new AjaxElementLocator(driver, field, timeOutInSeconds);47}48}49public class AjaxElementLocatorFactory implements ElementLocatorFactory {50private final WebDriver driver;51private final int timeOutInSeconds;52public AjaxElementLocatorFactory(WebDriver driver, int timeOutInSeconds) {53this.driver = driver;54this.timeOutInSeconds = timeOutInSeconds;55}56public ElementLocator createLocator(Field field) {57return new AjaxElementLocator(driver, field, timeOutInSeconds