testcentricity_web 3.0.4 → 3.0.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78140f3aea9951d7089f6e0c5d4ac077ea80aabf
|
4
|
+
data.tar.gz: f62513deab86c9cc76cc56af6b17478dec9fa814
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1fe4090c5581c9e72d50b3ac5b18945c35d68fae7731b9fa7135ce9538ae18ffb1db49ff4f59d3bef53a2750a962759ab2168236d56c8c86572da37dd56be04
|
7
|
+
data.tar.gz: cc5f589e9513910869f777a8a9ee5abf29a9ce233af93611b72f033dd433b30f2504d008ff085fff0f67ebeb7536edb7c4da547e82ae818c3e1f1f1b743e426b
|
data/HISTORY.md
CHANGED
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
|
6
6
|
The TestCentricity™ Web core generic framework for desktop and mobile web site testing implements a Page Object and Data Object Model DSL for
|
7
|
-
use with Cucumber, Capybara, and Selenium-Webdriver.
|
7
|
+
use with Cucumber, Capybara (version 3.x), and Selenium-Webdriver (version 3.x).
|
8
8
|
|
9
9
|
An example project that demonstrates the implementation of a page object model framework using Cucumber and TestCentricity™ can be found [here](https://github.com/TestCentricity/tc_web_sample).
|
10
10
|
|
@@ -23,7 +23,11 @@ The TestCentricity™ Web gem supports running automated tests against the follo
|
|
23
23
|
|
24
24
|
## What's New
|
25
25
|
|
26
|
-
A complete history of bug fixes and new features can be found in the {file:HISTORY.
|
26
|
+
A complete history of bug fixes and new features can be found in the {file:HISTORY.md HISTORY} file.
|
27
|
+
|
28
|
+
###Version 3.0.5
|
29
|
+
|
30
|
+
* Added `Environ.headless` method. Will return `true` if testing against a *headless* instance of Chrome or Firefox..
|
27
31
|
|
28
32
|
###Version 3.0.4
|
29
33
|
|
@@ -29,6 +29,7 @@ module TestCentricity
|
|
29
29
|
attr_accessor :test_environment
|
30
30
|
attr_accessor :browser
|
31
31
|
attr_accessor :browser_size
|
32
|
+
attr_accessor :headless
|
32
33
|
attr_accessor :session_state
|
33
34
|
attr_accessor :os
|
34
35
|
attr_accessor :device
|
@@ -112,6 +113,14 @@ module TestCentricity
|
|
112
113
|
@browser_size
|
113
114
|
end
|
114
115
|
|
116
|
+
def self.headless=(state)
|
117
|
+
@headless = state
|
118
|
+
end
|
119
|
+
|
120
|
+
def self.headless
|
121
|
+
@headless
|
122
|
+
end
|
123
|
+
|
115
124
|
def self.session_state=(session_state)
|
116
125
|
@session_state = session_state
|
117
126
|
end
|
@@ -18,6 +18,7 @@ module TestCentricity
|
|
18
18
|
Environ.driver = :webdriver
|
19
19
|
Environ.platform = :desktop
|
20
20
|
Environ.browser = browser
|
21
|
+
Environ.headless = false
|
21
22
|
Environ.device = :web
|
22
23
|
Environ.device_name = 'browser'
|
23
24
|
|
@@ -116,6 +117,8 @@ module TestCentricity
|
|
116
117
|
end
|
117
118
|
@webdriver_path = File.join(project_path, base_path, path_to_driver)
|
118
119
|
Selenium::WebDriver::Firefox.driver_path = @webdriver_path
|
120
|
+
else
|
121
|
+
raise "#{ENV['HOST_BROWSER']} is not a valid host browser for mobile browser emulation"
|
119
122
|
end
|
120
123
|
end
|
121
124
|
end
|
@@ -226,8 +229,11 @@ module TestCentricity
|
|
226
229
|
browser = ENV['WEB_BROWSER'].downcase.to_sym
|
227
230
|
|
228
231
|
case browser
|
229
|
-
when :firefox, :chrome, :ie, :safari, :edge, :
|
232
|
+
when :firefox, :chrome, :ie, :safari, :edge, :firefox_legacy
|
233
|
+
Environ.platform = :desktop
|
234
|
+
when :chrome_headless, :firefox_headless
|
230
235
|
Environ.platform = :desktop
|
236
|
+
Environ.headless = true
|
231
237
|
else
|
232
238
|
Environ.platform = :mobile
|
233
239
|
Environ.device_name = Browsers.mobile_device_name(ENV['WEB_BROWSER'])
|
@@ -255,17 +261,15 @@ module TestCentricity
|
|
255
261
|
Capybara::Selenium::Driver.new(app, browser: :firefox, options: options, driver_path: @webdriver_path)
|
256
262
|
end
|
257
263
|
when :chrome, :chrome_headless
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
options = Selenium::WebDriver::Chrome::Options.new(args: %w[headless disable-gpu no-sandbox])
|
262
|
-
end
|
264
|
+
(browser == :chrome) ?
|
265
|
+
options = Selenium::WebDriver::Chrome::Options.new :
|
266
|
+
options = Selenium::WebDriver::Chrome::Options.new(args: %w[headless disable-gpu no-sandbox])
|
263
267
|
options.add_argument('--disable-infobars')
|
264
268
|
options.add_argument("--lang=#{ENV['LOCALE']}") if ENV['LOCALE']
|
265
269
|
Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
|
266
270
|
else
|
267
271
|
user_agent = Browsers.mobile_device_agent(ENV['WEB_BROWSER'])
|
268
|
-
ENV['HOST_BROWSER'] ? host_browser = ENV['HOST_BROWSER'].downcase.to_sym : host_browser = :
|
272
|
+
ENV['HOST_BROWSER'] ? host_browser = ENV['HOST_BROWSER'].downcase.to_sym : host_browser = :chrome
|
269
273
|
case host_browser
|
270
274
|
when :firefox
|
271
275
|
profile = Selenium::WebDriver::Firefox::Profile.new
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testcentricity_web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- A.J. Mrozinski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|