Add cucumber example for cross platform env.rb

This commit is contained in:
bootstraponline
2014-06-06 17:17:35 -04:00
parent 0f7126e448
commit a548d0a601
@@ -23,4 +23,19 @@ World do
end
Before { $driver.start_driver }
After { $driver.driver_quit }
After { $driver.driver_quit }
=begin
# If you wanted one env.rb for both android and iOS, you could use logic similar to this:
world_class = ENV['PLATFORM_NAME'] == 'iOS' ? IosWorld : AndroidWorld
# each world class defines the `caps` method specific to that platform
Appium::Driver.new world_class.caps
Appium.promote_appium_methods world_class
World { world_class.new }
Before { $driver.start_driver }
After { $driver.driver_quit }
=end