Class: Kuality

Inherits:
Object
  • Object
show all
Defined in:
lib/kuality-coeus.rb

Overview

Initialize this class at the start of your test cases to open the specified test browser at the specified welcome page URL.

The initialization will create the browser object that can be used throughout the page classes

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(web_browser) ⇒ Kuality

Returns a new instance of Kuality.



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/kuality-coeus.rb', line 20

def initialize(web_browser)
  if web_browser == :saucelabs
    @browser = Watir::Browser.new(
        :remote,
        :url => "http://#{ENV['username']}:#{ENV['api_key']}@ondemand.saucelabs.com:80/wd/hub",
        :desired_capabilities => $environment
    )
  else
    @browser = Watir::Browser.new web_browser
    @browser.window.resize_to(1400,900)
  end
  @browser.goto $base_url
end

Instance Attribute Details

#browserObject (readonly)

Returns the value of attribute browser.



18
19
20
# File 'lib/kuality-coeus.rb', line 18

def browser
  @browser
end