Class: Sapphire::WebAbstractions::MetaBrowser

Inherits:
Object
  • Object
show all
Includes:
RubySeleniumWebDriver
Defined in:
lib/sapphire/WebAbstractions/Browsers/MetaBrowser.rb

Instance Attribute Summary collapse

Attributes included from RubySeleniumWebDriver

#rootUrl

Instance Method Summary collapse

Methods included from RubySeleniumWebDriver

#AcceptAlert, #AlertShown, #Close, #ClosePopup, #Create, #CurrentUrl, #ExecuteScript, #FindAlert, #FindAllItems, #FindElement, #FindElements, #FindItem, #FindItemWithWait, #FindItemWithoutWait, #GetValue, #Init, #NavigateTo, #Reload, #Run, #Screenshot, #SetAlert, #SetRootUrl, #ShouldNavigateTo, #ShouldTransitionTo, #Switch, #SwitchToIFrame, #SwitchToPopup, #Type

Methods included from Pluggable

included, intercept

Constructor Details

#initialize(driver) ⇒ MetaBrowser

Returns a new instance of MetaBrowser.



9
10
11
# File 'lib/sapphire/WebAbstractions/Browsers/MetaBrowser.rb', line 9

def initialize(driver)
  @driver = driver
end

Instance Attribute Details

#driverObject (readonly)

Returns the value of attribute driver.



7
8
9
# File 'lib/sapphire/WebAbstractions/Browsers/MetaBrowser.rb', line 7

def driver
  @driver
end

Instance Method Details

#BrowserObject



13
14
15
16
# File 'lib/sapphire/WebAbstractions/Browsers/MetaBrowser.rb', line 13

def Browser()
  raise "Browser is null. Did you forget to start the browser?" if self.driver.nil? or self.driver.browser.nil?
  self.driver.browser
end