automation_helpers 5.2.0 → 6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/automation_helpers/drivers/v4/browserstack.rb +4 -4
- data/lib/automation_helpers/drivers/v4/capabilities.rb +11 -12
- data/lib/automation_helpers/drivers/v4/local.rb +1 -2
- data/lib/automation_helpers/drivers/v4/options.rb +1 -2
- data/lib/automation_helpers/drivers.rb +0 -2
- data/lib/automation_helpers/extensions/capybara/node/element.rb +2 -2
- data/lib/automation_helpers/extensions/cucumber/core/test/case.rb +2 -2
- data/lib/automation_helpers/patches/base.rb +1 -3
- data/lib/automation_helpers/patches/selenium_logger.rb +2 -2
- data/lib/automation_helpers/patches.rb +0 -2
- data/lib/automation_helpers/version.rb +1 -1
- data/lib/automation_helpers.rb +0 -29
- metadata +18 -19
- data/lib/automation_helpers/logger.rb +0 -24
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c1d6285060e12810750da35b34c2177d20a61c452ebf1908e263aa35f77e972b
|
|
4
|
+
data.tar.gz: 40ce2a6d8c627360e8f251669706f282e2794b79f3b728ba1dbb5522c6705eb5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7cb27f6da88756227eb4916b7b60ea5dac209317b79d99f55d70ba860ba6723de20f14b6cff5cd8d3b22667c621ef987561f6d7500a9577996b7c49cb556ebef
|
|
7
|
+
data.tar.gz: fddf4a7bd98c70bef88ea423d0b164560ccc3df39c15f12de4d668ecc73f8c53a9646eb2f2520bdc8ad9823d9c52b5528e2f9c6c942135d67ea6bfcd33ae0666
|
data/README.md
CHANGED
|
@@ -27,7 +27,7 @@ $ bundle
|
|
|
27
27
|
|
|
28
28
|
## Usage
|
|
29
29
|
|
|
30
|
-
Either require all
|
|
30
|
+
Either require all the extensions required, or require the individual bits and pieces you need
|
|
31
31
|
|
|
32
32
|
```shell
|
|
33
33
|
# Require all of the drivers/patches/extensions code
|
|
@@ -57,5 +57,5 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/site-p
|
|
|
57
57
|
|
|
58
58
|
## Verbose Documentation
|
|
59
59
|
|
|
60
|
-
This will come in time. Meanwhile if you check the gem code most methods are
|
|
60
|
+
This will come in time. Meanwhile, if you check the gem code most methods are
|
|
61
61
|
documented. Also check the specs for more detailed information
|
|
@@ -25,9 +25,9 @@ module AutomationHelpers
|
|
|
25
25
|
# - :session_name (String) -> The session name to be stored on browserstack servers
|
|
26
26
|
# - :browserstack_debug_mode (Boolean) -> Set this to true to run in browserstack debug mode (Note this runs slower!)
|
|
27
27
|
# - :config (String) -> This is an underscore separated key that distils the granular running information
|
|
28
|
-
# i.e.
|
|
28
|
+
# i.e. Windows_7_115 means run on Windows Operating System, OS Version 7, Browser Version 115
|
|
29
29
|
# i.e. OSX_Mojave_12 means run on Mac Operating System, OS Version Mojave, Browser Version 12
|
|
30
|
-
# i.e.
|
|
30
|
+
# i.e. Windows_10_113 means run on Windows Operating System, OS Version 10, Browser Version 113
|
|
31
31
|
# - :username (String) -> The username for Browserstack
|
|
32
32
|
# - :api_key (String) -> The api key for Browserstack
|
|
33
33
|
# - **device_options** (optional) - A Hash of all device specific options that can customise your device
|
|
@@ -62,7 +62,7 @@ module AutomationHelpers
|
|
|
62
62
|
::Faraday::Utils.deep_merge(
|
|
63
63
|
# Browserstack Capabilities and General Capabilities are at different levels, so we merge first
|
|
64
64
|
browserstack_capabilities.merge(browser_version_capability),
|
|
65
|
-
# Then we deep
|
|
65
|
+
# Then we "deep-merge" with anything specifically passed into the driver registration (Which can be nested)
|
|
66
66
|
browser_specific_capabilities.as_json
|
|
67
67
|
)
|
|
68
68
|
)
|
|
@@ -89,7 +89,7 @@ module AutomationHelpers
|
|
|
89
89
|
{
|
|
90
90
|
'bstack:options' => {
|
|
91
91
|
'local' => 'false',
|
|
92
|
-
'seleniumVersion' => '4.
|
|
92
|
+
'seleniumVersion' => '4.28.0',
|
|
93
93
|
'consoleLogs' => 'verbose',
|
|
94
94
|
'networkLogs' => 'true',
|
|
95
95
|
'resolution' => '1920x1080'
|
|
@@ -63,7 +63,7 @@ module AutomationHelpers
|
|
|
63
63
|
'ie' => {
|
|
64
64
|
# This is a minor hack until the IEDriver catches up and releases a V4 compliant copy
|
|
65
65
|
# It is confirmed to be compliant with V4 selenium jars e.t.c.
|
|
66
|
-
'driver' => '4.
|
|
66
|
+
'driver' => '4.16.0.0',
|
|
67
67
|
'arch' => 'x32'
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -82,22 +82,21 @@ module AutomationHelpers
|
|
|
82
82
|
|
|
83
83
|
def android_appium_version(android_version)
|
|
84
84
|
case android_version.to_f
|
|
85
|
-
when
|
|
86
|
-
when
|
|
87
|
-
when
|
|
88
|
-
when
|
|
89
|
-
else raise ArgumentError, "Your Android Version is too low. Please don't use lower than Android
|
|
85
|
+
when 16..; then '3.1.0'
|
|
86
|
+
when 14..; then '2.19.0'
|
|
87
|
+
when 12..; then '2.15.0'
|
|
88
|
+
when 10..; then '2.0.1'
|
|
89
|
+
else raise ArgumentError, "Your Android Version is too low. Please don't use lower than Android Quince (10)."
|
|
90
90
|
end
|
|
91
91
|
end
|
|
92
92
|
|
|
93
93
|
def ios_appium_version(ios_version)
|
|
94
94
|
case ios_version.to_f
|
|
95
|
-
when
|
|
96
|
-
when
|
|
97
|
-
when
|
|
98
|
-
when
|
|
99
|
-
|
|
100
|
-
else raise ArgumentError, "Your iOS Version is too low. Please don't use lower than iOS 12."
|
|
95
|
+
when 17..; then '3.1.0'
|
|
96
|
+
when 16..; then '2.15.0'
|
|
97
|
+
when 15..; then '2.4.1'
|
|
98
|
+
when 14..; then '2.0.1'
|
|
99
|
+
else raise ArgumentError, "Your iOS Version is too low. Please don't use lower than iOS 14."
|
|
101
100
|
end
|
|
102
101
|
end
|
|
103
102
|
end
|
|
@@ -39,8 +39,7 @@ module AutomationHelpers
|
|
|
39
39
|
private
|
|
40
40
|
|
|
41
41
|
# This is required to make local drivers work with Safari TP
|
|
42
|
-
# This is required
|
|
43
|
-
# Safari V11/V12 is unsupported
|
|
42
|
+
# This is required for v13+ of Safari as the old(er), drivers are notoriously flaky
|
|
44
43
|
def service
|
|
45
44
|
return unless safari?
|
|
46
45
|
|
|
@@ -6,8 +6,7 @@ module AutomationHelpers
|
|
|
6
6
|
module Drivers
|
|
7
7
|
module V4
|
|
8
8
|
#
|
|
9
|
-
# The Options object
|
|
10
|
-
# are configuring
|
|
9
|
+
# The Options object for the relevant browser whose driver you are configuring
|
|
11
10
|
#
|
|
12
11
|
# #### Initial setup options
|
|
13
12
|
#
|
|
@@ -8,14 +8,14 @@ module Capybara
|
|
|
8
8
|
class Element
|
|
9
9
|
# @return [Integer]
|
|
10
10
|
#
|
|
11
|
-
# The Left-Most pixel's horizontal position in the DOM (From element.rect)
|
|
11
|
+
# The Left-Most pixel's horizontal position in the DOM (From `element.rect`)
|
|
12
12
|
def horizontal_position
|
|
13
13
|
native.rect.x.to_i
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
# @return [Integer]
|
|
17
17
|
#
|
|
18
|
-
# The Left-Most pixel's vertical position in the DOM (From element.rect)
|
|
18
|
+
# The Left-Most pixel's vertical position in the DOM (From `element.rect`)
|
|
19
19
|
def vertical_position
|
|
20
20
|
native.rect.y.to_i
|
|
21
21
|
end
|
|
@@ -9,14 +9,14 @@ module Cucumber
|
|
|
9
9
|
class Case
|
|
10
10
|
# @return [String]
|
|
11
11
|
#
|
|
12
|
-
# The file name of the feature
|
|
12
|
+
# The file name of the feature that is running (Without the .feature extension)
|
|
13
13
|
def feature_file_name
|
|
14
14
|
feature_file_path.split('/').last&.split('.')&.first.to_s
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
# @return [String]
|
|
18
18
|
#
|
|
19
|
-
# The fully qualified location of the feature
|
|
19
|
+
# The fully qualified location (filepath), of the feature file that is running
|
|
20
20
|
def feature_file_path
|
|
21
21
|
location.to_s
|
|
22
22
|
end
|
|
@@ -13,10 +13,8 @@ module AutomationHelpers
|
|
|
13
13
|
raise 'This is no longer supported' if prevent_usage?
|
|
14
14
|
|
|
15
15
|
Kernel.warn('This is now deprecated and should not be used') if deprecate?
|
|
16
|
-
|
|
17
|
-
AutomationHelpers.logger.info(description)
|
|
16
|
+
$stdout.puts("Adding patch: #{self.class}\n#{description}")
|
|
18
17
|
perform
|
|
19
|
-
AutomationHelpers.logger.info('Patch successfully added.')
|
|
20
18
|
end
|
|
21
19
|
|
|
22
20
|
private
|
data/lib/automation_helpers.rb
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
require 'automation_helpers/drivers'
|
|
4
4
|
require 'automation_helpers/extensions'
|
|
5
|
-
require 'automation_helpers/logger'
|
|
6
5
|
require 'automation_helpers/patches'
|
|
7
6
|
require 'automation_helpers/version'
|
|
8
7
|
|
|
@@ -10,33 +9,5 @@ require 'automation_helpers/version'
|
|
|
10
9
|
module AutomationHelpers
|
|
11
10
|
class << self
|
|
12
11
|
attr_accessor :chrome_log_path
|
|
13
|
-
|
|
14
|
-
def configure
|
|
15
|
-
yield self
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
# The Automation Helpers logger object - This is called automatically in several
|
|
19
|
-
# locations and will log messages according to the normal Ruby protocol
|
|
20
|
-
#
|
|
21
|
-
# This logger object can also be used to manually log messages
|
|
22
|
-
#
|
|
23
|
-
# To Manually log a message
|
|
24
|
-
# AutomationHelpers.logger.info('Information')
|
|
25
|
-
# AutomationHelpers.logger.debug('Input debug message')
|
|
26
|
-
#
|
|
27
|
-
# By default the logger will output all messages to $stdout, but can be
|
|
28
|
-
# altered to log to a file or another IO location by calling `.log_path=`
|
|
29
|
-
def logger
|
|
30
|
-
@logger ||= Logger.create
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
# This writer method allows you to configure where you want the output of
|
|
34
|
-
# the automation_helpers logs to go (Default is $stdout)
|
|
35
|
-
#
|
|
36
|
-
# example: AutomationHelpers.log_path = 'automation_helpers.log' would save all
|
|
37
|
-
# log messages to `./automation_helpers.log`
|
|
38
|
-
def log_path=(logdev)
|
|
39
|
-
logger.reopen(logdev)
|
|
40
|
-
end
|
|
41
12
|
end
|
|
42
13
|
end
|
metadata
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: automation_helpers
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: '6.0'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Luke Hill
|
|
8
8
|
- Marcelo Nicolosi Santos
|
|
9
|
-
autorequire:
|
|
9
|
+
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2026-01-06 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: capybara
|
|
@@ -40,7 +40,7 @@ dependencies:
|
|
|
40
40
|
version: '7.0'
|
|
41
41
|
- - "<"
|
|
42
42
|
- !ruby/object:Gem::Version
|
|
43
|
-
version: '
|
|
43
|
+
version: '11'
|
|
44
44
|
type: :development
|
|
45
45
|
prerelease: false
|
|
46
46
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -50,7 +50,7 @@ dependencies:
|
|
|
50
50
|
version: '7.0'
|
|
51
51
|
- - "<"
|
|
52
52
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: '
|
|
53
|
+
version: '11'
|
|
54
54
|
- !ruby/object:Gem::Dependency
|
|
55
55
|
name: faraday
|
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -85,56 +85,56 @@ dependencies:
|
|
|
85
85
|
requirements:
|
|
86
86
|
- - "~>"
|
|
87
87
|
- !ruby/object:Gem::Version
|
|
88
|
-
version: 1.
|
|
88
|
+
version: 1.81.0
|
|
89
89
|
type: :development
|
|
90
90
|
prerelease: false
|
|
91
91
|
version_requirements: !ruby/object:Gem::Requirement
|
|
92
92
|
requirements:
|
|
93
93
|
- - "~>"
|
|
94
94
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: 1.
|
|
95
|
+
version: 1.81.0
|
|
96
96
|
- !ruby/object:Gem::Dependency
|
|
97
97
|
name: rubocop-performance
|
|
98
98
|
requirement: !ruby/object:Gem::Requirement
|
|
99
99
|
requirements:
|
|
100
100
|
- - "~>"
|
|
101
101
|
- !ruby/object:Gem::Version
|
|
102
|
-
version: 1.
|
|
102
|
+
version: 1.26.1
|
|
103
103
|
type: :development
|
|
104
104
|
prerelease: false
|
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
|
106
106
|
requirements:
|
|
107
107
|
- - "~>"
|
|
108
108
|
- !ruby/object:Gem::Version
|
|
109
|
-
version: 1.
|
|
109
|
+
version: 1.26.1
|
|
110
110
|
- !ruby/object:Gem::Dependency
|
|
111
111
|
name: rubocop-rspec
|
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
|
113
113
|
requirements:
|
|
114
114
|
- - "~>"
|
|
115
115
|
- !ruby/object:Gem::Version
|
|
116
|
-
version: 3.
|
|
116
|
+
version: 3.8.0
|
|
117
117
|
type: :development
|
|
118
118
|
prerelease: false
|
|
119
119
|
version_requirements: !ruby/object:Gem::Requirement
|
|
120
120
|
requirements:
|
|
121
121
|
- - "~>"
|
|
122
122
|
- !ruby/object:Gem::Version
|
|
123
|
-
version: 3.
|
|
123
|
+
version: 3.8.0
|
|
124
124
|
- !ruby/object:Gem::Dependency
|
|
125
125
|
name: selenium-webdriver
|
|
126
126
|
requirement: !ruby/object:Gem::Requirement
|
|
127
127
|
requirements:
|
|
128
128
|
- - "~>"
|
|
129
129
|
- !ruby/object:Gem::Version
|
|
130
|
-
version: '4.
|
|
130
|
+
version: '4.18'
|
|
131
131
|
type: :development
|
|
132
132
|
prerelease: false
|
|
133
133
|
version_requirements: !ruby/object:Gem::Requirement
|
|
134
134
|
requirements:
|
|
135
135
|
- - "~>"
|
|
136
136
|
- !ruby/object:Gem::Version
|
|
137
|
-
version: '4.
|
|
137
|
+
version: '4.18'
|
|
138
138
|
description: Automation Patches / Extensions that allow you to extend your Ruby-based
|
|
139
139
|
testing frameworks
|
|
140
140
|
email:
|
|
@@ -163,7 +163,6 @@ files:
|
|
|
163
163
|
- lib/automation_helpers/extensions/cucumber/core/test/case.rb
|
|
164
164
|
- lib/automation_helpers/extensions/selenium/webdriver/logs.rb
|
|
165
165
|
- lib/automation_helpers/extensions/string.rb
|
|
166
|
-
- lib/automation_helpers/logger.rb
|
|
167
166
|
- lib/automation_helpers/patches.rb
|
|
168
167
|
- lib/automation_helpers/patches/base.rb
|
|
169
168
|
- lib/automation_helpers/patches/capybara.rb
|
|
@@ -176,7 +175,7 @@ metadata:
|
|
|
176
175
|
homepage_uri: https://www.github.com/site-prism/automation_helpers
|
|
177
176
|
source_code_uri: https://www.github.com/site-prism/automation_helpers
|
|
178
177
|
changelog_uri: https://www.github.com/site-prism/automation_helpers/blob/main/CHANGELOG.md
|
|
179
|
-
post_install_message:
|
|
178
|
+
post_install_message:
|
|
180
179
|
rdoc_options: []
|
|
181
180
|
require_paths:
|
|
182
181
|
- lib
|
|
@@ -184,15 +183,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
184
183
|
requirements:
|
|
185
184
|
- - ">="
|
|
186
185
|
- !ruby/object:Gem::Version
|
|
187
|
-
version: '3.
|
|
186
|
+
version: '3.1'
|
|
188
187
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
189
188
|
requirements:
|
|
190
189
|
- - ">="
|
|
191
190
|
- !ruby/object:Gem::Version
|
|
192
|
-
version: 3.2.
|
|
191
|
+
version: 3.2.8
|
|
193
192
|
requirements: []
|
|
194
|
-
rubygems_version: 3.
|
|
195
|
-
signing_key:
|
|
193
|
+
rubygems_version: 3.3.27
|
|
194
|
+
signing_key:
|
|
196
195
|
specification_version: 4
|
|
197
196
|
summary: Automation Helpers - Avoid writing the most common things in Ruby Automation
|
|
198
197
|
test_files: []
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'logger'
|
|
4
|
-
|
|
5
|
-
module AutomationHelpers
|
|
6
|
-
#
|
|
7
|
-
# @api private
|
|
8
|
-
#
|
|
9
|
-
class Logger
|
|
10
|
-
#
|
|
11
|
-
# Generate the Logger used in the gem
|
|
12
|
-
#
|
|
13
|
-
def self.create(output = $stdout)
|
|
14
|
-
logger = ::Logger.new(output)
|
|
15
|
-
logger.progname = 'Automation Helpers'
|
|
16
|
-
logger.level = :INFO
|
|
17
|
-
logger.formatter = proc do |severity, time, progname, msg|
|
|
18
|
-
"#{time.strftime('%F %T')} - #{severity} - #{progname} - #{msg}\n"
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
logger
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
end
|