1 private static ElementLocatorFactory getDefaultElementLocatorFactory(WebDriver driver, int timeout) {2 DefaultElementLocatorFactory factory = new DefaultElementLocatorFactory(driver);3 return new DefaultElementLocatorFactory(driver) {4 public ElementLocator createLocator(Field field) {5 return new DefaultElementLocator(driver, field, timeout);6 }7 };8 }9 private static ElementLocatorFactory getDefaultElementLocatorFactory(WebDriver driver) {10 DefaultElementLocatorFactory factory = new DefaultElementLocatorFactory(driver);11 return new DefaultElementLocatorFactory(driver) {12 public ElementLocator createLocator(Field field) {13 return new DefaultElementLocator(driver, field);14 }15 };16 }17 private static ElementLocatorFactory getDefaultElementLocatorFactory(WebDriver driver, int timeout, int pollingTime) {18 DefaultElementLocatorFactory factory = new DefaultElementLocatorFactory(driver);19 return new DefaultElementLocatorFactory(driver) {20 public ElementLocator createLocator(Field field) {21 return new DefaultElementLocator(driver, field, timeout, pollingTime);22 }23 };24 }25 private static ElementLocatorFactory getDefaultElementLocatorFactory(WebDriver driver, int timeout, int pollingTime, boolean ignoreStaleElements) {26 DefaultElementLocatorFactory factory = new DefaultElementLocatorFactory(driver);27 return new DefaultElementLocatorFactory(driver) {28 public ElementLocator createLocator(Field field) {29 return new DefaultElementLocator(driver, field, timeout, pollingTime, ignoreStaleElements);30 }31 };32 }33 private static ElementLocatorFactory getDefaultElementLocatorFactory(WebDriver driver, int timeout, int pollingTime, boolean ignoreStaleElements, boolean checkVisibility) {34 DefaultElementLocatorFactory factory = new DefaultElementLocatorFactory(driver);35 return new DefaultElementLocatorFactory(driver) {36 public ElementLocator createLocator(Field field) {37 return new DefaultElementLocator(driver, field, timeout, pollingTime, ignoreStaleElements, checkVisibility);38 }39 };40 }