class LuckyFlow::Webless::Element
- LuckyFlow::Webless::Element
- LuckyFlow::Element
- Reference
- Object
Defined in:
lucky_flow/webless/element.crConstant Summary
-
VISIBILITY_XPATH =
"boolean(./ancestor-or-self::*[(((./@style[(contains(., 'display:none') or contains(., 'display: none'))] or ./@hidden) or ((name(.) = 'script') or (name(.) = 'head'))) or (not(./self::summary) and ./parent::details[not(./@open)]))])"
Constructors
Instance Method Summary
-
#append(value : String)
Add text to the end of a field
- #attribute(name : String) : String | Nil
- #check
- #checkbox? : Bool
- #checked? : Bool
- #clear
- #click
- #displayed? : Bool
-
#fill(value : String)
Set the text of a form field
- #midpoint : NamedTuple(x: Int32, y: Int32) | Nil
- #property(name : String) : String | Nil
- #radio? : Bool
- #remove_attribute(name : String, element : HTML5::Node = @inner_element)
- #select_option(value : String)
- #select_options(values : Array(String))
- #selected? : Bool
- #send_keys(keys : Array(String | Symbol))
- #set_checkbox(value : Bool)
- #set_radio
- #tag_name : String
- #text : String
- #value
Instance methods inherited from class LuckyFlow::Element
append(value : String)
append,
attribute(name : String) : String | Nilattribute(name : Symbol) : String | Nil attribute, checked? : Bool checked?, clear clear, click click, displayed? : Bool displayed?, driver : LuckyFlow::Driver driver, fill(value : String)
fill(value : Time) fill, hover hover, midpoint : NamedTuple(x: Int32, y: Int32) | Nil midpoint, property(name : String) : String | Nil
property(name : Symbol) : String | Nil property, raw_selector : String raw_selector, select_option(value : String) select_option, select_options(values : Array(String)) select_options, selected? : Bool selected?, selector : String selector, send_keys(keys : Array(String | Symbol))
send_keys(key : String) send_keys, tag_name : String tag_name, text : String text, value value
Macros inherited from class LuckyFlow::Element
unsupported
unsupported
Constructor Detail
Instance Method Detail
def append(value : String)
#
Description copied from class LuckyFlow::Element
Add text to the end of a field
field = el("input[name='comment']")
field.fill("Lucky is:")
field.append(" So much fun!")
def fill(value : String)
#
Description copied from class LuckyFlow::Element
Set the text of a form field
field = el("input[name='comment']")
field.fill("Lucky is great!")