class

Selenium::Session

Inherits Reference / Object

Instance methods

close
Source
css(*args) : Array(WebElement)
Source
download(ext : String | Nil = nil, timeout : Time::Span | Nil = nil, interval : Time::Span | Nil = nil, &block : -> T) : Bytes forall T
Source
downloads(ext = nil)
Source
downloads_dir
Source
downloads_dir=(downloads_dir : String)
Source
fill(by : Symbol, selector : String, value, parent : WebElement | Nil = nil) : WebElement
Source
fill(target : String, value, parent : WebElement | Nil = nil) : WebElement
Source
fill!(target : String, value, parent : WebElement | Nil = nil) : WebElement
Source
find(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") # invokes find_element(:id, "foo")
  • find(css: "foo") # invokes find_element(:css, "foo")
  • find("foo") # same as find(id: "foo")
  • find("id:foo") # same as find(id: "foo")
  • find("css:foo") # same as find(css: "foo")
Source
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.

Source
find?(*args, **opts) : WebElement | Nil

find? acts same as find except it returns nil rather than raising error when the element is not found.

Source
id(*args) : WebElement

#####################################################################

Syntax Sugar

Source
logger
Source
logger=(logger : Logger)
Source
open(url : String, strict = false)
Source
select(*args, **opts) : WebElement

select is a shortcut for find(...).select

Source
select!(*args, **opts) : WebElement

select! acts same as select except this ensures that the element is actually selected, otherwise raise an error.

Source
select?(*args, **opts) : WebElement | Nil

select? acts same as select except this ensures that the element is actually selected, otherwise returns nil.

Source
setting
Source
setting=(setting : Setting)
Source
wait(hint : String | Nil = "wait", interval : Time::Span | Nil = nil, timeout : Time::Span | Nil = nil, &condition : -> T) forall T
Source

Nested types