selenium-webdriver 4.5.0 → 4.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES +19 -1
- data/LICENSE +0 -0
- data/NOTICE +0 -0
- data/bin/linux/selenium-manager +0 -0
- data/bin/macos/selenium-manager +0 -0
- data/bin/windows/selenium-manager.exe +0 -0
- data/lib/selenium/webdriver/atoms/findElements.js +0 -0
- data/lib/selenium/webdriver/atoms/isDisplayed.js +0 -0
- data/lib/selenium/webdriver/atoms/mutationListener.js +0 -0
- data/lib/selenium/webdriver/chrome/options.rb +0 -0
- data/lib/selenium/webdriver/chrome/profile.rb +0 -0
- data/lib/selenium/webdriver/chrome/service.rb +1 -1
- data/lib/selenium/webdriver/common/selenium_manager.rb +86 -0
- data/lib/selenium/webdriver/common/service.rb +7 -3
- data/lib/selenium/webdriver/common.rb +1 -0
- data/lib/selenium/webdriver/edge/options.rb +0 -0
- data/lib/selenium/webdriver/edge/profile.rb +0 -0
- data/lib/selenium/webdriver/remote/capabilities.rb +0 -0
- data/lib/selenium/webdriver/support/select.rb +1 -4
- data/lib/selenium/webdriver/version.rb +1 -1
- data/selenium-webdriver.gemspec +4 -1
- metadata +6 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 9e5a3a63437323859cfcd9e2c2de24eb03db07baf71783ce64b720ea50b51517
         | 
| 4 | 
            +
              data.tar.gz: ac97d032d52743c7a514dfd027d54696361ee9a98253600de092e3eb9c374b0a
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: b5959ce29798e1fed97317ed4839e2e520100f299451589ec5833a36e0d445a53b9d6deba43f99ba132d5f366c3dd9de6b481f6efde97e04bfd07f088895f2c8
         | 
| 7 | 
            +
              data.tar.gz: 280a4a659cf212b04a6426acad25b701a9c4a8a34ac9a43fbe368fade7f05092da377fbdbb1d95a65787021ac2074ec7b826a3d1abd072576be48fabd574a2b3
         | 
    
        data/CHANGES
    CHANGED
    
    | @@ -1,4 +1,22 @@ | |
| 1 | 
            -
            4. | 
| 1 | 
            +
            4.6.1 (2022-11-04)
         | 
| 2 | 
            +
            =========================
         | 
| 3 | 
            +
            Ruby:
         | 
| 4 | 
            +
              * fix bug preventing selenium-manager from being executable by default
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            4.6.0 (2022-11-04)
         | 
| 7 | 
            +
            =========================
         | 
| 8 | 
            +
            BiDi:
         | 
| 9 | 
            +
              * Released selenium-devtools 0.107.0 (supports CDP v85, v105, v106, v107)
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            Ruby:
         | 
| 12 | 
            +
              * firefox scroll by amount is only failing on mac
         | 
| 13 | 
            +
              * add initial support for selenium manager
         | 
| 14 | 
            +
              * Revert "[rb] do not allow Select class to work with disabled selects"
         | 
| 15 | 
            +
              * Make sure selenium-manager is packed into gem
         | 
| 16 | 
            +
              * Fix platform list in #scroll_by guard
         | 
| 17 | 
            +
             | 
| 18 | 
            +
             | 
| 19 | 
            +
            4.5.0 (2022-09-28)
         | 
| 2 20 | 
             
            =========================
         | 
| 3 21 |  | 
| 4 22 | 
             
            BiDi:
         | 
    
        data/LICENSE
    CHANGED
    
    | 
            File without changes
         | 
    
        data/NOTICE
    CHANGED
    
    | 
            File without changes
         | 
| Binary file | 
| Binary file | 
| Binary file | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| @@ -26,7 +26,7 @@ module Selenium | |
| 26 26 | 
             
                    MISSING_TEXT = <<~ERROR
         | 
| 27 27 | 
             
                      Unable to find chromedriver. Please download the server from
         | 
