class Webdriver::Browser

Included Modules

Defined in:

webdriver/server.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module Webdriver::Dom::BrowserScrollable

scroll_to(position : Symbol = :center, force : Bool = false) scroll_to

Instance methods inherited from module Webdriver::Dom::Actable

act(&) act

Instance methods inherited from module Webdriver::Dom::Container

abbr(**locator) abbr, abbrs(**locator) abbrs, address(**locator) address, addresss(**locator) addresss, article(**locator) article, articles(**locator) articles, blockquote(**locator) blockquote, blockquotes(**locator) blockquotes, body(**locator) body, bodys(**locator) bodys, button(**locator) button, buttons(**locator) buttons, caption(**locator) caption, captions(**locator) captions, checkbox(**locator) checkbox, checkboxs(**locator) checkboxs, code(**locator) code, codes(**locator) codes, dd(**locator) dd, dds(**locator) dds, div(**locator) div, divs(**locator) divs, dl(**locator) dl, dls(**locator) dls, dt(**locator) dt, dts(**locator) dts, element(**locator) element, elements(**locator) elements, fieldset(**locator) fieldset, fieldsets(**locator) fieldsets, figure(**locator) figure, figures(**locator) figures, footer(**locator) footer, footers(**locator) footers, form(**locator) form, forms(**locator) forms, frame(**locator) frame, frames(**locator) frames, h1(**locator) h1, h1s(**locator) h1s, h2(**locator) h2, h2s(**locator) h2s, h3(**locator) h3, h3s(**locator) h3s, h4(**locator) h4, h4s(**locator) h4s, h5(**locator) h5, h5s(**locator) h5s, h6(**locator) h6, h6s(**locator) h6s, header(**locator) header, headers(**locator) headers, iframe(**locator) iframe, iframes(**locator) iframes, img(**locator) img, imgs(**locator) imgs, input(**locator) input, inputs(**locator) inputs, label(**locator) label, labels(**locator) labels, legend(**locator) legend, legends(**locator) legends, li(**locator) li, link(**locator) link, links(**locator) links, lis(**locator) lis, nav(**locator) nav, navs(**locator) navs, ol(**locator) ol, ols(**locator) ols, option(**locator) option, options(**locator) options, p(**locator) p, password_field(**locator) password_field, password_fields(**locator) password_fields, pre(**locator) pre, pres(**locator) pres, progress(**locator) progress, progresss(**locator) progresss, ps(**locator) ps, radio(**locator) radio, radios(**locator) radios, section(**locator) section, sections(**locator) sections, select_list(**locator) select_list, select_lists(**locator) select_lists, small(**locator) small, smalls(**locator) smalls, span(**locator) span, spans(**locator) spans, table(**locator) table, tables(**locator) tables, tbody(**locator) tbody, tbodys(**locator) tbodys, td(**locator) td, tds(**locator) tds, text_field(**locator) text_field, text_fields(**locator) text_fields, textarea(**locator) textarea, textareas(**locator) textareas, tfoot(**locator) tfoot, tfoots(**locator) tfoots, th(**locator) th, thead(**locator) thead, theads(**locator) theads, ths(**locator) ths, tr(**locator) tr, trs(**locator) trs, ul(**locator) ul, uls(**locator) uls

Instance methods inherited from module Webdriver::Alerts

accept_alert accept_alert, alert alert, alert=(text : String) alert=, dismiss_alert dismiss_alert

Instance methods inherited from module Webdriver::Cookies

add_cookie(cookie : HTTP::Cookie)
add_cookie(**opts)
add_cookie
, add_cookies(cookies : Array(HTTP::Cookie)) add_cookies, cookies cookies, delete_all_cookies delete_all_cookies, delete_cookie(cookie : Webdriver::Cookie)
delete_cookie(name : String)
delete_cookie

Instance methods inherited from module Webdriver::Document

execute_script(script, *args) execute_script, html html, pdf(**opts) pdf

Instance methods inherited from module Webdriver::BrowserWindow

fullscreen fullscreen, maximize maximize, minimize minimize

Instance methods inherited from module Webdriver::BrowserNavigation

back back, forward forward, goto(url : String) goto, refresh refresh, title title, url url

Constructor Detail

def self.new(server : Server) #

[View source]

Class Method Detail

def self.start(browser = :chrome, **opts) #

starts the browser browser with options


[View source]
def self.stop #

[View source]

Instance Method Detail

def close(window : Window) #

closes window:

will try to switch the previous window/tab:

if there is only one window, closing it will quit the browser


[View source]
def quit #

stops the browser session


[View source]
def quit! #

[View source]
def screenshot #

takes a screenshot


[View source]
def server : Webdriver::Server #

[View source]
def switch_to_parent_frame #

switches context to the parent frame


[View source]
def use(window : Window) #

switches context to the window


[View source]
def use(frame : Dom::Frame | Dom::IFrame) #

switches context to the frame


[View source]
def windows #

[View source]