Skip to content

Commit

Permalink
[rb] missed adding the HasCasting class
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Sep 24, 2021
1 parent 2e3c429 commit 8aa962d
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rb/lib/selenium/webdriver/chrome/features.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ def cast_sinks
end

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

def cast_issue_message
execute :cast_issue_message
end

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

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

def network_conditions
Expand Down
47 changes: 47 additions & 0 deletions rb/lib/selenium/webdriver/common/driver_extensions/has_casting.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# frozen_string_literal: true

# Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

module Selenium
module WebDriver
module DriverExtensions
module HasCasting

def cast_sinks
@bridge.cast_sinks
end

def cast_sink_to_use=(name)
@bridge.cast_sink_to_use = name
end

def start_cast_tab_mirroring(name)
@bridge.start_cast_tab_mirroring(name)
end

def cast_issue_message
@bridge.cast_issue_message
end

def stop_casting(name)
@bridge.stop_casting(name)
end
end # HasCasting
end # DriverExtensions
end # WebDriver
end # Selenium

0 comments on commit 8aa962d

Please sign in to comment.