Module: Vapir::InputElement

Extended by:
ElementHelper
Includes:
WatirInputElementConfigCompatibility
Defined in:
lib/vapir-common/elements/elements.rb

Defined Under Namespace

Modules: WatirInputElementConfigCompatibility

Instance Method Summary collapse

Methods included from ElementHelper

add_specifier, container_collection_method, container_single_method, included

Methods included from ElementClassAndModuleMethods

#add_container_method_extra_args, #all_dom_attr_aliases, #all_dom_attrs, #class_array_append, #class_array_get, #class_hash_get, #class_hash_merge, #container_collection_methods, #container_method_extra_args, #container_single_methods, #default_how, #dom_attr, #dom_attr_locate_alias, #dom_function, #dom_setter, #element_collection, #factory, #inspect_these, #inspect_this_if, #parent_element_module, #set_or_get_class_var, #specifiers

Methods included from WatirInputElementConfigCompatibility

#abhors_typing, #requires_typing

Instance Method Details

#assert_enabledObject

Checks if this element is enabled or not. Raises ObjectDisabledException if this is disabled.



39
40
41
42
43
# File 'lib/vapir-common/elements/elements.rb', line 39

def assert_enabled
  if disabled
    raise Exception::ObjectDisabledException, "#{self.inspect} is disabled"
  end
end

#assert_not_readonlyObject

Checks if object is readonly or not. Raises ObjectReadOnlyException if this is readonly



46
47
48
49
50
# File 'lib/vapir-common/elements/elements.rb', line 46

def assert_not_readonly
  if readonly
    raise Exception::ObjectReadOnlyException, "#{self.inspect} is readonly"
  end
end

#enabled?Boolean

Returns true if element is enabled, otherwise returns false.

Returns:

  • (Boolean)


53
54
55
# File 'lib/vapir-common/elements/elements.rb', line 53

def enabled?
  !disabled
end