Remove the deprecated isDisabled(), isEnabled(), isReadOnly() and isEditable() methods of Navigator

420 views
Skip to first unread message

foob...@gmail.com

unread,
Sep 27, 2016, 5:45:20 AM9/27/16
to Geb Development Mailing List
Hi,

while I understand the rationale behind the change, I think that it makes Geb slightly more difficult to use. If I want to check an input's the `disabled` property, I explicitly need to call `.module(FormElement)`, either in my spec or in the page content DSL.
Since Geb (or rather the Navigator) already knows that the Element is an `input`, IMHO that step should be performed by Geb.
See also the discussion on https://github.com/geb/geb/commit/51a58bba7454ba7f7b9cfda1f9b2e26e8e4793d2#commitcomment-19186845.

Cheers,
Jochen

Marcin Erdmann

unread,
Oct 2, 2016, 1:35:53 PM10/2/16
to geb...@googlegroups.com
Hi Johen,

Sorry for a late reply.

I disagree. It's still fairly easy to check input's disabled property, you can use either the attr() method of Navigator or the @ syntax, which is redefined for Navigator as attribute access operator:

$("input").attr("disabled")
$("input").@disabled

The `isDisabled()` method has been moved to FormElement module class as you've noted because the boolean value it returns is semantically correct only for buttons, inputs, options, selects and textareas. I believe that the move leads to a cleaner API and therefore the minimal overhead now required is justified.

Cheers,
Marcin

--
You received this message because you are subscribed to the Google Groups "Geb Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-dev+unsubscribe@googlegroups.com.
To post to this group, send email to geb...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-dev/2b396fee-a987-433d-9bc1-e59078ef235a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages