automation_helpers 5.0 → 5.1.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/LICENSE.txt +18 -6
- data/README.md +3 -4
- data/lib/automation_helpers/drivers/v4/browserstack.rb +8 -9
- data/lib/automation_helpers/drivers/v4/capabilities.rb +6 -3
- data/lib/automation_helpers/drivers/v4/local.rb +4 -8
- data/lib/automation_helpers/drivers/v4/options.rb +1 -5
- data/lib/automation_helpers/drivers/v4/remote.rb +6 -8
- data/lib/automation_helpers/patches/capybara.rb +1 -1
- data/lib/automation_helpers/version.rb +1 -1
- metadata +25 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9252919550e4801792a7f382eade7b1f0427c079455b2fb10f8b4874b3a4e92a
|
4
|
+
data.tar.gz: e6b770e260957426e8af92484a4aae79aac5c33482d81bacb229838a5e6a14ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d25b89f081f564d2f965ceb4a559d8ff0570c78e47133f3ed334766114a7e7f050290801b676a7d9b9195cda29b518538200e4b370f2d600d35cea44e5fb42b1
|
7
|
+
data.tar.gz: 39c6775eebd21f41c9667c65a4cbfea200f25a41e2cc68a87e3d508e5cd16f28c648ad05bc7c4d3d3bd6aaab3866f13d0cbbf6e141a915381d5090c10495a9bb
|
data/LICENSE.txt
CHANGED
@@ -1,13 +1,25 @@
|
|
1
|
-
|
1
|
+
BSD 3-Clause License
|
2
|
+
|
3
|
+
Copyright (c) 2020 - The SitePrism team & Marcelo Nicolosi Santos
|
2
4
|
|
3
5
|
All rights reserved.
|
4
6
|
|
5
|
-
Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
7
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
8
|
+
that the following conditions are met:
|
6
9
|
|
7
|
-
Redistributions of source code must retain the above copyright notice, this list of conditions
|
10
|
+
Redistributions of source code must retain the above copyright notice, this list of conditions
|
11
|
+
and the following disclaimer.
|
8
12
|
|
9
|
-
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
13
|
+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
14
|
+
the following disclaimer in the documentation and/or other materials provided with the distribution.
|
10
15
|
|
11
|
-
Neither the name of the copyright holder nor the names of its contributors may be used to endorse or
|
16
|
+
Neither the name of the copyright holder nor the names of its contributors may be used to endorse or
|
17
|
+
promote products derived from this software without specific prior written permission.
|
12
18
|
|
13
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
20
|
+
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
21
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
22
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
23
|
+
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
25
|
+
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/README.md
CHANGED
@@ -53,10 +53,9 @@ $ rspec && rubocop
|
|
53
53
|
|
54
54
|
## Contributing
|
55
55
|
|
56
|
-
Bug reports and pull requests are welcome on GitHub at
|
57
|
-
https://github.com/site-prism/automation_helpers
|
56
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/site-prism/automation_helpers
|
58
57
|
|
59
58
|
## Verbose Documentation
|
60
59
|
|
61
|
-
This will come in time. Meanwhile if you check the gem code
|
62
|
-
|
60
|
+
This will come in time. Meanwhile if you check the gem code most methods are
|
61
|
+
documented. Also check the specs for more detailed information
|
@@ -14,8 +14,7 @@ module AutomationHelpers
|
|
14
14
|
# This requires a series of pre-set values to be passed in
|
15
15
|
#
|
16
16
|
class Browserstack
|
17
|
-
attr_reader :browser, :browserstack_options, :device_options
|
18
|
-
private :browser, :browserstack_options, :device_options
|
17
|
+
attr_reader :browser, :browserstack_options, :device_options, :options
|
19
18
|
|
20
19
|
# #### Initial setup options
|
21
20
|
#
|
@@ -31,11 +30,15 @@ module AutomationHelpers
|
|
31
30
|
# i.e. Windows_10_92 means run on Windows Operating System, OS Version 10, Browser Version 92
|
32
31
|
# - :username (String) -> The username for Browserstack
|
33
32
|
# - :api_key (String) -> The api key for Browserstack
|
34
|
-
#
|
35
|
-
|
33
|
+
# - **device_options** (optional) - A Hash of all device specific options that can customise your device
|
34
|
+
# - :device_name (String) -> The name of your device
|
35
|
+
# - :os_version (String) -> The operating system for your device
|
36
|
+
# - **options** (optional) -> You can instantiate an Options payload that can be used when registering your driver
|
37
|
+
def initialize(browser, browserstack_options, device_options = {}, options = Options.for(browser))
|
36
38
|
@browser = browser
|
37
39
|
@browserstack_options = browserstack_options
|
38
40
|
@device_options = device_options
|
41
|
+
@options = options
|
39
42
|
end
|
40
43
|
|
41
44
|
# @return [Nil]
|
@@ -86,7 +89,7 @@ module AutomationHelpers
|
|
86
89
|
{
|
87
90
|
'bstack:options' => {
|
88
91
|
'local' => 'false',
|
89
|
-
'seleniumVersion' => '4.
|
92
|
+
'seleniumVersion' => '4.15.0',
|
90
93
|
'consoleLogs' => 'verbose',
|
91
94
|
'networkLogs' => 'true',
|
92
95
|
'resolution' => '1920x1080'
|
@@ -104,10 +107,6 @@ module AutomationHelpers
|
|
104
107
|
{ 'browserVersion' => browser_version }
|
105
108
|
end
|
106
109
|
|
107
|
-
def options
|
108
|
-
Options.for(browser)
|
109
|
-
end
|
110
|
-
|
111
110
|
def browserstack_hub_url
|
112
111
|
"https://#{browserstack_options[:username]}:#{browserstack_options[:api_key]}@hub-cloud.browserstack.com/wd/hub"
|
113
112
|
end
|
@@ -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' => '
|
66
|
+
'driver' => '4.14.0.0',
|
67
67
|
'arch' => 'x32'
|
68
68
|
}
|
69
69
|
}
|
@@ -82,7 +82,8 @@ module AutomationHelpers
|
|
82
82
|
|
83
83
|
def android_appium_version(android_version)
|
84
84
|
case android_version.to_f
|
85
|
-
when
|
85
|
+
when 14..; then '2.0.0'
|
86
|
+
when 12..; then '1.22.3'
|
86
87
|
when 10..; then '1.21.0'
|
87
88
|
when 9..; then '1.20.2'
|
88
89
|
else raise ArgumentError, "Your Android Version is too low. Please don't use lower than Android Pie (9)."
|
@@ -91,7 +92,9 @@ module AutomationHelpers
|
|
91
92
|
|
92
93
|
def ios_appium_version(ios_version)
|
93
94
|
case ios_version.to_f
|
94
|
-
when
|
95
|
+
when 16..; then '2.0.0'
|
96
|
+
when 15..; then '1.22.3'
|
97
|
+
when 14..; then '1.22.2'
|
95
98
|
when 13..; then '1.21.0'
|
96
99
|
when 12..; then '1.20.2'
|
97
100
|
else raise ArgumentError, "Your iOS Version is too low. Please don't use lower than iOS 12."
|
@@ -11,15 +11,15 @@ module AutomationHelpers
|
|
11
11
|
# The Local Driver that will spin up and run on your machine (Without connecting to any grid)
|
12
12
|
#
|
13
13
|
class Local
|
14
|
-
attr_reader :browser
|
15
|
-
private :browser
|
14
|
+
attr_reader :browser, :options
|
16
15
|
|
17
16
|
# #### Initial setup options
|
18
17
|
#
|
19
18
|
# - **browser** (required) - When instantiating, the first argument must be the symbol that represents what browser to use
|
20
|
-
#
|
21
|
-
def initialize(browser)
|
19
|
+
# - **options** (optional) -> You can instantiate an Options payload that can be used when registering your driver
|
20
|
+
def initialize(browser, options = Options.for(browser))
|
22
21
|
@browser = browser
|
22
|
+
@options = options
|
23
23
|
end
|
24
24
|
|
25
25
|
# @return [Nil]
|
@@ -48,10 +48,6 @@ module AutomationHelpers
|
|
48
48
|
::Selenium::WebDriver::Service.safari(args: ['--diagnose'])
|
49
49
|
end
|
50
50
|
|
51
|
-
def options
|
52
|
-
Options.for(browser)
|
53
|
-
end
|
54
|
-
|
55
51
|
def safari?
|
56
52
|
browser == :safari
|
57
53
|
end
|
@@ -48,11 +48,7 @@ module AutomationHelpers
|
|
48
48
|
|
49
49
|
# Constantly fire mouseOver events on click actions (Should help mitigate flaky clicks)
|
50
50
|
def internet_explorer_options
|
51
|
-
::Selenium::WebDriver::IE::Options.new(persistent_hover: true)
|
52
|
-
# This can be removed once we migrate past Se4 proper (As the space version name is present there)
|
53
|
-
AutomationHelpers.logger.info('Removing `browser_name` key from options payload.')
|
54
|
-
opts.options.delete(:browser_name)
|
55
|
-
end
|
51
|
+
::Selenium::WebDriver::IE::Options.new(persistent_hover: true)
|
56
52
|
end
|
57
53
|
|
58
54
|
def headless?
|
@@ -11,16 +11,18 @@ module AutomationHelpers
|
|
11
11
|
# This expects the grid to be live **and** accepting node requests
|
12
12
|
#
|
13
13
|
class Remote
|
14
|
-
attr_reader :browser
|
15
|
-
private :browser
|
14
|
+
attr_reader :browser, :options
|
16
15
|
|
17
16
|
# #### Initial setup options
|
18
17
|
#
|
19
18
|
# - **browser** (required) - When instantiating, the first argument must be the symbol that represents what browser to use
|
19
|
+
# - **options** (optional) -> You can instantiate an Options payload that can be used when registering your driver
|
20
|
+
#
|
20
21
|
# - **ENV["HUB_URL"]** (required) - The environment variable HUB_URL must be set to the actively running dockerized grid
|
21
22
|
# (By default this should be +http://hub:4444/wd/hub+)
|
22
|
-
def initialize(browser)
|
23
|
+
def initialize(browser, options = Options.for(browser))
|
23
24
|
@browser = browser
|
25
|
+
@options = options
|
24
26
|
end
|
25
27
|
|
26
28
|
# @return [Nil]
|
@@ -45,12 +47,8 @@ module AutomationHelpers
|
|
45
47
|
Capabilities.for(browser)
|
46
48
|
end
|
47
49
|
|
48
|
-
def options
|
49
|
-
Options.for(browser)
|
50
|
-
end
|
51
|
-
|
52
50
|
def hub_url
|
53
|
-
ENV.fetch('HUB_URL')
|
51
|
+
ENV.fetch('HUB_URL') { raise ArgumentError, 'Please set HUB_URL env key for your grid' }
|
54
52
|
end
|
55
53
|
|
56
54
|
def supported_browser?
|
metadata
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: automation_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.1.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: 2024-12-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capybara
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - ">"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '3.
|
20
|
+
version: '3.35'
|
21
21
|
- - "<"
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: '4'
|
@@ -25,9 +25,9 @@ dependencies:
|
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
|
-
- - "
|
28
|
+
- - ">"
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version: '3.
|
30
|
+
version: '3.35'
|
31
31
|
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '4'
|
@@ -35,36 +35,36 @@ dependencies:
|
|
35
35
|
name: cucumber
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '7.0'
|
41
41
|
- - "<"
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: '
|
43
|
+
version: '10'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
46
|
version_requirements: !ruby/object:Gem::Requirement
|
47
47
|
requirements:
|
48
|
-
- - "
|
48
|
+
- - ">"
|
49
49
|
- !ruby/object:Gem::Version
|
50
50
|
version: '7.0'
|
51
51
|
- - "<"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '10'
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: faraday
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '2.
|
60
|
+
version: '2.8'
|
61
61
|
type: :development
|
62
62
|
prerelease: false
|
63
63
|
version_requirements: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '2.
|
67
|
+
version: '2.8'
|
68
68
|
- !ruby/object:Gem::Dependency
|
69
69
|
name: rspec
|
70
70
|
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.68.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.68.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.22.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.22.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:
|
116
|
+
version: 3.0.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:
|
123
|
+
version: 3.0.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.12'
|
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.12'
|
138
138
|
description: Automation Patches / Extensions that allow you to extend your Ruby-based
|
139
139
|
testing frameworks
|
140
140
|
email:
|
@@ -176,7 +176,7 @@ metadata:
|
|
176
176
|
homepage_uri: https://www.github.com/site-prism/automation_helpers
|
177
177
|
source_code_uri: https://www.github.com/site-prism/automation_helpers
|
178
178
|
changelog_uri: https://www.github.com/site-prism/automation_helpers/blob/main/CHANGELOG.md
|
179
|
-
post_install_message:
|
179
|
+
post_install_message:
|
180
180
|
rdoc_options: []
|
181
181
|
require_paths:
|
182
182
|
- lib
|
@@ -189,10 +189,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
189
189
|
requirements:
|
190
190
|
- - ">="
|
191
191
|
- !ruby/object:Gem::Version
|
192
|
-
version:
|
192
|
+
version: 3.2.3
|
193
193
|
requirements: []
|
194
|
-
rubygems_version: 3.
|
195
|
-
signing_key:
|
194
|
+
rubygems_version: 3.5.22
|
195
|
+
signing_key:
|
196
196
|
specification_version: 4
|
197
197
|
summary: Automation Helpers - Avoid writing the most common things in Ruby Automation
|
198
198
|
test_files: []
|