However, we do not have this functionality on the BaseWebElement. Depending on the situation, if a user needs to do a findElement() or findElements() call from a property, it will hit the BaseWebElement() and therefore not have access to the nicely formatted constructor. We should go ahead and add this functionality.
A/C
BaseWebElement should have a method for finding an element with a parameter of cssSelector
Summary
Currently,
AbstractWebElement
has a constructor with a parameter ofString cssSelector
. This is helpful when creating new properties with cssSelectors as it cuts down on the amount of code required to instantiate these variables. https://github.com/kgress/scaffold/blob/master/framework/src/main/java/io/github/kgress/scaffold/webelements/AbstractWebElement.java#L45However, we do not have this functionality on the
BaseWebElement
. Depending on the situation, if a user needs to do afindElement()
orfindElements()
call from a property, it will hit theBaseWebElement()
and therefore not have access to the nicely formatted constructor. We should go ahead and add this functionality.A/C
BaseWebElement
should have a method for finding an element with a parameter of cssSelector