Open
Description
In Issue#3, we asked for inheriting from WebElement by implementing the entire interface. An easier approach could be to leverage the instance behind the WebElement interface by using composition. In CustomWebElement constructor, we can for example maintain a WebElement reference right away. Then within implementation of methods like getAttribute(), we can do following:
public String getAttribute(String attributeName) {
return this.webElemRef.getAttribute(attributeName);
}
Instead of the existing implementation which is like follows:
public String getAttribute(String attributeName) {
return getWebDriver().findElement(getBy()).getAttribute(attributeName);
}
Metadata
Metadata
Assignees
Labels
No labels