Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upComposition instead of Inheritance might help with leveraging WebElement #6
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
Instead of the existing implementation which is like follows: