Class: AePageObjects::Checkbox

Inherits:
Element show all
Defined in:
lib/ae_page_objects/elements/checkbox.rb

Constant Summary

Constants inherited from Node

Node::METHODS_TO_DELEGATE_TO_NODE

Instance Attribute Summary

Attributes inherited from Element

#parent

Instance Method Summary collapse

Methods inherited from Element

#__full_name__, #__name__, #browser, #document, #full_name, #initialize, #name, #to_s, #using_default_locator?, #window

Methods inherited from Node

current_url, #current_url, current_url_without_params, #current_url_without_params, #document, #element, #initialize, #node, #stale!, #stale?

Methods included from Dsl

#collection, #element, #element_attributes, #form_for, #inherited, #is_loaded, #is_loaded_blocks

Methods included from InternalHelpers

#ensure_class_for_param!

Constructor Details

This class inherits a constructor from AePageObjects::Element

Instance Method Details

#checkObject



3
4
5
# File 'lib/ae_page_objects/elements/checkbox.rb', line 3

def check
  node.set true
end

#checked?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/ae_page_objects/elements/checkbox.rb', line 11

def checked?
  node.native.attribute('checked').to_s.eql?("true")
end

#uncheckObject



7
8
9
# File 'lib/ae_page_objects/elements/checkbox.rb', line 7

def uncheck
  node.set false
end

#unchecked?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/ae_page_objects/elements/checkbox.rb', line 15

def unchecked?
  !checked?
end