class Capybara::Driver::Base
Attributes
Public Instance Methods
Execute the block, and then accept the modal opened. @param type [:alert, :confirm, :prompt] @option options [Numeric] :wait How long to wait for the modal to appear after executing the block. @option options [String, Regexp] :text Text to verify is in the message shown in the modal @option options [String] :with Text to fill in in the case of a prompt @return [String] the message shown in the modal @raise [Capybara::ModalNotFound] if modal dialog hasn't been found
# File lib/capybara/driver/base.rb, line 129 def accept_modal(type, **options, &blk) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#accept_modal' end
# File lib/capybara/driver/base.rb, line 99 def close_window(handle) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#close_window' end
# File lib/capybara/driver/base.rb, line 5 def current_url raise NotImplementedError end
# File lib/capybara/driver/base.rb, line 79 def current_window_handle raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#current_window_handle' end
Execute the block, and then dismiss the modal opened. @param type [:alert, :confirm, :prompt] @option options [Numeric] :wait How long to wait for the modal to appear after executing the block. @option options [String, Regexp] :text Text to verify is in the message shown in the modal @return [String] the message shown in the modal @raise [Capybara::ModalNotFound] if modal dialog hasn't been found
# File lib/capybara/driver/base.rb, line 142 def dismiss_modal(type, **options, &blk) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#dismiss_modal' end
# File lib/capybara/driver/base.rb, line 45 def evaluate_async_script(script, *args) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#evaluate_script_asnyc' end
# File lib/capybara/driver/base.rb, line 41 def evaluate_script(script, *args) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#evaluate_script' end
# File lib/capybara/driver/base.rb, line 37 def execute_script(script, *args) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#execute_script' end
# File lib/capybara/driver/base.rb, line 21 def find_css(query) raise NotImplementedError end
# File lib/capybara/driver/base.rb, line 17 def find_xpath(query) raise NotImplementedError end
# File lib/capybara/driver/base.rb, line 69 def frame_title find_xpath('/html/head/title').map(&:all_text).first.to_s end
# File lib/capybara/driver/base.rb, line 73 def frame_url evaluate_script('document.location.href') rescue Capybara::NotSupportedByDriverError raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#frame_title' end
# File lib/capybara/driver/base.rb, line 95 def fullscreen_window(handle) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#fullscreen_window' end
# File lib/capybara/driver/base.rb, line 29 def go_back raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#go_back' end
# File lib/capybara/driver/base.rb, line 33 def go_forward raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#go_forward' end
# File lib/capybara/driver/base.rb, line 25 def html raise NotImplementedError end
# File lib/capybara/driver/base.rb, line 146 def invalid_element_errors [] end
# File lib/capybara/driver/base.rb, line 91 def maximize_window(handle) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#maximize_window' end
# File lib/capybara/driver/base.rb, line 156 def needs_server? false end
# File lib/capybara/driver/base.rb, line 115 def no_such_window_error raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#no_such_window_error' end
# File lib/capybara/driver/base.rb, line 107 def open_new_window raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#open_new_window' end
# File lib/capybara/driver/base.rb, line 13 def refresh raise NotImplementedError end
# File lib/capybara/driver/base.rb, line 154 def reset!; end
# File lib/capybara/driver/base.rb, line 87 def resize_window_to(handle, width, height) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#resize_window_to' end
# File lib/capybara/driver/base.rb, line 53 def response_headers raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#response_headers' end
# File lib/capybara/driver/base.rb, line 49 def save_screenshot(path, **options) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#save_screenshot' end
# File lib/capybara/driver/base.rb, line 160 def session_options session&.config || Capybara.session_options end
# File lib/capybara/driver/base.rb, line 57 def status_code raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#status_code' end
@param frame [Capybara::Node::Element, :parent, :top] The iframe element to switch to
# File lib/capybara/driver/base.rb, line 65 def switch_to_frame(frame) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#switch_to_frame' end
# File lib/capybara/driver/base.rb, line 111 def switch_to_window(handle) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#switch_to_window' end
# File lib/capybara/driver/base.rb, line 9 def visit(path) raise NotImplementedError end
# File lib/capybara/driver/base.rb, line 150 def wait? false end
# File lib/capybara/driver/base.rb, line 103 def window_handles raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#window_handles' end
# File lib/capybara/driver/base.rb, line 83 def window_size(handle) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#window_size' end
Private Instance Methods
# File lib/capybara/driver/base.rb, line 166 def session @session ||= nil end