Path: blob/trunk/rb/lib/selenium/webdriver/chrome/features.rb
1865 views
# frozen_string_literal: true12# Licensed to the Software Freedom Conservancy (SFC) under one3# or more contributor license agreements. See the NOTICE file4# distributed with this work for additional information5# regarding copyright ownership. The SFC licenses this file6# to you under the Apache License, Version 2.0 (the7# "License"); you may not use this file except in compliance8# with the License. You may obtain a copy of the License at9#10# http://www.apache.org/licenses/LICENSE-2.011#12# Unless required by applicable law or agreed to in writing,13# software distributed under the License is distributed on an14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY15# KIND, either express or implied. See the License for the16# specific language governing permissions and limitations17# under the License.1819require 'selenium/webdriver/chromium/features'2021module Selenium22module WebDriver23module Chrome24module Features25include WebDriver::Chromium::Features2627CHROME_COMMANDS = {28get_cast_sinks: [:get, 'session/:session_id/goog/cast/get_sinks'],29set_cast_sink_to_use: [:post, 'session/:session_id/goog/cast/set_sink_to_use'],30start_cast_tab_mirroring: [:post, 'session/:session_id/goog/cast/start_tab_mirroring'],31start_cast_desktop_mirroring: [:post, 'session/:session_id/goog/cast/start_desktop_mirroring'],32get_cast_issue_message: [:get, 'session/:session_id/goog/cast/get_issue_message'],33stop_casting: [:post, 'session/:session_id/goog/cast/stop_casting'],34send_command: [:post, 'session/:session_id/goog/cdp/execute']35}.freeze3637def command_list38CHROME_COMMANDS.merge(CHROMIUM_COMMANDS).merge(self.class::COMMANDS)39end4041def commands(command)42command_list[command]43end44end # Bridge45end # Chrome46end # WebDriver47end # Selenium484950