public ElementLocatorFactory getLocatorFor(SearchContext searchContext, WebDriver driver) { String locatorType = ThucydidesSystemProperty.THUCYDIDES_LOCATOR_FACTORY.from(environmentVariables,"SmartElementLocatorFactory"); if (locatorType.equals("AjaxElementLocatorFactory")) { return new AjaxElementLocatorFactory(searchContext, timeoutInSeconds); } else if (locatorType.equals("DefaultElementLocatorFactory")) { return new DefaultElementLocatorFactory(searchContext); } else if (locatorType.equals("SmartElementLocatorFactory")){ return new SmartElementLocatorFactory(searchContext, platformFor(driver), timeoutInSeconds); } else { throw new IllegalArgumentException("Unsupported ElementLocatorFactory implementation: " + locatorType); } }
public ElementLocatorFactory getLocatorFor(SearchContext searchContext, WebDriver driver) { String locatorType = ThucydidesSystemProperty.THUCYDIDES_LOCATOR_FACTORY.from(environmentVariables,"SmartElementLocatorFactory"); if (locatorType.equals("AjaxElementLocatorFactory")) { return new AjaxElementLocatorFactory(searchContext, timeoutInSeconds); } else if (locatorType.equals("DefaultElementLocatorFactory")) { return new DefaultElementLocatorFactory(searchContext); } else if (locatorType.equals("SmartElementLocatorFactory")){ return new SmartElementLocatorFactory(searchContext, platformFor(driver), timeoutInSeconds); } else { throw new IllegalArgumentException("Unsupported ElementLocatorFactory implementation: " + locatorType); } }