testcentricity_web 1.0.13 → 1.0.14
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 +3 -1
- data/lib/testcentricity_web/excel_helper.rb +10 -10
- data/lib/testcentricity_web/ui_elements_helper.rb +13 -13
- data/lib/testcentricity_web/version.rb +1 -1
- data/lib/testcentricity_web/webdriver_helper.rb +23 -1
- data/testcentricity_web.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27491e3ecff374590c34186d09a5699fcd0eed24
|
4
|
+
data.tar.gz: 032b2dba794fd386c335cbc3b446054fe8ffd680
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 389883aafd94e795e83c36846be8a2916e6938db633539f571254b4ec5ef54dec8bf30d8e41d6ddcc425c5a0930da7263e453dc7f29e833f2500480dc4d5970b
|
7
|
+
data.tar.gz: 59401a9f0c32cf77e394453707afb795678b5dbd2caa8613f556bffb48f68d0cb535f49905a87cf7ed70fa1f30eba1665ef4f39e3443c15aa026303f432aa1e2
|
data/README.md
CHANGED
@@ -753,7 +753,9 @@ in your `cucumber.yml` file.
|
|
753
753
|
|
754
754
|
Below is a list of Cucumber **Profiles** for supported locally and remotely hosted desktop and mobile web browsers (put these in in your
|
755
755
|
`cucumber.yml` file). Before you can use the BrowserStack, CrossBrowserTesting, Sauce Labs, or TestingBot services, you will need to
|
756
|
-
replace the placeholder text with your user account and authorization code for the cloud
|
756
|
+
replace the *INSERT USER NAME HERE* and *INSERT PASSWORD HERE* placeholder text with your user account and authorization code for the cloud
|
757
|
+
service(s) that you intend to connect with.
|
758
|
+
|
757
759
|
|
758
760
|
<% desktop = "--tags ~@wip --tags ~@failing --tags @desktop --require features BROWSER_SIZE=1600,1000" %>
|
759
761
|
<% mobile = "--tags ~@wip --tags ~@failing --tags @mobile --require features" %>
|
@@ -223,16 +223,16 @@ module TestCentricity
|
|
223
223
|
test_value = value.split('!', 2)
|
224
224
|
parameter = test_value[1].split('.', 2)
|
225
225
|
case parameter[0]
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
226
|
+
when 'Address', 'Bitcoin', 'Business', 'Code', 'Color', 'Commerce', 'Company', 'Crypto', 'File', 'Hacker', 'Hipster', 'Internet', 'Lorem', 'Name', 'Number', 'PhoneNumber'
|
227
|
+
result = eval("Faker::#{parameter[0]}.#{parameter[1]}")
|
228
|
+
when 'Date'
|
229
|
+
result = eval("Chronic.parse('#{parameter[1]}')")
|
230
|
+
when 'FormattedDate', 'FormatDate'
|
231
|
+
date_time_params = parameter[1].split(" format! ", 2)
|
232
|
+
date_time = eval("Chronic.parse('#{date_time_params[0].strip}')")
|
233
|
+
result = date_time.to_s.format_date_time("#{date_time_params[1].strip}")
|
234
|
+
else
|
235
|
+
result = eval(test_value[1])
|
236
236
|
end
|
237
237
|
result.to_s
|
238
238
|
end
|
@@ -352,36 +352,36 @@ module TestCentricity
|
|
352
352
|
end
|
353
353
|
|
354
354
|
def find_object(visible = true)
|
355
|
-
@alt_locator.nil? ?
|
355
|
+
@alt_locator.nil? ? obj_locator = @locator : obj_locator = @alt_locator
|
356
356
|
tries ||= 6
|
357
|
-
attributes = [:id,
|
357
|
+
attributes = [:id, 'ignore_parent_xpath', 'ignore_parent_css', 'xpath_css', 'css_xpath', :xpath, :css]
|
358
358
|
type = attributes[tries]
|
359
359
|
if @context == :section && !@parent.get_locator.nil?
|
360
360
|
parent_locator = @parent.get_locator
|
361
361
|
case type
|
362
362
|
when :css
|
363
363
|
parent_locator = parent_locator.gsub('|', ' ')
|
364
|
-
obj = page.find(:css, parent_locator, :wait => 0.01).find(:css,
|
364
|
+
obj = page.find(:css, parent_locator, :wait => 0.01).find(:css, obj_locator, :wait => 0.01, :visible => visible)
|
365
365
|
when :xpath
|
366
366
|
parent_locator = parent_locator.gsub('|', '')
|
367
|
-
obj = page.find(:xpath, "#{parent_locator}#{
|
368
|
-
when
|
367
|
+
obj = page.find(:xpath, "#{parent_locator}#{obj_locator}", :wait => 0.01, :visible => visible)
|
368
|
+
when 'css_xpath'
|
369
369
|
type = :xpath
|
370
370
|
parent_locator = parent_locator.gsub('|', ' ')
|
371
|
-
obj = page.find(:css, parent_locator, :wait => 0.01).find(:xpath,
|
372
|
-
when
|
371
|
+
obj = page.find(:css, parent_locator, :wait => 0.01).find(:xpath, obj_locator, :wait => 0.01, :visible => visible)
|
372
|
+
when 'xpath_css'
|
373
373
|
type = :css
|
374
374
|
parent_locator = parent_locator.gsub('|', ' ')
|
375
|
-
obj = page.find(:xpath, parent_locator, :wait => 0.01).find(:css,
|
376
|
-
when
|
375
|
+
obj = page.find(:xpath, parent_locator, :wait => 0.01).find(:css, obj_locator, :wait => 0.01, :visible => visible)
|
376
|
+
when 'ignore_parent_css'
|
377
377
|
type = :css
|
378
|
-
obj = page.find(:css,
|
379
|
-
when
|
378
|
+
obj = page.find(:css, obj_locator, :wait => 0.01, :visible => visible)
|
379
|
+
when 'ignore_parent_xpath'
|
380
380
|
type = :xpath
|
381
|
-
obj = page.find(:xpath,
|
381
|
+
obj = page.find(:xpath, obj_locator, :wait => 0.01, :visible => visible)
|
382
382
|
end
|
383
383
|
else
|
384
|
-
obj = page.find(type,
|
384
|
+
obj = page.find(type, obj_locator, :wait => 0.01, :visible => visible)
|
385
385
|
end
|
386
386
|
[obj, type]
|
387
387
|
rescue
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'selenium-webdriver'
|
2
|
+
require 'os'
|
2
3
|
|
3
4
|
|
4
5
|
module TestCentricity
|
@@ -35,7 +36,7 @@ module TestCentricity
|
|
35
36
|
initialize_testingbot
|
36
37
|
context = 'TestingBot cloud service'
|
37
38
|
else
|
38
|
-
if ENV[
|
39
|
+
if ENV['SELENIUM'] == 'remote'
|
39
40
|
initialize_remote
|
40
41
|
context = 'Selenium Grid2'
|
41
42
|
else
|
@@ -56,6 +57,27 @@ module TestCentricity
|
|
56
57
|
Capybara.app_host = url
|
57
58
|
end
|
58
59
|
|
60
|
+
# Set the WebDriver path for Chrome, IE, or Edge browsers
|
61
|
+
def self.set_webdriver_path(project_path)
|
62
|
+
path_to_driver = nil
|
63
|
+
case ENV['WEB_BROWSER'].downcase.to_sym
|
64
|
+
when :chrome
|
65
|
+
if OS.osx?
|
66
|
+
path_to_driver = 'features/support/drivers/mac/chromedriver'
|
67
|
+
elsif OS.windows?
|
68
|
+
path_to_driver = 'features/support/drivers/windows/chromedriver.exe'
|
69
|
+
end
|
70
|
+
Selenium::WebDriver::Chrome.driver_path = File.join(project_path, path_to_driver)
|
71
|
+
when :ie
|
72
|
+
path_to_driver = 'features/support/drivers/windows/IEDriverServer.exe'
|
73
|
+
Selenium::WebDriver::IE.driver_path = File.join(project_path, path_to_driver)
|
74
|
+
when :edge
|
75
|
+
path_to_driver = 'features/support/drivers/windows/MicrosoftWebDriver.exe'
|
76
|
+
Selenium::WebDriver::Edge.driver_path = File.join(project_path, path_to_driver)
|
77
|
+
end
|
78
|
+
puts "The webdriver path is: #{path_to_driver}" unless path_to_driver.nil?
|
79
|
+
end
|
80
|
+
|
59
81
|
private
|
60
82
|
|
61
83
|
def self.initialize_appium
|
data/testcentricity_web.gemspec
CHANGED
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: 1.0.
|
4
|
+
version: 1.0.14
|
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: 2016-10-
|
11
|
+
date: 2016-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -148,6 +148,20 @@ dependencies:
|
|
148
148
|
- - '='
|
149
149
|
- !ruby/object:Gem::Version
|
150
150
|
version: 1.1.1
|
151
|
+
- !ruby/object:Gem::Dependency
|
152
|
+
name: os
|
153
|
+
requirement: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - ">="
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
type: :runtime
|
159
|
+
prerelease: false
|
160
|
+
version_requirements: !ruby/object:Gem::Requirement
|
161
|
+
requirements:
|
162
|
+
- - ">="
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '0'
|
151
165
|
description: |2-
|
152
166
|
|
153
167
|
TestCentricity™ Web core generic framework for desktop and mobile web site testing implements a Page Object Model DSL
|