类org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler源码实例Demo

下面列出了怎么用org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: carina   文件: ExtendedFieldDecorator.java
protected ExtendedWebElement proxyForLocator(ClassLoader loader, Field field, ElementLocator locator) {
    InvocationHandler handler = new LocatingElementHandler(locator);
    WebElement proxy = (WebElement) Proxy.newProxyInstance(loader, new Class[] { WebElement.class, WrapsElement.class, Locatable.class },
            handler);
    return new ExtendedWebElement(proxy, field.getName(),
            field.isAnnotationPresent(FindBy.class) || field.isAnnotationPresent(ExtendedFindBy.class)? new LocalizedAnnotations(field).buildBy() : null);
}
 
源代码2 项目: bobcat   文件: CurrentWebElementProvider.java
private WebElement getWebElementFromFactory(ElementLocatorFactory factory) {
  InvocationHandler handler = new LocatingElementHandler(
      ((ParentElementLocatorProvider) factory).getCurrentScope());
  return (WebElement) Proxy.newProxyInstance(WebElement.class.getClassLoader(),
      new Class[] {WebElement.class, WrapsElement.class, Locatable.class}, handler);
}
 
 类所在包
 类方法
 同包方法