testcentricity_web 4.2.6 → 4.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6bba95ce17cd2e367f22261389fbe57cf7599ad7c8b376d293713929363dc7b2
4
- data.tar.gz: e0e50d77d9e41d22652d6345820ef4258c31ff8e0ec63171fcfd6bba4bf8da17
3
+ metadata.gz: e1f34273e6126cc792065a37bdb761e8ca0f0c597e9030b3f9f58f2846a8d5c2
4
+ data.tar.gz: 43a3dbfb5c94a0ff10b161e01d4087c3973ed11b61596363b455e1f82897c403
5
5
  SHA512:
6
- metadata.gz: ab4055f869598ce042c6b62172b8a89e9632268593dfcfec4cf4c7b401cfd66c3dfbfdd177f046aa429f80f575dd88558be187447cfcecd7ab2a32fa355cff78
7
- data.tar.gz: 3c0581ac5599a71203eeb592f919de7a539ebb0855a2e3dd72cf9de2ae9a4ca69ecb7bf7b408a1540a432c1358337803ddc84eaf8d1827d6033904aa35f9e542
6
+ metadata.gz: 12b80dbd95dc924ca9b51b0ac5d7876f55642e8824b5f38e0fd19f008487a23f3a4d24418712785d93e93d1f330fbeaa03e7754c2fc8a3a9967d931cf47aab0b
7
+ data.tar.gz: a1bdb14f26c27829e71f0fb96c2ccb7183e5058dca09e46b0a515595611680ca6692f6c1a52f3c38cf60ba59c04f3ce720b29f8cd50be507a40119a13298d308
data/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
4
 
5
+ ## [4.3.0] - 01-AUGUST-2022
6
+
7
+ ### Added
8
+ * The `DRIVER` Environment Variable is now used to specify the `appium`, `browserstack`, `saucelabs`, `testingbot`,
9
+ or `lambdatest` driver.
10
+
11
+ * ### Changed
12
+ * The `WEB_BROWSER` Environment Variable is no longer used to specify the `appium`, `browserstack`, `saucelabs`, `testingbot`,
13
+ or `lambdatest` driver.
14
+ * TestCentricity now supports and integrates with Selenium-Webdriver version 4.3.
15
+
16
+
5
17
  ## [4.2.6] - 12-JUNE-2022
6
18
 
7
19
  ### Fixed
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
  The TestCentricity™ Web core framework for desktop and mobile web browser-based app testing implements a Page Object Model DSL for use
8
- with Cucumber (version 7.x or greater), Capybara (version 3.x), and Selenium-Webdriver (version 4.x). It also facilitates the configuration of the appropriate
8
+ with Cucumber (version 7.x or greater), Capybara (version 3.37), and Selenium-Webdriver (version 4.3). It also facilitates the configuration of the appropriate
9
9
  Selenium-Webdriver capabilities required to establish a connection with a local or cloud hosted desktop or mobile web browser.
10
10
 
11
11
  The TestCentricity™ Web gem supports running automated tests against the following web test targets:
@@ -1383,7 +1383,7 @@ Once your test environment is properly configured, the following **Environment V
1383
1383
 
1384
1384
  | **Environment Variable** | **Description** |
1385
1385
  |----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
1386
- | `WEB_BROWSER` | Must be set to `appium` |
1386
+ | `DRIVER` | Must be set to `appium` |
1387
1387
  | `APP_PLATFORM_NAME` | Must be set to `iOS` |
1388
1388
  | `APP_BROWSER` | Must be set to `Safari` |
1389
1389
  | `APP_VERSION` | Must be set to `15.4`, `14.5`, or which ever iOS version you wish to run within the XCode Simulator |
@@ -1426,7 +1426,7 @@ Once your test environment is properly configured, the following **Environment V
1426
1426
 
1427
1427
  | **Environment Variable** | **Description** |
1428
1428
  |---------------------------|--------------------------------------------------------------------------------------------------------------------------------|
1429
- | `WEB_BROWSER` | Must be set to `appium` |
1429
+ | `DRIVER` | Must be set to `appium` |
1430
1430
  | `APP_PLATFORM_NAME` | Must be set to `Android` |
1431
1431
  | `APP_BROWSER` | Must be set to `Chrome` or `Browser` |
1432
1432
  | `APP_VERSION` | Must be set to `12.0`, or which ever Android OS version you wish to run with the Android Virtual Device |
@@ -1499,7 +1499,7 @@ for information regarding the specific capabilities.
1499
1499
 
