class Capybara::Driver::Base
def accept_modal(type, **options, &blk)
-
(Capybara::ModalNotFound)
- if modal dialog hasn't been found
Returns:
-
(String)
- the message shown in the modal
Options Hash:
(**options)
-
:with
(String
) -- Text to fill in in the case of a prompt -
:text
(String, Regexp
) -- Text to verify is in the message shown in the modal -
:wait
(Numeric
) -- How long to wait for the modal to appear after executing the block.
Parameters:
-
type
(:alert, :confirm, :prompt
) --
def accept_modal(type, **options, &blk) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#accept_modal' end
def active_element
def active_element raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#active_element' end
def close_window(handle)
def close_window(handle) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#close_window' end
def current_url
def current_url raise NotImplementedError end
def current_window_handle
def current_window_handle raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#current_window_handle' end
def dismiss_modal(type, **options, &blk)
-
(Capybara::ModalNotFound)
- if modal dialog hasn't been found
Returns:
-
(String)
- the message shown in the modal
Options Hash:
(**options)
-
:text
(String, Regexp
) -- Text to verify is in the message shown in the modal -
:wait
(Numeric
) -- How long to wait for the modal to appear after executing the block.
Parameters:
-
type
(:alert, :confirm, :prompt
) --
def dismiss_modal(type, **options, &blk) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#dismiss_modal' end
def evaluate_async_script(script, *args)
def evaluate_async_script(script, *args) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#evaluate_script_asnyc' end
def evaluate_script(script, *args)
def evaluate_script(script, *args) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#evaluate_script' end
def execute_script(script, *args)
def execute_script(script, *args) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#execute_script' end
def find_css(query, **options)
def find_css(query, **options) raise NotImplementedError end
def find_xpath(query, **options)
def find_xpath(query, **options) raise NotImplementedError end
def frame_title
def frame_title find_xpath('/html/head/title').map(&:all_text).first.to_s end
def frame_url
def frame_url evaluate_script('document.location.href') rescue Capybara::NotSupportedByDriverError raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#frame_title' end
def fullscreen_window(handle)
def fullscreen_window(handle) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#fullscreen_window' end
def go_back
def go_back raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#go_back' end
def go_forward
def go_forward raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#go_forward' end
def html
def html raise NotImplementedError end
def invalid_element_errors
def invalid_element_errors [] end
def maximize_window(handle)
def maximize_window(handle) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#maximize_window' end
def needs_server?
def needs_server? false end
def no_such_window_error
def no_such_window_error raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#no_such_window_error' end
def open_new_window
def open_new_window raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#open_new_window' end
def refresh
def refresh raise NotImplementedError end
def reset!; end
def reset!; end
def resize_window_to(handle, width, height)
def resize_window_to(handle, width, height) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#resize_window_to' end
def response_headers
def response_headers raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#response_headers' end
def save_screenshot(path, **options)
def save_screenshot(path, **options) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#save_screenshot' end
def send_keys(*)
def send_keys(*) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#send_keys' end
def session
def session @session ||= nil end
def session_options
def session_options session&.config || Capybara.session_options end
def status_code
def status_code raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#status_code' end
def switch_to_frame(frame)
-
frame
(Capybara::Node::Element, :parent, :top
) -- The iframe element to switch to
def switch_to_frame(frame) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#switch_to_frame' end
def switch_to_window(handle)
def switch_to_window(handle) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#switch_to_window' end
def visit(path)
def visit(path) raise NotImplementedError end
def wait?
def wait? false end
def window_handles
def window_handles raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#window_handles' end
def window_size(handle)
def window_size(handle) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#window_size' end