Package de.bmiag.tapir.selenium.element
Class WebElementProxyFactory
- java.lang.Object
-
- de.bmiag.tapir.selenium.element.WebElementProxyFactory
-
@Component("webElementProxyFactory") public class WebElementProxyFactory extends java.lang.Object
Provides a proxy for a single web element or for a list of web elements. For further information consultSearchContextMethodInterceptor
andWebElementListMethodInterceptor
.- Since:
- 2.0.0
- Author:
- Oliver Libutzki <[email protected]>
- See Also:
SearchContextMethodInterceptor
,WebElementListMethodInterceptor
-
-
Constructor Summary
Constructors Constructor Description WebElementProxyFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<org.openqa.selenium.WebElement>
getWebElementListProxy(com.google.common.base.Supplier<java.util.List<org.openqa.selenium.WebElement>> webElementListSupplier)
Proxies a list ofweb elements
.org.openqa.selenium.WebElement
getWebElementProxy(com.google.common.base.Supplier<org.openqa.selenium.WebElement> webElementSupplier)
Proxies theWebElement
which is supplied by the given webElementSupplier.
-
-
-
Method Detail
-
getWebElementProxy
public org.openqa.selenium.WebElement getWebElementProxy(com.google.common.base.Supplier<org.openqa.selenium.WebElement> webElementSupplier)
Proxies theWebElement
which is supplied by the given webElementSupplier. The proxy implements all interfaces whichwebElementType
implements. Prxoying the web element ensures that it is queried lazily, so you can get a web element although it might not be present on the current page.- Parameters:
webElementSupplier
-WebElement
Supplier
- Returns:
- the proxied web element
- See Also:
SearchContextMethodInterceptor
-
getWebElementListProxy
public java.util.List<org.openqa.selenium.WebElement> getWebElementListProxy(com.google.common.base.Supplier<java.util.List<org.openqa.selenium.WebElement>> webElementListSupplier)
Proxies a list ofweb elements
. The proxied list ensures that all contained web elements are proxied bygetWebElementProxy(Supplier)
.- Parameters:
webElementListSupplier
-WebElement
listSupplier
- Returns:
- the proxied web element list
- See Also:
WebElementListMethodInterceptor
-
-