-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypifiedElement add check for disabled #32
Comments
Common methods for all typified elements are located in This might not be obvious at first, but being a subclass of I propose this:
|
If the |
I couldn't find a function like this in Mink. I am not even sure if Mink can read the properties of elements via selenium. I currently do a workaround with hasAttribute, but disabled is a property. |
Feel free to send a PR there. Don't forgot that you need to (if you decide to PR):
This is how my initial library development was. I found that Mink is missing something and sent a PR to add such feature. Then I've used it inside qa-tools :) In this case it's very easy, since you just copy-paste where you found
It can. Look for
This is way wrong, because that doesn't cover the case when element was initially enabled and then was disabled using JavaScript. |
And IMO in tests you only need to do what user can do. User can't determine if input is disabled. User can however try to interact with disabled input and fail. |
Well the user will get feedback that an element is disabled (gray background, different mouse cursor or whatever). |
Agreed,
I'm all in for the |
I've moved away actual architectural changes (adding of Here we only need to add |
Just checked the whole drivers and Mink library, are all drivers in under Behat or are there others around I need change too? |
All drivers are within the Behat company repos. Trick however is to setup all drivers to run the tests locally. |
Were you able to understand how Mink works to send a PR? |
No not yet, was on vacation the last few days but got a good image on how Mink and its drivers work and could start to work with. Although I need to find out if this is possible for all drivers. |
Believe me it is. Basically the |
Unfortunately this can't be implemented until Mink itself will have driver-agnostic |
Some tests require to check if elements are enabled / disabled. TypifiedElement or WebElement should have a function to check this status.
Something like
isDisabled
orisEnabled
.The text was updated successfully, but these errors were encountered: