Open kgress opened 3 years ago
I think this is still a great idea. We've already worked a bit towards using exclusively By locators instead of using the WebElement
constructors for elements.
In addition, we've deprecated findElement()
from BaseWebElement
with the intent to set its access to private and act as a helper method. Any new elements should be created and found using a constructor from a scaffold element.
We've also had a little bit of xpath update love, so we should also consider updating the xpath portion.
Summary
Currently,
BaseWebElement#findElement(...)
andBaseWebElement#findElement(...)
will check to see if the parent and child By locators are css selectors and, if they are, combine them. We should update the logic to convert anything (except xpath) into css selectors for us. That way we can preserve the true full path. This is important for thefindElements(...)
method because it should perform a lookup using both the parent and the child.Some initial brainstorm code:
A/C
findElement
orfindElements
is invoked.