public ElementLocatorFactorySelector withTimeout(int timeoutInSeconds) { return new ElementLocatorFactorySelector(timeoutInSeconds, environmentVariables); } }
public ElementLocatorFactory getLocatorFor(WebDriver driver) { return getLocatorFor(driver, driver); }
@Override public void proxyElements(PageObject pageObject, WebDriver driver, int timeoutInSeconds) { ElementLocatorFactory finder = locatorFactories().withTimeout(timeoutInSeconds).getLocatorFor(driver); PageFactory.initElements(new SmartFieldDecorator(finder, driver, pageObject), pageObject); }
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); } }
@Override public void proxyElements(PageObject pageObject, WebDriver driver, int timeoutInSeconds) { ElementLocatorFactory finder = getElementLocatorFactorySelector().withTimeout(timeoutInSeconds).getLocatorFor(driver); FieldDecorator decorator = new SmartFieldDecorator(finder, driver, pageObject); PageFactory.initElements(decorator, pageObject); }
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); } }
@Override public void proxyElements(PageObject pageObject, WebDriver driver, int timeoutInSeconds) { ElementLocatorFactory finder = getElementLocatorFactorySelector().withTimeout(timeoutInSeconds).getLocatorFor(driver); FieldDecorator decorator = new SmartFieldDecorator(finder, driver, pageObject); PageFactory.initElements(decorator, pageObject); }
public ElementLocatorFactorySelector withTimeout(int timeoutInSeconds) { return new ElementLocatorFactorySelector(timeoutInSeconds, environmentVariables); } }
public ElementLocatorFactory getLocatorFor(WebDriver driver) { return getLocatorFor(driver, driver); }
@Override public void proxyElements(WidgetObject widget, WebDriver driver, int timeoutInSeconds) { ElementLocatorFactory finder = getElementLocatorFactorySelector().withTimeout(timeoutInSeconds).getLocatorFor(widget, driver); FieldDecorator decorator = new SmartFieldDecorator(finder, driver, widget.getPage()); PageFactory.initElements(decorator, widget); }
public ElementLocatorFactorySelector withTimeout(int timeoutInSeconds) { return new ElementLocatorFactorySelector(timeoutInSeconds, environmentVariables); } }
@Override public void proxyElements(PageObject pageObject, WebDriver driver) { ElementLocatorFactory finder = getElementLocatorFactorySelector().getLocatorFor(driver); FieldDecorator decorator = new SmartFieldDecorator(finder, driver, pageObject); PageFactory.initElements(decorator, pageObject); }
@Override public void proxyElements(WidgetObject widget, WebDriver driver, int timeoutInSeconds) { ElementLocatorFactory finder = getElementLocatorFactorySelector().withTimeout(timeoutInSeconds).getLocatorFor(widget, driver); FieldDecorator decorator = new SmartFieldDecorator(finder, driver, widget.getPage()); PageFactory.initElements(decorator, widget); }
private ElementLocatorFactorySelector getElementLocatorFactorySelector() { Configuration configuration = ConfiguredEnvironment.getConfiguration(); return new ElementLocatorFactorySelector(configuration); } }
@Override public void proxyElements(PageObject pageObject, WebDriver driver) { ElementLocatorFactory finder = getElementLocatorFactorySelector().getLocatorFor(driver); FieldDecorator decorator = new SmartFieldDecorator(finder, driver, pageObject); PageFactory.initElements(decorator, pageObject); }
private ElementLocatorFactorySelector getElementLocatorFactorySelector() { Configuration configuration = Injectors.getInjector().getInstance(Configuration.class); return new ElementLocatorFactorySelector(configuration); } }
@Override public void proxyElements(PageObject pageObject, WebDriver driver) { PageFactory.initElements(new SmartFieldDecorator(locatorFactories().getLocatorFor(driver), driver, pageObject), pageObject); }
private ElementLocatorFactorySelector locatorFactories() { Configuration configuration = ConfiguredEnvironment.getConfiguration(); return new ElementLocatorFactorySelector(configuration); }
@Override public void proxyElements(WidgetObject widget, WebDriver driver) { ElementLocatorFactory finder = getElementLocatorFactorySelector().getLocatorFor(widget, driver); FieldDecorator decorator = new SmartFieldDecorator(finder, driver, widget.getPage()); PageFactory.initElements(decorator, widget); }
private ElementLocatorFactorySelector getElementLocatorFactorySelector() { Configuration configuration = Injectors.getInjector().getInstance(Configuration.class); return new ElementLocatorFactorySelector(configuration); }