1500
1500
  | **Environment Variable** | **Description** |
1501
1501
  |--------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
1502
- | `WEB_BROWSER` | Must be set to `browserstack` |
1502
+ | `DRIVER` | Must be set to `browserstack` |
1503
1503
  | `BS_USERNAME` | Must be set to your BrowserStack account user name |
1504
1504
  | `BS_AUTHKEY` | Must be set to your BrowserStack account access key |
1505
1505
  | `BS_OS` | Must be set to `OS X` or `Windows` |
@@ -1533,7 +1533,7 @@ for information regarding the specific capabilities.
1533
1533
 
1534
1534
  | **Environment Variable** | **Description** |
1535
1535
  |--------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
1536
- | `WEB_BROWSER` | Must be set to `browserstack` |
1536
+ | `DRIVER` | Must be set to `browserstack` |
1537
1537
  | `BS_USERNAME` | Must be set to your BrowserStack account user name |
1538
1538
  | `BS_AUTHKEY` | Must be set to your BrowserStack account access key |
1539
1539
  | `BS_OS` | Must be set to `ios` or `android` |
@@ -1559,7 +1559,7 @@ to obtain information regarding the specific capabilities.
1559
1559
 
1560
1560
  | **Environment Variable** | **Description** |
1561
1561
  |--------------------------|----------------------------------------------------------------------------------------------------------------------------|
1562
- | `WEB_BROWSER` | Must be set to `saucelabs` |
1562
+ | `DRIVER` | Must be set to `saucelabs` |
1563
1563
  | `SL_USERNAME` | Must be set to your Sauce Labs account user name or email address |
1564
1564
  | `SL_AUTHKEY` | Must be set to your Sauce Labs account access key |
1565
1565
  | `DATA_CENTER` | Must be set to your Sauce Labs account Data Center assignment (`us-west-1`, `eu-central-1`, `apac-southeast-1`) |
@@ -1579,7 +1579,7 @@ regarding the specific capabilities.
1579
1579
 
1580
1580
  | **Environment Variable** | **Description** |
1581
1581
  |--------------------------|-------------------------------------------------------------------------------------------------------------------|
1582
- | `WEB_BROWSER` | Must be set to `testingbot` |
1582
+ | `DRIVER` | Must be set to `testingbot` |
1583
1583
  | `TB_USERNAME` | Must be set to your TestingBot account user name |
1584
1584
  | `TB_AUTHKEY` | Must be set to your TestingBot account access key |
1585
1585
  | `TB_OS` | Refer to `platform` capability in chart |
@@ -1598,7 +1598,7 @@ to obtain information regarding the specific capabilities.
1598
1598
 
1599
1599
  | **Environment Variable** | **Description** |
1600
1600
  |--------------------------|------------------------------------------------------------------------------------------|
1601
- | `WEB_BROWSER` | Must be set to `lambdatest` |
1601
+ | `DRIVER` | Must be set to `lambdatest` |
1602
1602
  | `LT_USERNAME` | Must be set to your LambdaTest account user name or email address |
1603
1603
  | `LT_AUTHKEY` | Must be set to your LambdaTest account access key |
1604
1604
  | `LT_OS` | Refer to `platformName` capability in the sample script of the Wizard |
@@ -1724,7 +1724,7 @@ that you intend to connect with.
1724
1724
  # NOTE: Requires installation of XCode, iOS version specific target simulators, Appium, and the appium_capybara gem
1725
1725
  #==============
1726
1726
 
1727
- appium_ios: WEB_BROWSER=appium AUTOMATION_ENGINE=XCUITest APP_PLATFORM_NAME="ios" APP_BROWSER="Safari" NEW_COMMAND_TIMEOUT=30 SHOW_SIM_KEYBOARD=false
1727
+ appium_ios: DRIVER=appium AUTOMATION_ENGINE=XCUITest APP_PLATFORM_NAME="ios" APP_BROWSER="Safari" NEW_COMMAND_TIMEOUT=30 SHOW_SIM_KEYBOARD=false
1728
1728
  app_ios_15: --profile appium_ios APP_VERSION="15.4"
1729
1729
  ipad_pro_12_15_sim: --profile app_ios_15 DEVICE_TYPE=tablet APP_DEVICE="iPad Pro (12.9-inch) (5th generation)"
1730
1730
  ipad_air_15_sim: --profile app_ios_15 DEVICE_TYPE=tablet APP_DEVICE="iPad Air (5th generation)" <%= desktop %>
