Module: Selenium::WebDriver::Safari::Features

Defined in:
rb/lib/selenium/webdriver/safari/features.rb

Constant Summary collapse

SAFARI_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



47
48
49
# File 'rb/lib/selenium/webdriver/safari/features.rb', line 47

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

#command_listObject



31
32
33
# File 'rb/lib/selenium/webdriver/safari/features.rb', line 31

def command_list
  SAFARI_COMMANDS.merge(self.class::COMMANDS)
end

#commands(command) ⇒ Object



35
36
37
# File 'rb/lib/selenium/webdriver/safari/features.rb', line 35

def commands(command)
  command_list[command]
end

#permissionsObject



39
40
41
# File 'rb/lib/selenium/webdriver/safari/features.rb', line 39

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

#permissions=(permissions) ⇒ Object



43
44
45
# File 'rb/lib/selenium/webdriver/safari/features.rb', line 43

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