Class: Selenium::WebDriver::Safari::Bridge

Inherits:
Remote::Bridge show all
Defined in:
build/rb/lib/selenium/webdriver/safari/bridge.rb

Constant Summary collapse

COMMANDS =
{
  get_permissions: [:get, 'session/:session_id/apple/permissions'],
  set_permissions: [:post, 'session/:session_id/apple/permissions'],
  attach_debugger: [:post, 'session/:session_id/apple/attach_debugger']
}.freeze

Constants inherited from Remote::Bridge

Remote::Bridge::PORT, Remote::Bridge::QUIT_ERRORS

Instance Attribute Summary

Attributes inherited from Remote::Bridge

#capabilities, #context, #file_detector, #http

Instance Method Summary collapse

Methods inherited from Remote::Bridge

#accept_alert, #action, #active_element, #add_cookie, #alert=, #alert_text, #browser, #clear_element, #clear_local_storage, #clear_session_storage, #click_element, #close, #cookie, #cookies, #create_session, #delete_all_cookies, #delete_cookie, #dismiss_alert, #element_attribute, #element_displayed?, #element_enabled?, #element_location, #element_location_once_scrolled_into_view, #element_property, #element_rect, #element_screenshot, #element_selected?, #element_size, #element_tag_name, #element_text, #element_value, #element_value_of_css_property, #execute_async_script, #execute_script, #find_element_by, #find_elements_by, #full_screen_window, #get, #go_back, #go_forward, #implicit_wait_timeout=, #initialize, #keyboard, #local_storage_item, #local_storage_keys, #local_storage_size, #manage, #maximize_window, #minimize_window, #mouse, #new_window, #page_source, #print_page, #quit, #refresh, #release_actions, #remove_local_storage_item, #remove_session_storage_item, #reposition_window, #resize_window, #screenshot, #script_timeout=, #send_actions, #send_keys_to_element, #session_id, #session_storage_item, #session_storage_keys, #session_storage_size, #set_window_rect, #status, #submit_element, #switch_to_default_content, #switch_to_frame, #switch_to_parent_frame, #switch_to_window, #timeout, #title, #upload, #url, #window_handle, #window_handles, #window_position, #window_rect, #window_size

Constructor Details

This class inherits a constructor from Selenium::WebDriver::Remote::Bridge

Instance Method Details

#attach_debuggerObject



44
45
46
# File 'build/rb/lib/selenium/webdriver/safari/bridge.rb', line 44

def attach_debugger
  execute :attach_debugger, {}, {}
end

#commands(command) ⇒ Object



32
33
34
# File 'build/rb/lib/selenium/webdriver/safari/bridge.rb', line 32

def commands(command)
  COMMANDS[command] || super
end

#permissionsObject



36
37
38
# File 'build/rb/lib/selenium/webdriver/safari/bridge.rb', line 36

def permissions
  execute(:get_permissions)['permissions']
end

#permissions=(permissions) ⇒ Object



40
41
42
# File 'build/rb/lib/selenium/webdriver/safari/bridge.rb', line 40

def permissions=(permissions)
  execute :set_permissions, {}, {permissions: permissions}
end