capybara-ui icon indicating copy to clipboard operation
capybara-ui copied to clipboard

allow hidden (display:none) fields to be filled with field widgets

Open samccone opened this issue 12 years ago • 6 comments

samccone avatar Sep 10 '13 03:09 samccone

This is already possible by using something like

root 'selector', visible: false

however, I'm not sure if you want to do this. If a user can't see the field to fill it in, you shouldn't probably fill it in in the tests. I'd advise doing whatever the user needs to do to fill in the field instead.

david avatar Sep 10 '13 13:09 david

well this is for a wysiwyg field where it is set to content editiable and then it pipes the content into a textfield, the text field acts as a hidden backing element. And since there is no way to edit a contenteditable div this is how i must do it.

samccone avatar Sep 10 '13 13:09 samccone

Did you try editing the capybara node directly using node.set <content> ?

david avatar Sep 10 '13 13:09 david

yes, that is exactly how i ended up doing it, just a touch ugly

samccone avatar Sep 10 '13 13:09 samccone

I'll see if I can come up with something nicer.

david avatar Sep 10 '13 13:09 david

https://github.com/jnicklas/capybara/pull/911

samccone avatar Sep 10 '13 13:09 samccone