Open emaks opened 8 years ago
This is correct. What do you see the disadvantages of being able to access the WebElement
API with TypifiedElement
s? Do you know why it was different in the first place?
I found the major advantage being able to explicitly wait for it like a normal WebElement
.
It also reduces code duplication, often you want to perform actions which are identical to the WebElement
API and before the PR they were been passed through, without modification, to the wrapped WebElement
.
Because when I use Button.class
I mustn't have functionality like sendKeys()
, getText()
etc.
Why must the functionality not be there?
Is already is there as you can still get access to the API using .getWrappedElement()
- so easy to get around.
You can chose just not to use it.
Whereas, if it's not there, .getWrappedElement()
has to be called or things such as explicit "wait for (in)visibility of all in" a List
cannot be done without a custom ExpectedConditions
.
In your example, you might want getText()
on a button to check it has the expected text, also you might want to send the enter key on the button to test keyboard navigation.
Why must the functionality not be there?
because it looks like https://hsto.org/getpro/habr/post_images/9b8/71b/a0b/9b871ba0b4fe575aa9d896a6d642c55a.jpg
TypifiedElements
is a architect fail. So in most cases we have more troubles than profit from using it. So its just a step to make unification of this classes
@lanwen in that case TypifiedElements
have to be removed
I totally agree. As well as being more 'correct' it will simplify the code base, which is always good, but what of backward compatibility?
yep, we can't just remove this class without set of small steps which are: unification - deprecation - removing.
Can this be closed or are we going to look to deprecate TypifiedElement
s?
i would vote for deleting it
Changes from pull request #121 have removed difference between
TypifiedElement.class
andHtmlElement.class
. Now we can do all actions that provides selenium api usingTypifiedElement.class
while this class has been implemented not to provide this possibility