Sha256: b1a9e62a6dc8b0f7ee10e522023ff25b800e76ec5e8540c7f53f23d0438158b5

Contents?: true

Size: 908 Bytes

Versions: 1

Compression:

Stored size: 908 Bytes

Contents

Before do | scenario |
  # need to configure env variables for browser
  caps = {
      caps: {
          browserName: "#{ENV['browserName']}",
          platformVersion: "#{ENV['platformVersion']}",
          deviceName: "#{ENV['deviceName']}",
          platformName: "#{ENV['platformName']}",
          fullReset: false,
          noReset: true,
          dontStopAppOnReset: true,
          app: "#{ENV['app']}"
      },
      appium_lib: {
          server_url: "http://#{ENV['server_url']}/wd/hub"
      }
  }

  @driver = Appium::Driver.new(caps,true)
  @driver.start_driver
end

After do | scenario |
  sessionid =  @driver.session_id
  jobname = "#{scenario.feature.name} - #{scenario.name}"
  puts "SessionID=#{sessionid} job-name=#{jobname}"

  @driver.driver_quit
  #
  # if scenario.passed?
  #   SauceWhisk::Jobs.pass_job sessionid
  # else
  #   SauceWhisk::Jobs.fail_job sessionid
  # end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
Ifd_Mobile-1.5.0 project/features/support/hooks.rb