oz icon indicating copy to clipboard operation
oz copied to clipboard

Elements need support for being enabled or disabled

Open PanoramicPanda opened this issue 7 years ago • 3 comments

PanoramicPanda avatar Oct 24 '18 12:10 PanoramicPanda

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

PanoramicPanda avatar Apr 25 '19 17:04 PanoramicPanda

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

Castone22 avatar Apr 25 '19 18:04 Castone22

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.

PanoramicPanda avatar Apr 25 '19 18:04 PanoramicPanda