Class | Celerity::Element |
In: |
lib/celerity/watir_compatibility.rb
lib/celerity/element.rb |
Parent: | Object |
Superclass for all HTML elements.
HTML_401_TRANSITIONAL | = | { :core => [:class, :id, :style, :title], :cell_halign => [:align, :char, :charoff], :cell_valign => [:valign], :i18n => [:dir, :lang], :event => [:onclick, :ondblclick, :onmousedown, :onmouseup, :onmouseover, :onmousemove, :onmouseout, :onkeypress, :onkeydown, :onkeyup], :sloppy => [:name, :value] | HTML 4.01 Transitional DTD | |
CELLHALIGN_ATTRIBUTES | = | HTML_401_TRANSITIONAL[:cell_halign] | ||
CELLVALIGN_ATTRIBUTES | = | HTML_401_TRANSITIONAL[:cell_valign] | ||
BASE_ATTRIBUTES | = | HTML_401_TRANSITIONAL.values_at(:core, :i18n, :event, :sloppy).flatten | ||
ATTRIBUTES | = | BASE_ATTRIBUTES | ||
TAGS | = | [] | ||
DEFAULT_HOW | = | nil |
exists? | -> | exists |
text | -> | innerText |
text | -> | inner_text |
container | [R] | |
identifier_string | [W] |
Used internally to ensure the element actually exists.
@raise [Celerity::Exception::UnknownObjectException] if the element can‘t be found. @api private
@param [String, to_s] The attribute. @return [String] The value of the given attribute.
Returns a JavaScript object representing the receiver
@api internal - subject to change
Dynamically get element attributes.
@see ATTRIBUTES constant for a list of valid methods for a given element.
@return [String] The resulting attribute. @raise [NoMethodError] if the element doesn‘t support this attribute.
Get the parent element @return [Celerity::Element, nil] subclass of Celerity::Element, or nil if no parent was found
Return a text representation of the element as it would appear in a browser.
@see inner_text @return [String]