AllowInvisibleElements extends AbstractSetting<Boolean> { @Override public Boolean getValue() { return AppiumUIA2Driver .getInstance() .getSessionOrThrow() .getCapability(SETTING_NAME, false); } AllowInvisibleElements(); @Override Boolean getValue();  }
@Test public void shouldBeAbleToDisableAllowInvisibleElements() { session.setCapability(allowInvisibleElements.getName(), false); Assert.assertEquals(false, allowInvisibleElements.getValue()); }
@Test public void shouldBeAbleToEnableAllowInvisibleElements() { session.setCapability(allowInvisibleElements.getName(), true); Assert.assertEquals(true, allowInvisibleElements.getValue()); }