| 28 28 | 
             
                      https://chromedriver.storage.googleapis.com/index.html and place it somewhere on your PATH.
         | 
| 29 | 
            -
                      More info at https:// | 
| 29 | 
            +
                      More info at https://www.selenium.dev/documentation/webdriver/getting_started/install_drivers/?language=ruby.
         | 
| 30 30 | 
             
                    ERROR
         | 
| 31 31 | 
             
                    SHUTDOWN_SUPPORTED = true
         | 
| 32 32 |  | 
| @@ -0,0 +1,86 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            # Licensed to the Software Freedom Conservancy (SFC) under one
         | 
| 4 | 
            +
            # or more contributor license agreements.  See the NOTICE file
         | 
| 5 | 
            +
            # distributed with this work for additional information
         | 
| 6 | 
            +
            # regarding copyright ownership.  The SFC licenses this file
         | 
| 7 | 
            +
            # to you under the Apache License, Version 2.0 (the
         | 
| 8 | 
            +
            # "License"); you may not use this file except in compliance
         | 
| 9 | 
            +
            # with the License.  You may obtain a copy of the License at
         | 
| 10 | 
            +
            #
         | 
| 11 | 
            +
            #   http://www.apache.org/licenses/LICENSE-2.0
         | 
| 12 | 
            +
            #
         | 
| 13 | 
            +
            # Unless required by applicable law or agreed to in writing,
         | 
| 14 | 
            +
            # software distributed under the License is distributed on an
         | 
| 15 | 
            +
            # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
         | 
| 16 | 
            +
            # KIND, either express or implied.  See the License for the
         | 
| 17 | 
            +
            # specific language governing permissions and limitations
         | 
| 18 | 
            +
            # under the License.
         | 
| 19 | 
            +
             | 
| 20 | 
            +
            module Selenium
         | 
| 21 | 
            +
              module WebDriver
         | 
| 22 | 
            +
                #
         | 
| 23 | 
            +
                # Wrapper for getting information from the Selenium Manager binaries.
         | 
| 24 | 
            +
                # This implementation is still in beta, and may change.
         | 
| 25 | 
            +
                # @api private
         | 
| 26 | 
            +
                #
         | 
| 27 | 
            +
                class SeleniumManager
         | 
| 28 | 
            +
                  BIN_PATH = "../../../../../bin"
         | 
| 29 | 
            +
             | 
| 30 | 
            +
                  class << self
         | 
| 31 | 
            +
                    # @param [String] driver_name which driver to use.
         | 
| 32 | 
            +
                    # @return [String] the path to the correct driver.
         | 
| 33 | 
            +
                    def driver_path(driver_name)
         | 
| 34 | 
            +
                      @driver_path ||= begin
         | 
| 35 | 
            +
                        unless %w[chromedriver geckodriver msedgedriver].include?(driver_name)
         | 
| 36 | 
            +
                          msg = "Unable to locate driver with name: #{driver_name}"
         | 
| 37 | 
            +
                          raise Error::WebDriverError, msg
         | 
| 38 | 
            +
                        end
         | 
| 39 | 
            +
             | 
| 40 | 
            +
                        location = run("#{binary} --driver #{driver_name}").split("\t").last.strip
         | 
| 41 | 
            +
                        WebDriver.logger.debug("Driver found at #{location}")
         | 
| 42 | 
            +
                        Platform.assert_executable location
         | 
| 43 | 
            +
             | 
| 44 | 
            +
                        location
         | 
| 45 | 
            +
                      end
         | 
| 46 | 
            +
                    end
         | 
| 47 | 
            +
             | 
| 48 | 
            +
                    private
         | 
| 49 | 
            +
             | 
| 50 | 
            +
                    # @return [String] the path to the correct selenium manager
         | 
| 51 | 
            +
                    def binary
         | 
| 52 | 
            +
                      @binary ||= begin
         | 
| 53 | 
            +
                        path = File.expand_path(BIN_PATH, __FILE__)
         | 
| 54 | 
            +
                        path << if Platform.windows?
         | 
| 55 | 
            +
                                  '/windows/selenium-manager.exe'
         | 
