Module: SpecTest::Platforms
- Included in:
- SpecTest
- Defined in:
- lib/spectest/platforms.rb,
lib/spectest/platform_watir.rb,
lib/spectest/platform_selenium.rb,
lib/spectest/platform_watir/platform_object.rb,
lib/spectest/platform_watir/web_objects/all.rb,
lib/spectest/platform_selenium/platform_object.rb,
lib/spectest/platform_selenium/web_objects/all.rb,
lib/spectest/platform_selenium/web_objects/link.rb,
lib/spectest/platform_selenium/web_objects/button.rb,
lib/spectest/platform_watir/web_objects/text_field.rb,
lib/spectest/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
9
10
11
|
# File 'lib/spectest/platforms.rb', line 9
def self.associate(key, driver)
@@drivers[key] = driver
end
|
.list ⇒ Object
5
6
7
|
# File 'lib/spectest/platforms.rb', line 5
def self.list
@@drivers
end
|
Instance Method Details
13
14
15
16
17
18
|
# File 'lib/spectest/platforms.rb', line 13
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
|