class Selenium::Session
- Selenium::Session
- Reference
- Object
Defined in:
lib/selenium/src/webdriver/session.crlib/selenium/src/webdriver/session/cookies.cr
selenium/patch/selenium/session.cr
selenium/patch/selenium/session/download.cr
selenium/patch/selenium/session/logger.cr
selenium/patch/selenium/session/retry.cr
selenium/patch/selenium/session/setting.cr
selenium/patch/selenium/session/wait.cr
Instance Method Summary
- #close
- #css(*args) : Array(WebElement)
- #download(ext : String | Nil = nil, timeout : Time::Span | Nil = nil, interval : Time::Span | Nil = nil, &block : -> T) : Bytes forall T
- #downloads(ext = nil)
- #downloads_dir : String
- #downloads_dir=(downloads_dir : String)
- #fill(by : Symbol, selector : String, value, parent : WebElement | Nil = nil) : WebElement
- #fill(target : String, value, parent : WebElement | Nil = nil) : WebElement
- #fill!(target : String, value, parent : WebElement | Nil = nil) : WebElement
-
#find(id : String | Nil = nil, css : String | Nil = nil, parent : WebElement | Nil = nil) : WebElement
#findis a wrapper offind_elementwith accepting prefixedcss:orid:-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?(*args, **opts) : WebElement | Nil
-
#id(*args) : WebElement
##################################################################### ## Syntax Sugar
- #logger : Logger
- #logger=(logger : Logger)
- #open(url : String, strict = false)
- #select(*args, **opts) : WebElement
- #select!(*args, **opts) : WebElement
- #select?(*args, **opts) : WebElement | Nil
- #setting : Setting
- #setting=(setting : Setting)
- #wait(hint : String | Nil = "wait", interval : Time::Span | Nil = nil, timeout : Time::Span | Nil = nil, &condition : -> T) forall T
Instance Method Detail
#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! 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? acts same as #find except it returns nil rather than raising error when the element is not found.
#select! acts same as #select except this ensures that
the element is actually selected, otherwise raise an error.
#select? acts same as #select except this ensures that
the element is actually selected, otherwise returns nil.