Sha256: 327318a7fb52845695c7d77aa8be6dc2af729c902dc1c9f714b6df404c731a9d

Contents?: true

Size: 766 Bytes

Versions: 3

Compression:

Stored size: 766 Bytes

Contents

# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2023, by Samuel Williams.

require_relative 'bridge/chrome'
require_relative 'bridge/firefox'

module Async
	module WebDriver
		# A bridge is a process that can be used to communicate with a browser.
		# It is not needed in all cases, but is useful when you want to run integration tests without any external drivers/dependencies.
		# As starting a bridge can be slow, it is recommended to use a shared bridge when possible.
		module Bridge
			ALL = [
				Bridge::Chrome,
				Bridge::Firefox,
			]
			
			def self.each(&block)
				return enum_for(:each) unless block_given?
				
				ALL.each do |klass|
					next unless klass.new.supported?
					yield klass
				end
			end
		end
	end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
async-webdriver-0.3.1 lib/async/webdriver/bridge.rb
async-webdriver-0.3.0 lib/async/webdriver/bridge.rb
async-webdriver-0.2.0 lib/async/webdriver/bridge.rb