module Applitools::Selenium
MIGRATION NOTE: This legacy driver wrapper is being maintained for backward compatibility. New code should avoid using these wrappers and instead:
-
Use unwrapped
Selenium
WebDriver objects directly -
Use the
universal_driver_config
method to obtain the standard format for Universal SDK -
Use element IDs rather than wrapped element objects
For more details on the migration path, see spec/core/universal_eyes_driver_spec.rb
MIGRATION NOTE: This legacy element wrapper is being maintained for backward compatibility. New code should avoid using these wrappers and instead:
-
Use unwrapped
Selenium
WebDriver elements directly -
When passing elements to
Eyes
, use the element’s ID rather than the wrapped object -
Work with the universal SDK directly when possible
For more details on the migration path, see spec/core/universal_eyes_driver_spec.rb
Public Class Methods
Source
# File lib/eyes_selenium.rb, line 15 def self.require_dir(dir) load_dir = File.dirname(File.expand_path(__FILE__)) Dir[File.join(load_dir, 'applitools', dir, '*.rb')].sort.each do |f| require f end end
Source
# File lib/eyes_selenium.rb, line 22 def self.universal_driver_config(driver) if driver.respond_to?(:driver) # appium bridge = driver.send(:driver).send(:bridge) capabilities = bridge.capabilities else # selenium bridge = driver.send(:bridge) capabilities = driver.capabilities end hidden_server_url = bridge.http.send(:server_url).to_s { serverUrl: hidden_server_url, sessionId: bridge.session_id, capabilities: capabilities.as_json } end