Skip to content
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

Add element disabled? #948

Merged
merged 5 commits into from
Feb 15, 2013
Merged

Conversation

benlovell
Copy link
Contributor

Hey,

I've added #disabled?

I did consider adding a locator such as find('input', :disabled => true) but wanted to first check if you thought this made sense?

Also, I didn't squash my commits but I can do if you prefer, of course.

If there are any specific docs or otherwise you want me to update, do let me know!

@benlovell
Copy link
Contributor Author

👊 I have to admit I never ran the specs on jruby. Just installing it now to see what's up.

@benlovell
Copy link
Contributor Author

It appears that jruby nokogiri is particular about the empty disabled attribute. I've removed it for now. I assume it is a bug and will find the time to go through nokogiri in the next few days.

Other than that, this should be good. 🤘

@martco
Copy link

martco commented Feb 4, 2013

👍

jnicklas added a commit that referenced this pull request Feb 15, 2013
@jnicklas jnicklas merged commit f17b37b into teamcapybara:master Feb 15, 2013
@jnicklas
Copy link
Collaborator

Looks really good! Thank you so much for contributing this.

As for find("foo", :disabled => true), I really want that too. We made it a requirement for fields and buttons to be enabled in Capybara 2.0, but a lot of people are complaining that it's annoying not to be able to find disabled fields at all, so it would be excellent to provide this as an options instead of hardcoding it in the XPath gem. It could be a bit tricky to implement, but if you want to give it a shot, then please do!

@jnicklas
Copy link
Collaborator

Also, sorry that it took me so long to review this pull request.

@benlovell
Copy link
Contributor Author

I can take a stab at that. Watch this space 👍

@MarceloCajueiro
Copy link

find("foo", :disabled => true) will be great!

@benlovell benlovell deleted the add_element_disabled branch July 13, 2015 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants