Sha256: f441b6ef4d9e3e12bbfb13bcf95ae743c1a51dc6a5424a35fcd0f19309642504

Contents?: true

Size: 867 Bytes

Versions: 8

Compression:

Stored size: 867 Bytes

Contents

<%- if automation == 'sparkling_ios' -%>
require 'tmpdir'
require_relative '../../helpers/allure_helper'
require_relative '../../helpers/driver_helper'

include DriverHelper

Before do
  AllureHelper.configure
  app
end

After do |scenario|
  Dir.mktmpdir do |temp_folder|
    screenshot = app.screenshot.save("#{temp_folder}/#{scenario.name}.png")
    AllureHelper.add_screenshot(scenario.name, screenshot)
  end
  app.close
end
<%- else -%>
require 'tmpdir'
require_relative '../../helpers/allure_helper'
require_relative '../../helpers/driver_helper'

include DriverHelper

Before do
  AllureHelper.configure
  driver.start_driver
end

After do |scenario|
  Dir.mktmpdir do |temp_folder|
    screenshot = driver.screenshot("#{temp_folder}/#{scenario.name}.png")
    AllureHelper.add_screenshot(scenario.name, screenshot)
  end
  driver.quit_driver
end
<%- end -%>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ruby_raider-0.9.2 lib/generators/cucumber/templates/partials/appium_env.tt
ruby_raider-0.9.1 lib/generators/cucumber/templates/partials/appium_env.tt
ruby_raider-0.9.0 lib/generators/cucumber/templates/partials/appium_env.tt
ruby_raider-0.8.9 lib/generators/cucumber/templates/partials/appium_env.tt
ruby_raider-0.8.8 lib/generators/cucumber/templates/partials/appium_env.tt
ruby_raider-0.8.6 lib/generators/cucumber/templates/partials/appium_env.tt
ruby_raider-0.8.5 lib/generators/cucumber/templates/partials/appium_env.tt
ruby_raider-0.8.3 lib/generators/cucumber/templates/partials/appium_env.tt