| 56 | 
            +
                                elsif Platform.mac?
         | 
| 57 | 
            +
                                  '/macos/selenium-manager'
         | 
| 58 | 
            +
                                elsif Platform.linux?
         | 
| 59 | 
            +
                                  '/linux/selenium-manager'
         | 
| 60 | 
            +
                                end
         | 
| 61 | 
            +
                        location = File.expand_path(path, __FILE__)
         | 
| 62 | 
            +
                        unless location.is_a?(String) && File.exist?(location) && File.executable?(location)
         | 
| 63 | 
            +
                          raise Error::WebDriverError, "Unable to obtain Selenium Manager"
         | 
| 64 | 
            +
                        end
         | 
| 65 | 
            +
             | 
| 66 | 
            +
                        WebDriver.logger.debug("Selenium Manager found at #{location}")
         | 
| 67 | 
            +
                        location
         | 
| 68 | 
            +
                      end
         | 
| 69 | 
            +
                    end
         | 
| 70 | 
            +
             | 
| 71 | 
            +
                    def run(command)
         | 
| 72 | 
            +
                      WebDriver.logger.debug("Executing Process #{command}")
         | 
| 73 | 
            +
             | 
| 74 | 
            +
                      begin
         | 
| 75 | 
            +
                        result = `#{command}`
         | 
| 76 | 
            +
                        return result if result.match?(/^INFO\t/)
         | 
| 77 | 
            +
                      rescue StandardError => e
         | 
| 78 | 
            +
                        raise Error::WebDriverError, "Unsuccessful command executed: #{command}; #{e.message}"
         | 
| 79 | 
            +
                      end
         | 
| 80 | 
            +
             | 
| 81 | 
            +
                      raise Error::WebDriverError, "Unsuccessful command executed: #{command}"
         | 
| 82 | 
            +
                    end
         | 
| 83 | 
            +
                  end
         | 
| 84 | 
            +
                end # SeleniumManager
         | 
| 85 | 
            +
              end # WebDriver
         | 
| 86 | 
            +
            end # Selenium
         | 
| @@ -80,9 +80,7 @@ module Selenium | |
| 80 80 | 
             
                  end
         | 
| 81 81 |  | 
| 82 82 | 
             
                  def launch
         | 
| 83 | 
            -
                     | 
| 84 | 
            -
                    sm.start
         | 
| 85 | 
            -
                    sm
         | 
| 83 | 
            +
                    ServiceManager.new(self).tap(&:start)
         | 
| 86 84 | 
             
                  end
         | 
| 87 85 |  | 
| 88 86 | 
             
                  def shutdown_supported
         | 
| @@ -101,6 +99,12 @@ module Selenium | |
| 101 99 | 
             
                    path = path.call if path.is_a?(Proc)
         | 
| 102 100 | 
             
                    path ||= Platform.find_binary(self.class::EXECUTABLE)
         | 
| 103 101 |  | 
| 102 | 
            +
                    begin
         | 
| 103 | 
            +
                      path ||= SeleniumManager.driver_path(self.class::EXECUTABLE)
         | 
| 104 | 
            +
                    rescue Error::WebDriverError => e
         | 
| 105 | 
            +
                      WebDriver.logger.debug("Unable obtain driver using Selenium Manager; #{e.message}")
         | 
| 106 | 
            +
                    end
         | 
| 107 | 
            +
             | 
| 104 108 | 
             
                    raise Error::WebDriverError, self.class::MISSING_TEXT unless path
         | 
| 105 109 |  | 
| 106 110 | 
             
                    Platform.assert_executable path
         | 
| @@ -22,6 +22,7 @@ require 'selenium/webdriver/common/platform' | |
| 22 22 | 
             
            require 'selenium/webdriver/common/proxy'
         | 
| 23 23 | 
             
            require 'selenium/webdriver/common/log_entry'
         | 
| 24 24 | 
             
            require 'selenium/webdriver/common/file_reaper'
         | 
| 25 | 
            +
            require 'selenium/webdriver/common/selenium_manager'
         | 
