Class: Applitools::Selenium::Eyes

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/applitools/selenium/eyes.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Eyes

Returns a new instance of Eyes.



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/applitools/selenium/eyes.rb', line 5

def initialize(*args)
  options = Applitools::Utils.extract_options!(args)
  server_url = options.delete(:server_url)
  server_url = args.first unless server_url
  runner = options.delete(:visual_grid_runner) || options.delete(:runner)
  if runner.is_a? Applitools::Selenium::VisualGridRunner
    super Applitools::Selenium::VisualGridEyes.new(runner, server_url)
  else
    super Applitools::Selenium::SeleniumEyes.new(server_url, runner: runner || Applitools::ClassicRunner.new)
  end
end