/usr/lib/ruby/vendor_ruby/capybara/driver/base.rb is in ruby-capybara 2.10.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | # frozen_string_literal: true
class Capybara::Driver::Base
def current_url
raise NotImplementedError
end
def visit(path)
raise NotImplementedError
end
def find_xpath(query)
raise NotImplementedError
end
def find_css(query)
raise NotImplementedError
end
def html
raise NotImplementedError
end
def go_back
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#go_back'
end
def go_forward
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#go_forward'
end
def execute_script(script)
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#execute_script'
end
def evaluate_script(script)
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#evaluate_script'
end
def save_screenshot(path, options={})
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#save_screenshot'
end
def response_headers
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#response_headers'
end
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
#
def switch_to_frame(frame)
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#switch_to_frame'
end
def current_window_handle
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#current_window_handle'
end
def window_size(handle)
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#window_size'
end
def resize_window_to(handle, width, height)
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#resize_window_to'
end
def maximize_window(handle)
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#maximize_current_window'
end
def close_window(handle)
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#close_window'
end
def window_handles
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#window_handles'
end
def open_new_window
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#open_new_window'
end
def switch_to_window(handle)
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#switch_to_window'
end
def within_window(locator)
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#within_window'
end
def no_such_window_error
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#no_such_window_error'
end
##
#
# 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
#
def accept_modal(type, options={}, &blk)
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#accept_modal'
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
#
def dismiss_modal(type, options={}, &blk)
raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#dismiss_modal'
end
def invalid_element_errors
[]
end
def wait?
false
end
def reset!
end
def needs_server?
false
end
# @deprecated This method is being removed
def browser_initialized?
warn "DEPRECATED: #browser_initialized? is deprecated and will be removed in the next version of Capybara"
true
end
end
|