@@ -1745,7 +1745,7 @@ that you intend to connect with.
1745
1745
  # NOTE: Requires installation of Android Studio, Android version specific virtual device simulators, Appium, and the appium_capybara gem
1746
1746
  #==============
1747
1747
 
1748
- appium_android: WEB_BROWSER=appium APP_PLATFORM_NAME="Android" <%= mobile %>
1748
+ appium_android: DRIVER=appium APP_PLATFORM_NAME="Android" <%= mobile %>
1749
1749
  app_android_12: --profile appium_android APP_BROWSER="Chrome" APP_VERSION="12.0"
1750
1750
  pixel_c_api31_sim: --profile app_android_12 DEVICE_TYPE=tablet APP_DEVICE="Pixel_C_API_31"
1751
1751
 
@@ -1756,7 +1756,7 @@ that you intend to connect with.
1756
1756
  # to your version control system
1757
1757
  #==============
1758
1758
 
1759
- browserstack: WEB_BROWSER=browserstack BS_USERNAME="<INSERT USER NAME HERE>" BS_AUTHKEY="<INSERT PASSWORD HERE>"
1759
+ browserstack: DRIVER=browserstack BS_USERNAME="<INSERT USER NAME HERE>" BS_AUTHKEY="<INSERT PASSWORD HERE>"
1760
1760
  bs_desktop: --profile browserstack <%= desktop %> RESOLUTION="1920x1080"
1761
1761
  bs_mobile: --profile browserstack <%= mobile %>
1762
1762
 
@@ -1788,7 +1788,7 @@ that you intend to connect with.
1788
1788
  # to your version control system
1789
1789
  #==============
1790
1790
 
1791
- saucelabs: WEB_BROWSER=saucelabs SL_USERNAME="<INSERT USER NAME HERE>" SL_AUTHKEY="<INSERT PASSWORD HERE>" DATA_CENTER="<INSERT DATA CENTER HERE"
1791
+ saucelabs: DRIVER=saucelabs SL_USERNAME="<INSERT USER NAME HERE>" SL_AUTHKEY="<INSERT PASSWORD HERE>" DATA_CENTER="<INSERT DATA CENTER HERE"
1792
1792
  sl_desktop: --profile saucelabs <%= desktop %>
1793
1793
  sl_mobile: --profile saucelabs <%= mobile %>
1794
1794
 
@@ -1814,7 +1814,7 @@ that you intend to connect with.
1814
1814
  # to your version control system
1815
1815
  #==============
1816
1816
 
1817
- testingbot: WEB_BROWSER=testingbot TB_USERNAME="<INSERT USER NAME HERE>" TB_AUTHKEY="<INSERT PASSWORD HERE>"
1817
+ testingbot: DRIVER=testingbot TB_USERNAME="<INSERT USER NAME HERE>" TB_AUTHKEY="<INSERT PASSWORD HERE>"
1818
1818
  tb_desktop: --profile testingbot <%= desktop %> RESOLUTION="1920x1200"
1819
1819
 
1820
1820
  # TestingBot macOS desktop browser profiles
@@ -1835,7 +1835,7 @@ that you intend to connect with.
1835
1835
  # to your version control system
1836
1836
  #==============
1837
1837
 
1838
- lambdatest: WEB_BROWSER=lambdatest LT_USERNAME=<INSERT USER NAME HERE> LT_AUTHKEY=<INSERT PASSWORD HERE>
1838
+ lambdatest: DRIVER=lambdatest LT_USERNAME=<INSERT USER NAME HERE> LT_AUTHKEY=<INSERT PASSWORD HERE>
1839
1839
  lt_desktop: --profile lambdatest <%= desktop %> RESOLUTION="2560x1440"
1840
1840
 
1841
1841
  # LambdaTest macOS desktop browser profiles
@@ -173,7 +173,8 @@ module TestCentricity
173
173
  @devices = @devices.merge(ext_devices)
174
174
  end
175
175
  end
176
- @devices[device.gsub(/\s+/, '').downcase.to_sym]
176
+ device = device.gsub(/\s+/, '').downcase.to_sym if device.is_a?(String)
177
+ @devices[device]
177
178
  end
178
179
  end
179
180
  end
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '4.2.6'
2
+ VERSION = '4.3.0'
3
3
  end
@@ -24,8 +24,13 @@ module TestCentricity
24
24
  @endpoint = options[:endpoint] if options.key?(:endpoint)
25
25
  @capabilities = options[:desired_capabilities] if options.key?(:desired_capabilities)
26
26
  end
