class AutomationObject::Framework
Framework
class, the core A Proxy
class that will become the DSL Framework
Attributes
@return [AutomationObject::BluePrint::Composite::Top]
@return [AutomationObject::Driver::Driver]
@return [Dsl] workable dsl composite object
@return [AutomationObject::State::Session]
Public Class Methods
Singleton method if using Cucumber @return [AutomationObject::Framework] singleton of self
# File lib/automation_object/framework.rb, line 96 def get singleton end
Will assume nil or :nokogiri is XML based and AutomationObject
can also automate XML @param driver [Selenium::WebDriver::Driver,Appium::Driver,nil] selenium type driver or nil @param blue_prints
[Hash] arguments for Framework
# File lib/automation_object/framework.rb, line 31 def initialize(driver, blue_prints) self.driver = driver self.blue_prints = blue_prints self.state = State.create(self.driver, self.blue_prints) @subject = Dsl.create(self.blue_prints, state) AutomationObject::Framework.singleton = self end
Public Instance Methods
# File lib/automation_object/framework.rb, line 60 def blue_prints=(value) @blue_prints = BluePrint.create(value) end
Current Screen @return [AutomationObject::Dsl::ScreenProxy]
# File lib/automation_object/framework.rb, line 51 def current_screen @subject.current_screen end
# File lib/automation_object/framework.rb, line 67 def driver=(value) Driver.adapter = case value when Selenium::WebDriver::Driver :selenium when Appium::Driver :appium else :nokogiri end @driver = Driver.create(value) end
Reset the entire state, remove any values Leave the driver alone here, can be done elsewhere @return [void]
# File lib/automation_object/framework.rb, line 83 def quit state.quit # Quit the state. That way it knows to kill threads if operational self.dsl, self.state, self.blue_prints, self.driver = nil end
Retrieve screen from composite @param name [String, Symbol] name of screen @raise [AutomationObject::Dsl::Error::ScreenDoesNotExistError] @return [AutomationObject::Dsl::ScreenProxy]
# File lib/automation_object/framework.rb, line 45 def screen(name) @subject.screen(name) end