testcentricity_web 3.1.8 → 3.1.9

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
  SHA1:
3
- metadata.gz: 0ee5ffc5b5c66d609117bd4b61b894eec784dbdf
4
- data.tar.gz: 4a169b25e059859ad4b7a2f3d8bc420f3d990cab
3
+ metadata.gz: 6aaf36f1eeebe5cb14a2a80a9fb385f4f3668d1d
4
+ data.tar.gz: a32eea8159a97c53484728c58685cd2b3e5b9b80
5
5
  SHA512:
6
- metadata.gz: 45237a60fcae4bd870fd2e69273acde68a34d98eba1adef24078c3e829027f029f3204ed27808027657a1f32e6df752c73c46973d94c356de79816c4a4f9df14
7
- data.tar.gz: ebd3a02cdb35c91ed5b7c4e8e2ee47c6b688f4a8f4eb9d18100017ec143ec76c504a6efb77c779adeafb1099d434a77b35dc1e506097ea5b47bd41efbd816e5f
6
+ metadata.gz: c1d533c1ad90b285c878e00a2b56fdd2eee003c66c15df0dc99759d1617c8a54e15419958a459766233dc121765dc792032da55b865c0243ed9aa501bc12445d
7
+ data.tar.gz: 387dcd78f17bfa7a8f7af88b20927cd9ad6939684c63b837a6dff0e57ba53e0a47545523927a1982a020038cc1ecb084dd2f8c889f678f6dc396d35b4f9ec6ff
data/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
4
 
5
+ ## [3.1.9] - 2019-05-16
6
+
7
+ ### Added
8
+ * Added support for enabling popups when testing on BrowserStack cloud hosted Safari, IE, and Edge browsers.
9
+ * Added support for enabling all cookies when testing on BrowserStack cloud hosted Safari browsers.
10
+
11
+ ### Changed
12
+ * `List.get_list_items` and `List.get_list_item` methods now strip leading and trailing whitespace from returned values.
13
+
5
14
  ## [3.1.8] - 2019-05-08
6
15
 
7
16
  ### Added
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- testcentricity_web (3.1.8)
4
+ testcentricity_web (3.1.8.1)
5
5
  appium_lib
6
6
  browserstack-local
7
7
  capybara (>= 3.1, < 4)
data/README.md CHANGED
@@ -932,6 +932,8 @@ for information regarding the specific capabilities.
932
932
  `SELENIUM_VERSION` | [Optional] Specify Selenium WebDriver version to use
933
933
  `CONSOLE_LOGS` | [Optional] Used to capture browser console logs. Refer to `browserstack.console` capability in chart
934
934
  `WD_VERSION` | [Optional] Specify browser-specific WebDriver version to use. Refer to `browserstack.geckodriver`, `browserstack.ie.driver`, and `browserstack.safari.driver` capabilities in chart
935
+ `ALLOW_POPUPS` | [Optional] Allow popups (`true` or `false`) - for Safari, IE, and Edge browsers only
936
+ `ALLOW_COOKIES` | [Optional] Allow all cookies (`true` or `false`) - for Safari browsers only
935
937
 
936
938
  If the BrowserStack Local instance is running (`TUNNELING` Environment Variable is `true`), call the`TestCentricity::WebDriverConnect.close_tunnel` method
937
939
  upon completion of your test suite to stop the Local instance. Place the code shown below in your `env.rb` file.
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '3.1.8'
2
+ VERSION = '3.1.9'
3
3
  end
@@ -302,17 +302,27 @@ module TestCentricity
302
302
  capabilities['browserstack.local'] = 'true' if ENV['TUNNELING']
303
303
 
304
304
  case browser.downcase.to_sym
305
- when :ie, :edge
305
+ when :ie
306
+ capabilities['ie.fileUploadDialogTimeout'] = 10000
307
+ capabilities['ie.ensureCleanSession'] = 'true'
308
+ capabilities['ie.browserCommandLineSwitches'] = 'true'
309
+ capabilities['nativeEvents'] = 'true'
310
+ capabilities['browserstack.ie.driver'] = ENV['WD_VERSION'] if ENV['WD_VERSION']
311
+ capabilities['browserstack.ie.enablePopups'] = ENV['ALLOW_POPUPS'] if ENV['ALLOW_POPUPS']
312
+ when :edge
306
313
  capabilities['ie.fileUploadDialogTimeout'] = 10000
307
314
  capabilities['ie.ensureCleanSession'] = 'true'
308
315
  capabilities['ie.browserCommandLineSwitches'] = 'true'
309
316
  capabilities['nativeEvents'] = 'true'
310
317
  capabilities['browserstack.ie.driver'] = ENV['WD_VERSION'] if ENV['WD_VERSION']
318
+ capabilities['browserstack.edge.enablePopups'] = ENV['ALLOW_POPUPS'] if ENV['ALLOW_POPUPS']
311
319
  when :firefox
312
320
  capabilities['browserstack.geckodriver'] = ENV['WD_VERSION'] if ENV['WD_VERSION']
313
321
  when :safari
314
322
  capabilities['cleanSession'] = 'true'
315
323
  capabilities['browserstack.safari.driver'] = ENV['WD_VERSION'] if ENV['WD_VERSION']
324
+ capabilities['browserstack.safari.enablePopups'] = ENV['ALLOW_POPUPS'] if ENV['ALLOW_POPUPS']
325
+ capabilities['browserstack.safari.allowAllCookies'] = ENV['ALLOW_COOKIES'] if ENV['ALLOW_COOKIES']
316
326
  when :iphone, :ipad
317
327
  capabilities['javascriptEnabled'] = 'true'
318
328
  capabilities['cleanSession'] = 'true'
@@ -75,12 +75,21 @@ module TestCentricity
75
75
  define_list_elements(element_spec) unless element_spec.nil?
76
76
  obj, = find_element
77
77
  object_not_found_exception(obj, nil)
78
- obj.all(@list_item, visible: true, minimum: 0, wait: 2).collect(&:text)
78
+ items = obj.all(@list_item, visible: true, minimum: 0, wait: 2).collect(&:text)
79
+
80
+ items.map!{ |item| item.delete("\n") }
81
+ items.map!{ |item| item.delete("\r") }
82
+ items.map!{ |item| item.delete("\t") }
83
+ items.map!{ |item| item.strip }
79
84
  end
80
85
 
81
86
  def get_list_item(index, visible = true)
82
87
  items = visible ? get_list_items : get_all_list_items
83
- items[index - 1]
88
+ item = items[index - 1]
89
+ item.delete!("\n")
90
+ item.delete!("\r")
91
+ item.delete!("\t")
92
+ item.strip!
84
93
  end
85
94
 
86
95
  # Return the number of items in a list object.
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.1.8
4
+ version: 3.1.9
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: 2019-05-08 00:00:00.000000000 Z
11
+ date: 2019-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler