Module: Selenium::WebDriver::Safari::Bridge

Defined in:
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

Instance Method Summary collapse

Instance Method Details

#attach_debuggerObject


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

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

#commands(command) ⇒ Object


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

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

#permissionsObject


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

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

#permissions=(permissions) ⇒ Object


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

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