Selenium::Session
Inherits Reference / Object
Instance methods
close
Sourcecss(*args) : Array(WebElement)
Sourcedownload(ext : String | Nil = nil, timeout : Time::Span | Nil = nil, interval : Time::Span | Nil = nil, &block : -> T) : Bytes forall T
Sourcedownloads(ext = nil)
Sourcedownloads_dir
Sourcedownloads_dir=(downloads_dir : String)
Sourcefill(by : Symbol, selector : String, value, parent : WebElement | Nil = nil) : WebElement
Sourcefill(target : String, value, parent : WebElement | Nil = nil) : WebElement
Sourcefill!(target : String, value, parent : WebElement | Nil = nil) : WebElement
Sourcefind(id : String | Nil = nil, css : String | Nil = nil, parent : WebElement | Nil = nil) : WebElement
find is a wrapper of find_element with accepting prefixed css: or id:
find(id: "foo")# invokesfind_element(:id, "foo")find(css: "foo")# invokesfind_element(:css, "foo")find("foo")# same asfind(id: "foo")find("id:foo")# same asfind(id: "foo")find("css:foo")# same asfind(css: "foo")
find!(*args, **opts) : WebElement
find! acts same as find except it waits until it will be found.
This is useful after a page transition or after the element has changed dynamically.
find?(*args, **opts) : WebElement | Nil
find? acts same as find except it returns nil rather than raising error when the element is not found.
id(*args) : WebElement
#####################################################################
Syntax Sugar
logger
Sourcelogger=(logger : Logger)
Sourceopen(url : String, strict = false)
Sourceselect!(*args, **opts) : WebElement
select! acts same as select except this ensures that
the element is actually selected, otherwise raise an error.
select?(*args, **opts) : WebElement | Nil
select? acts same as select except this ensures that
the element is actually selected, otherwise returns nil.
setting
Sourcesetting=(setting : Setting)
Sourcewait(hint : String | Nil = "wait", interval : Time::Span | Nil = nil, timeout : Time::Span | Nil = nil, &condition : -> T) forall T
Source