aipim-rails 0.0.181 → 0.0.182

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/webdriver/screenshot.rb +19 -16
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2efaa4af9200648b33b27af3f72057130719c82c
4
- data.tar.gz: 397acdcd7b76b9db5e57c2ba7f91224cf3fe89c6
3
+ metadata.gz: 21980d351873eb61fd8aa54cbd499c5e252ac676
4
+ data.tar.gz: 0fa4a324a7f54f558d69d6a9846f2ecc03969aba
5
5
  SHA512:
6
- metadata.gz: 2ae21dee85af1c6ea320890ea255b46b3316525a770f8dc1b5cc77251d9bf94a3af22f52386026fe6b5da54c5d5f6ef341f0a00eb3d4797707d97d00c5a73695
7
- data.tar.gz: f82eb20c368cf44799db39e5ea419ae5455d5d2d85f19bdb3344dd28169d976da16f501ce52f872917b9f897cbb7b3d618a4d143f2e9269517a3fb39aeeeb031
6
+ metadata.gz: ec68b9c87eb637845b0f86e00d85186868bd27f1e90a0805af6804b0aa0bc6cabeb08452cd7074b5ce1ec6e2fbe7c4dd76cb2c55b03ee2a6216646f3c717a5ba
7
+ data.tar.gz: e817270b79a0dec23230f717f4e43602628c6c6c66b17f052e6c032f098bd36f4cbd6245716bda449e53591e4d60d03758fb38c8faa1c5869dcd5c0410fe7216
@@ -3,26 +3,29 @@ require 'selenium-webdriver'
3
3
  %x[rm -fr aipim/screenshots/*]
4
4
 
5
5
  Before do |scenario|
6
- @ScenarioTitle = scenario.title
7
- @ScenarioDescription = scenario.description
8
- @FeatureFile = scenario.file.to_s.split('/')
9
- @FeatureFile.delete_at(0)
10
- @FeatureFile = @FeatureFile.join('/')
11
- @FeatureName = scenario.feature.title
12
- @ScenarioTags = scenario.source_tag_names
6
+ if page.driver.browser.respond_to?(:manage)
7
+ @ScenarioTitle = scenario.title
8
+ @ScenarioDescription = scenario.description
9
+ @FeatureFile = scenario.file.to_s.split('/')
10
+ @FeatureFile.delete_at(0)
11
+ @FeatureFile = @FeatureFile.join('/')
12
+ @FeatureName = scenario.feature.title
13
+ @ScenarioTags = scenario.source_tag_names
13
14
 
14
- page.driver.browser.manage.window.maximize
15
- page.driver.browser.manage.window.resize_to(SCREENSHOT_WIDTH, SCREENSHOT_HEIGHT)
15
+ page.driver.browser.manage.window.maximize
16
+ page.driver.browser.manage.window.resize_to(SCREENSHOT_WIDTH, SCREENSHOT_HEIGHT)
17
+ end
16
18
  end
17
19
 
18
20
  After do
19
- config = YAML.load_file("config/aipim.yml")
21
+ if page.driver.browser.respond_to?(:manage)
22
+ config = YAML.load_file("config/aipim.yml")
20
23
 
21
- if (@ScenarioTags.include?('@screenshot') && @ScenarioTags.include?('@javascript') && !page.driver.browser.nil? && config['screenshot'])
22
- path = "aipim/screenshots/#{@FeatureFile}"
23
- system("mkdir -p #{path}")
24
-
25
- sleep(1.0)
26
- page.driver.save_screenshot("#{path}/#{Time.now.to_i}.png")
24
+ if (@ScenarioTags.include?('@screenshot') && @ScenarioTags.include?('@javascript') && !page.driver.browser.nil? && config['screenshot'])
25
+ path = "aipim/screenshots/#{@FeatureFile}"
26
+ system("mkdir -p #{path}")
27
+ sleep(1.0)
28
+ page.driver.save_screenshot("#{path}/#{Time.now.to_i}.png")
29
+ end
27
30
  end
28
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aipim-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.181
4
+ version: 0.0.182
5
5
  platform: ruby
6
6
  authors:
7
7
  - Facta TI