Elements need support for being enabled or disabled
💡 Had a moment of clarity on this today.
We've discussed the methods and functionality before, and really only boiled down to finding out a good naming convention for them. I had an apostrophe today and thought of the following:
element.interactive? # Looks at the @interactive property of the element according to Oz
element.interactive_when(Boolean) # Much like activate_if, toggles interactivity according to Oz
element.enabled? # Like present?, calls watir_element.enabled?
@greenarrowdb @Castone22 Thoughts? Concerns?
I'm not really sure we should expose two differing verbages here, shouldn't #.interactable? Encapsulate the enabled test?
If you look at the current setup, we have .active? which only returns what oz thinks it should be, that is the @active property.
When we run validation, we check if active == present?.
enabled? is just a way to keep the same verbage, since present? also checks the watir element.