| 25 26 | 
             
            require 'selenium/webdriver/common/service'
         | 
| 26 27 | 
             
            require 'selenium/webdriver/common/service_manager'
         | 
| 27 28 | 
             
            require 'selenium/webdriver/common/socket_lock'
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| @@ -26,11 +26,8 @@ module Selenium | |
| 26 26 | 
             
                    #
         | 
| 27 27 |  | 
| 28 28 | 
             
                    def initialize(element)
         | 
| 29 | 
            -
                      unless element.enabled?
         | 
| 30 | 
            -
                        raise Error::UnsupportedOperationError, 'Select element is disabled and may not be used.'
         | 
| 31 | 
            -
                      end
         | 
| 32 | 
            -
             | 
| 33 29 | 
             
                      tag_name = element.tag_name
         | 
| 30 | 
            +
             | 
| 34 31 | 
             
                      raise ArgumentError, "unexpected tag name #{tag_name.inspect}" unless tag_name.casecmp('select').zero?
         | 
| 35 32 |  | 
| 36 33 | 
             
                      @element = element
         | 
    
        data/selenium-webdriver.gemspec
    CHANGED
    
    | @@ -41,8 +41,11 @@ Gem::Specification.new do |s| | |
| 41 41 | 
             
                'lib/selenium-webdriver.rb',
         | 
| 42 42 | 
             
                'lib/selenium/server.rb',
         | 
| 43 43 | 
             
                'lib/selenium/webdriver.rb'
         | 
| 44 | 
            -
              ] | 
| 44 | 
            +
              ]
         | 
| 45 | 
            +
              s.files += Dir['bin/**/*']
         | 
| 46 | 
            +
              s.files += Dir['lib/selenium/webdriver/**/*']
         | 
| 45 47 |  | 
| 48 | 
            +
              s.bindir = 'bin'
         | 
| 46 49 | 
             
              s.require_paths = ['lib']
         | 
| 47 50 |  | 
| 48 51 | 
             
              s.add_runtime_dependency 'childprocess', ['>= 0.5', '< 5.0']
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: selenium-webdriver
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 4. | 
| 4 | 
            +
              version: 4.6.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Alex Rodionov
         | 
| @@ -10,7 +10,7 @@ authors: | |
| 10 10 | 
             
            autorequire: 
         | 
| 11 11 | 
             
            bindir: bin
         | 
| 12 12 | 
             
            cert_chain: []
         | 
| 13 | 
            -
            date: 2022- | 
| 13 | 
            +
            date: 2022-11-04 00:00:00.000000000 Z
         | 
| 14 14 | 
             
            dependencies:
         | 
| 15 15 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 16 16 | 
             
              name: childprocess
         | 
| @@ -271,6 +271,9 @@ files: | |
| 271 271 | 
             
            - LICENSE
         | 
| 272 272 | 
             
            - NOTICE
         | 
| 273 273 | 
             
            - README.md
         | 
| 274 | 
            +
            - bin/linux/selenium-manager
         | 
| 275 | 
            +
            - bin/macos/selenium-manager
         | 
| 276 | 
            +
            - bin/windows/selenium-manager.exe
         | 
| 274 277 | 
             
            - lib/selenium-webdriver.rb
         | 
| 275 278 | 
             
            - lib/selenium/server.rb
         | 
| 276 279 | 
             
            - lib/selenium/webdriver.rb
         | 
| @@ -351,6 +354,7 @@ files: | |
| 351 354 | 
             
            - lib/selenium/webdriver/common/profile_helper.rb
         | 
| 352 355 | 
             
            - lib/selenium/webdriver/common/proxy.rb
         | 
| 353 356 | 
             
            - lib/selenium/webdriver/common/search_context.rb
         | 
| 357 | 
            +
            - lib/selenium/webdriver/common/selenium_manager.rb
         | 
| 354 358 | 
             
            - lib/selenium/webdriver/common/service.rb
         | 
| 355 359 | 
             
            - lib/selenium/webdriver/common/service_manager.rb
         | 
| 356 360 | 
             
            - lib/selenium/webdriver/common/shadow_root.rb
         |