27
-
28
- browser = ENV['WEB_BROWSER']
27
+ # determine browser type and driver
28
+ Environ.browser = ENV['WEB_BROWSER'] if ENV['WEB_BROWSER']
29
+ Environ.driver = if ENV['DRIVER']
30
+ ENV['DRIVER'].downcase.to_sym
31
+ else
32
+ :webdriver
33
+ end
29
34
  # set downloads folder path
30
35
  @downloads_path = "#{Dir.pwd}/downloads"
31
36
  if ENV['PARALLEL']
@@ -43,18 +48,16 @@ module TestCentricity
43
48
  @downloads_path = @downloads_path.tr('/', "\\") if OS.windows?
44
49
 
45
50
  # assume that we're testing within a local desktop web browser
46
- Environ.driver = :webdriver
47
51
  Environ.platform = :desktop
48
- Environ.browser = browser
49
52
  Environ.headless = false
50
53
  Environ.device = :web
51
54
  Environ.device_name = 'browser'
52
55
 
53
- context = case browser.downcase.to_sym
56
+ context = case Environ.driver
54
57
  when :appium
55
58
  initialize_appium
56
59
  'Appium'
57
- # :nocov:
60
+ # :nocov:
58
61
  when :browserstack
59
62
  initialize_browserstack
60
63
  'Browserstack cloud service'
@@ -67,8 +70,7 @@ module TestCentricity
67
70
  when :testingbot
68
71
  initialize_testingbot
69
72
  'TestingBot cloud service'
70
- # :nocov:
71
- else
73
+ when :webdriver
72
74
  if ENV['SELENIUM'] == 'remote'
73
75
  initialize_remote
74
76
  'Selenium Grid'
@@ -142,6 +144,7 @@ module TestCentricity
142
144
  def self.initialize_appium
143
145
  Environ.platform = :mobile
144
146
  Environ.device = :simulator
147
+ Environ.browser = ENV['APP_BROWSER']
145
148
  Environ.device_name = ENV['APP_DEVICE']
146
149
  Environ.device_os = ENV['APP_PLATFORM_NAME'].downcase.to_sym
147
150
  Environ.device_type = ENV['DEVICE_TYPE'] if ENV['DEVICE_TYPE']
@@ -154,7 +157,7 @@ module TestCentricity
154
157
  desired_capabilities = {
155
158
  platformName: Environ.device_os,
156
159
  platformVersion: Environ.device_os_version,
157
- browserName: ENV['APP_BROWSER'],
160
+ browserName: Environ.browser,
158
161
  deviceName: Environ.device_name
159
162
  }
160
163
  desired_capabilities[:avd] = ENV['APP_DEVICE'] if Environ.device_os == :android
@@ -231,7 +234,7 @@ module TestCentricity
231
234
  else
232
235
  'unknown'
233
236
  end
234
- browser = ENV['WEB_BROWSER'].downcase.to_sym
237
+ browser = Environ.browser.downcase.to_sym
235
238
 
236
239
  case browser
237
240
  when :firefox, :chrome, :ie, :safari, :edge
@@ -241,7 +244,7 @@ module TestCentricity
241
244
  Environ.headless = true
242
245
  else
243
246
  Environ.platform = :mobile
244
- Environ.device_name = Browsers.mobile_device_name(ENV['WEB_BROWSER'])
247
+ Environ.device_name = Browsers.mobile_device_name(Environ.browser)
245
248
  end
246
249
 
247
250
  Capybara.register_driver :selenium do |app|
@@ -259,8 +262,8 @@ module TestCentricity
259
262
  Capybara::Selenium::Driver.new(app, browser: :edge, capabilities: [options])
260
263
  else
261
264
  if ENV['HOST_BROWSER'] && ENV['HOST_BROWSER'].downcase.to_sym == :chrome
262
- user_agent = Browsers.mobile_device_agent(ENV['WEB_BROWSER'])
263
- options = Selenium::WebDriver::Chrome::Options.new(options: {'excludeSwitches' => ['enable-automation']})
265
+ user_agent = Browsers.mobile_device_agent(Environ.browser)
266
+ options = Selenium::WebDriver::Chrome::Options.new
264
267
  options.add_argument('--disable-dev-shm-usage')
265
268
  options.add_argument("--user-agent='#{user_agent}'")
266
269
  options.add_argument("--lang=#{ENV['LOCALE']}") if ENV['LOCALE']
@@ -275,7 +278,7 @@ module TestCentricity
275
278
 
276
279
  def self.initialize_remote
