Path: blob/trunk/rb/lib/selenium/webdriver/common/driver_extensions/has_casting.rb
1990 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.1819module Selenium20module WebDriver21module DriverExtensions22module HasCasting23#24# What devices ("sinks") are available to be cast to.25#26# @return [Array] list of sinks available for casting with id and name values27#2829def cast_sinks30@bridge.cast_sinks31end3233#34# Sets a specific sink, using its name, as a Cast session receiver target.35#36# @param [String] name the sink to use as the target37#3839def cast_sink_to_use=(name)40@bridge.cast_sink_to_use = name41end4243#44# Starts a tab mirroring session on a specific receiver target.45#46# @param [String] name the sink to use as the target47#4849def start_cast_tab_mirroring(name)50@bridge.start_cast_tab_mirroring(name)51end5253#54# Starts a tab mirroring session on a specific receiver target.55#56# @param [String] name the sink to use as the target57#5859def start_cast_desktop_mirroring(name)60@bridge.start_cast_desktop_mirroring(name)61end6263#64# Gets error messages when there is any issue in a Cast session.65#66# @return [String] the error message67#6869def cast_issue_message70@bridge.cast_issue_message71end7273#74# Stops the existing Cast session on a specific receiver target.75#76# @param [String] name the sink to stop the Cast session77#7879def stop_casting(name)80@bridge.stop_casting(name)81end82end # HasCasting83end # DriverExtensions84end # WebDriver85end # Selenium868788