OzFramework / oz

Oz is a behavioral web-ui testing framework developed to reduce test maintenance by using a predictive model rather than a scriptive model when writing tests.
Apache License 2.0
23 stars 7 forks source link

Elements need support for being enabled or disabled #129

Open PanoramicPanda opened 6 years ago

PanoramicPanda commented 5 years ago

💡 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?

Castone22 commented 5 years ago

I'm not really sure we should expose two differing verbages here, shouldn't #.interactable? Encapsulate the enabled test?

PanoramicPanda commented 5 years ago

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.