mirror of
https://github.com/appium/appium.git
synced 2026-05-04 17:29:28 -05:00
Add cucumber example for cross platform env.rb
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user