Sha256: 4682ecef6f7b3358d1a28bf391a9557ecb5401071ab5394f50dab41b79e6ae83

Contents?: true

Size: 1019 Bytes

Versions: 4

Compression:

Stored size: 1019 Bytes

Contents

require 'rspec/expectations'
require 'appium_lib'
require 'cucumber/ast'
require 'Ifd_Mobile'
# Define global variables
$current_dir = File.expand_path(File.dirname(__FILE__))
$base_dir = File.expand_path(File.dirname(__FILE__) + '/../..')
require "#{$current_dir}/project_env.rb"

# Create a custom World class so we don't pollute `Object` with Appium methods
class AppiumWorld
end

case $_CONFIG['DeviceName'].upcase.to_sym
  when :IOS
    Appium::Driver.new({caps: capabilities_ios, appium_lib: {server_url: server_url}}).start_driver
  when :ANDROID
    Appium::Driver.new({caps: capabilities_android, appium_lib: {server_url: server_url}}).start_driver
  else
    raise "\nERROR: *** Invalid Device Name!. Please check the config from $_CONFIG['DeviceName'] = #{$_CONFIG['DeviceName']}"
end

Appium.promote_appium_methods AppiumWorld

World do
  AppiumWorld.new
end

def selenium
  return $driver
end

# Before { $driver.start_driver }
#
# After do
#   $driver.driver_quit
# end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
Ifd_Mobile-0.1.9 project/features/support/env.rb
Ifd_Mobile-0.1.8 project/features/support/env.rb
Ifd_Mobile-0.1.6 project/features/support/env.rb
Ifd_Mobile-0.1.5 project/features/support/env.rb