277
280
  Environ.grid = :selenium_grid
278
- browser = ENV['WEB_BROWSER'].downcase.to_sym
281
+ browser = Environ.browser.downcase.to_sym
279
282
  @endpoint = ENV['REMOTE_ENDPOINT'] || 'http://127.0.0.1:4444/wd/hub' if @endpoint.nil?
280
283
 
281
284
  case browser
@@ -290,9 +293,9 @@ module TestCentricity
290
293
  else
291
294
  if ENV['HOST_BROWSER'] && ENV['HOST_BROWSER'].downcase.to_sym == :chrome
292
295
  Environ.platform = :mobile
293
- Environ.device_name = Browsers.mobile_device_name(ENV['WEB_BROWSER'])
294
- user_agent = Browsers.mobile_device_agent(ENV['WEB_BROWSER'])
295
- options = Selenium::WebDriver::Chrome::Options.new(options: {'excludeSwitches' => ['enable-automation']})
296
+ Environ.device_name = Browsers.mobile_device_name(Environ.browser)
297
+ user_agent = Browsers.mobile_device_agent(Environ.browser)
298
+ options = Selenium::WebDriver::Chrome::Options.new
296
299
  options.add_argument('--disable-dev-shm-usage')
297
300
  options.add_argument("--user-agent='#{user_agent}'")
298
301
  options.add_argument("--lang=#{ENV['LOCALE']}") if ENV['LOCALE']
@@ -396,7 +399,7 @@ module TestCentricity
396
399
  else
397
400
  # define desktop browser options
398
401
  bs_options[:resolution] = ENV['RESOLUTION'] if ENV['RESOLUTION']
399
- bs_options[:seleniumVersion] = '4.1.0'
402
+ bs_options[:seleniumVersion] = '4.3.0'
400
403
  {
401
404
  browserName: browser,
402
405
  browserVersion: ENV['BS_VERSION'],
@@ -578,9 +581,9 @@ module TestCentricity
578
581
  def self.chrome_edge_options(browser)
579
582
  options = case browser
580
583
  when :chrome, :chrome_headless
581
- Selenium::WebDriver::Chrome::Options.new(options: {'excludeSwitches' => ['enable-automation']})
584
+ Selenium::WebDriver::Chrome::Options.new
582
585
  when :edge, :edge_headless
583
- Selenium::WebDriver::Edge::Options.new(options: {'excludeSwitches' => ['enable-automation']})
586
+ Selenium::WebDriver::Edge::Options.new
584
587
  end
585
588
  prefs = {
586
589
  prompt_for_download: false,
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: 4.2.6
4
+ version: 4.3.0
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: 2022-06-12 00:00:00.000000000 Z
11
+ date: 2022-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appium_capybara
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: cucumber
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 8.0.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: 8.0.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: cuke_modeler
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -140,16 +140,16 @@ dependencies:
140
140
  name: rspec
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - "~>"
143
+ - - ">="
144
144
  - !ruby/object:Gem::Version
145
- version: '3.10'
145
+ version: 3.11.0
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - "~>"
150
+ - - ">="
151
151
  - !ruby/object:Gem::Version
152
- version: '3.10'
152
+ version: 3.11.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: simplecov
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -212,7 +212,7 @@ dependencies:
212
212
  requirements:
213
213
  - - ">="
214
214
  - !ruby/object:Gem::Version
215
- version: '3.1'
215
+ version: 3.37.1
216
216
  - - "<"
217
217
  - !ruby/object:Gem::Version
218
218
  version: '4'
@@ -222,7 +222,7 @@ dependencies:
222
222
  requirements:
223
223
  - - ">="
224
224
  - !ruby/object:Gem::Version
225
- version: '3.1'
225
+ version: 3.37.1
226
226
  - - "<"
227
227
  - !ruby/object:Gem::Version
228
228
  version: '4'
@@ -302,7 +302,7 @@ dependencies:
302
302
  requirements:
303
303
  - - ">="
304
304
  - !ruby/object:Gem::Version
305
- version: '4.0'
305
+ version: 4.3.0
306
306
  - - "<"
307
307
  - !ruby/object:Gem::Version
308
308
  version: '5'
@@ -312,7 +312,7 @@ dependencies:
312
312
  requirements:
313
313
  - - ">="
314
314
  - !ruby/object:Gem::Version
315
- version: '4.0'
315
+ version: 4.3.0
316
316
  - - "<"
317
317
  - !ruby/object:Gem::Version
318
318
  version: '5'