123456789_123456789_123456789_123456789_123456789_

Module: Selenium::WebDriver::Chromium::Features

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: rb/lib/selenium/webdriver/chromium/features.rb

Constant Summary

  • CHROMIUM_COMMANDS =
    # File 'rb/lib/selenium/webdriver/chromium/features.rb', line 24
    {
      launch_app: [:post, 'session/:session_id/chromium/launch_app'],
      get_network_conditions: [:get, 'session/:session_id/chromium/network_conditions'],
      set_network_conditions: [:post, 'session/:session_id/chromium/network_conditions'],
      delete_network_conditions: [:delete, 'session/:session_id/chromium/network_conditions'],
      set_permission: [:post, 'session/:session_id/permissions'],
      get_available_log_types: [:get, 'session/:session_id/se/log/types'],
      get_log: [:post, 'session/:session_id/se/log']
    }.freeze

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#cast_sink_to_use=(name) (writeonly)

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/chromium/features.rb', line 42

def cast_sink_to_use=(name)
  execute :set_cast_sink_to_use, {}, {sinkName: name}
end

#network_conditions (rw)

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/chromium/features.rb', line 66

def network_conditions
  execute :get_network_conditions
end

#network_conditions=(conditions) (rw)

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/chromium/features.rb', line 70

def network_conditions=(conditions)
  execute :set_network_conditions, {}, {network_conditions: conditions}
end

Instance Method Details

#available_log_types

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/chromium/features.rb', line 82

def available_log_types
  types = execute :get_available_log_types
  Array(types).map(&:to_sym)
end

#cast_issue_message

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/chromium/features.rb', line 46

def cast_issue_message
  execute :cast_issue_message
end

#cast_sinks

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/chromium/features.rb', line 38

def cast_sinks
  execute :get_cast_sinks
end

#delete_network_conditions

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/chromium/features.rb', line 74

def delete_network_conditions
  execute :delete_network_conditions
end

#launch_app(id)

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/chromium/features.rb', line 34

def launch_app(id)
  execute :launch_app, {}, {id: id}
end

#log(type)

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/chromium/features.rb', line 87

def log(type)
  data = execute :get_log, {}, {type: type.to_s}

  Array(data).map do |l|
    LogEntry.new l.fetch('level', 'UNKNOWN'), l.fetch('timestamp'), l.fetch('message')
  rescue KeyError
    next
  end
end

#send_command(command_params)

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/chromium/features.rb', line 78

def send_command(command_params)
  execute :send_command, {}, command_params
end

#set_permission(name, value)

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/chromium/features.rb', line 62

def set_permission(name, value)
  execute :set_permission, {}, {descriptor: {name: name}, state: value}
end

#start_cast_desktop_mirroring(name)

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/chromium/features.rb', line 54

def start_cast_desktop_mirroring(name)
  execute :start_cast_desktop_mirroring, {}, {sinkName: name}
end

#start_cast_tab_mirroring(name)

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/chromium/features.rb', line 50

def start_cast_tab_mirroring(name)
  execute :start_cast_tab_mirroring, {}, {sinkName: name}
end

#stop_casting(name)

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/chromium/features.rb', line 58

def stop_casting(name)
  execute :stop_casting, {}, {sinkName: name}
end