Module: TerminusSpec::Platforms
- Included in:
- TerminusSpec
- Defined in:
- lib/terminus_spec/platforms.rb,
lib/terminus_spec/platform_watir.rb,
lib/terminus_spec/platform_selenium.rb,
lib/terminus_spec/platform_watir/platform_object.rb,
lib/terminus_spec/platform_watir/web_objects/all.rb,
lib/terminus_spec/platform_selenium/platform_object.rb,
lib/terminus_spec/platform_selenium/web_objects/all.rb,
lib/terminus_spec/platform_selenium/web_objects/link.rb,
lib/terminus_spec/platform_selenium/web_objects/button.rb,
lib/terminus_spec/platform_watir/web_objects/text_field.rb,
lib/terminus_spec/platform_selenium/web_objects/text_field.rb
Defined Under Namespace
Modules: SeleniumWebDriver, WatirWebDriver
Constant Summary
collapse
- @@drivers =
{}
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.associate(key, driver) ⇒ Object
10
11
12
|
# File 'lib/terminus_spec/platforms.rb', line 10
def self.associate(key, driver)
@@drivers[key] = driver
end
|
.list ⇒ Object
6
7
8
|
# File 'lib/terminus_spec/platforms.rb', line 6
def self.list
@@drivers
end
|
Instance Method Details
14
15
16
17
18
19
|
# File 'lib/terminus_spec/platforms.rb', line 14
def platform_for(browser, drivers)
drivers.each_value { |driver|
return driver.create_platform_object_for browser if driver.works_for? browser
}
raise "Unable to associate a platform using the provided browser."
end
|