testcentricity_web 3.2.14 → 3.2.19
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/CHANGELOG.md +30 -0
- data/Gemfile.lock +14 -14
- data/README.md +19 -0
- data/lib/testcentricity_web/data_objects/environment.rb +19 -0
- data/lib/testcentricity_web/version.rb +1 -1
- data/lib/testcentricity_web/web_core/page_objects_helper.rb +5 -3
- data/lib/testcentricity_web/web_core/webdriver_helper.rb +45 -36
- data/lib/testcentricity_web/web_elements/select_list.rb +1 -1
- data/lib/testcentricity_web/web_elements/table.rb +77 -43
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 49bd540fc3640911174f5136c1121cafac4b9570caac7c2952933a8cae93416e
|
|
4
|
+
data.tar.gz: a55bec7ca5d41d7d450e1be084ed5001964faf628c9932d3eba589905bd38a29
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e2eec6f5ef186f695380ab0825e303e14f16192d20e0db1fb167efce006c4fed80611c211b672be98008718eb9be531f2b04399302497afc499baede6cebdbc4
|
|
7
|
+
data.tar.gz: 845b302672ac27209aa91ddf869fed432fc9fa4ccab63c5608fd6437eef25d67e194453fbddd24c9410978456bdebb4e3af0740308cbe9ebb29aecf9c69485a4
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
|
|
4
|
+
## [3.2.19] - 05-JAN-2021
|
|
5
|
+
|
|
6
|
+
### Fixed
|
|
7
|
+
* `SelectList.choose_option` and `SelectList.get_options` methods now wait up to 5 seconds for list drop menu to appear.
|
|
8
|
+
|
|
9
|
+
## [3.2.18] - 12-AUG-2020
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
* Updated `PageObject.verify_ui_states` and `PageSection.verify_ui_states` methods to correctly handle `:row`, `:column`,
|
|
13
|
+
`:cell`, `:item`, and `:attribute` properties.
|
|
14
|
+
|
|
15
|
+
## [3.2.17] - 19-JUNE-2020
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
* Updated `Table.define_table_elements` method to accept value for `:row_header` element.
|
|
19
|
+
* Updated `Table.get_row_count`, `Table.get_column_count`, and `Table.get_table_cell_locator` methods to support tables
|
|
20
|
+
with row headers in row #1.
|
|
21
|
+
|
|
22
|
+
## [3.2.16] - 13-MAY-2020
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
* `WebDriverConnect.initialize_web_driver` method now sets local Chrome and Firefox browser Download directory to separate
|
|
26
|
+
folders for each parallel test thread when using `parallel_tests` gem to run tests in concurrent threads.
|
|
27
|
+
|
|
28
|
+
## [3.2.15] - 06-APR-2020
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
* `PageObject.populate_data_fields` and `PageSection.populate_data_fields` methods accept `String` or `Boolean` values
|
|
32
|
+
for checkboxes and radio buttons.
|
|
33
|
+
|
|
4
34
|
## [3.2.14] - 06-APR-2020
|
|
5
35
|
|
|
6
36
|
### Added
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
testcentricity_web (3.2.
|
|
4
|
+
testcentricity_web (3.2.19)
|
|
5
5
|
appium_lib
|
|
6
6
|
browserstack-local
|
|
7
7
|
capybara (>= 3.1, < 4)
|
|
@@ -25,7 +25,7 @@ GEM
|
|
|
25
25
|
appium_lib_core (~> 3.3)
|
|
26
26
|
nokogiri (~> 1.8, >= 1.8.1)
|
|
27
27
|
tomlrb (~> 1.1)
|
|
28
|
-
appium_lib_core (3.
|
|
28
|
+
appium_lib_core (3.10.0)
|
|
29
29
|
faye-websocket (~> 0.10.0)
|
|
30
30
|
selenium-webdriver (~> 3.14, >= 3.14.1)
|
|
31
31
|
axiom-types (0.1.1)
|
|
@@ -33,7 +33,7 @@ GEM
|
|
|
33
33
|
ice_nine (~> 0.11.0)
|
|
34
34
|
thread_safe (~> 0.3, >= 0.3.1)
|
|
35
35
|
browserstack-local (1.3.0)
|
|
36
|
-
capybara (3.32.
|
|
36
|
+
capybara (3.32.2)
|
|
37
37
|
addressable
|
|
38
38
|
mini_mime (>= 0.1.3)
|
|
39
39
|
nokogiri (~> 1.8)
|
|
@@ -51,13 +51,13 @@ GEM
|
|
|
51
51
|
thread_safe (~> 0.3, >= 0.3.1)
|
|
52
52
|
equalizer (0.0.11)
|
|
53
53
|
eventmachine (1.2.7)
|
|
54
|
-
faker (2.
|
|
54
|
+
faker (2.12.0)
|
|
55
55
|
i18n (>= 1.6, < 2)
|
|
56
56
|
faye-websocket (0.10.9)
|
|
57
57
|
eventmachine (>= 0.12.0)
|
|
58
58
|
websocket-driver (>= 0.5.1)
|
|
59
|
-
ffi (1.
|
|
60
|
-
i18n (1.8.
|
|
59
|
+
ffi (1.13.1)
|
|
60
|
+
i18n (1.8.3)
|
|
61
61
|
concurrent-ruby (~> 1.0)
|
|
62
62
|
ice_nine (0.11.2)
|
|
63
63
|
mini_mime (1.0.2)
|
|
@@ -65,14 +65,14 @@ GEM
|
|
|
65
65
|
nokogiri (1.10.9)
|
|
66
66
|
mini_portile2 (~> 2.4.0)
|
|
67
67
|
os (1.1.0)
|
|
68
|
-
power_assert (1.
|
|
69
|
-
public_suffix (4.0.
|
|
70
|
-
rack (2.2.
|
|
68
|
+
power_assert (1.2.0)
|
|
69
|
+
public_suffix (4.0.5)
|
|
70
|
+
rack (2.2.3)
|
|
71
71
|
rack-test (1.1.0)
|
|
72
72
|
rack (>= 1.0, < 3)
|
|
73
73
|
rake (13.0.1)
|
|
74
74
|
redcarpet (3.5.0)
|
|
75
|
-
regexp_parser (1.7.
|
|
75
|
+
regexp_parser (1.7.1)
|
|
76
76
|
ruby-ole (1.2.12.2)
|
|
77
77
|
rubyzip (2.3.0)
|
|
78
78
|
selenium-webdriver (3.142.7)
|
|
@@ -80,7 +80,7 @@ GEM
|
|
|
80
80
|
rubyzip (>= 1.2.2)
|
|
81
81
|
spreadsheet (1.1.7)
|
|
82
82
|
ruby-ole (>= 1.0)
|
|
83
|
-
test-unit (3.3.
|
|
83
|
+
test-unit (3.3.6)
|
|
84
84
|
power_assert
|
|
85
85
|
thread_safe (0.3.6)
|
|
86
86
|
tomlrb (1.3.0)
|
|
@@ -89,13 +89,13 @@ GEM
|
|
|
89
89
|
coercible (~> 1.0)
|
|
90
90
|
descendants_tracker (~> 0.0, >= 0.0.3)
|
|
91
91
|
equalizer (~> 0.0, >= 0.0.9)
|
|
92
|
-
webdrivers (4.
|
|
92
|
+
webdrivers (4.4.1)
|
|
93
93
|
nokogiri (~> 1.6)
|
|
94
94
|
rubyzip (>= 1.3.0)
|
|
95
95
|
selenium-webdriver (>= 3.0, < 4.0)
|
|
96
|
-
websocket-driver (0.7.
|
|
96
|
+
websocket-driver (0.7.2)
|
|
97
97
|
websocket-extensions (>= 0.1.0)
|
|
98
|
-
websocket-extensions (0.1.
|
|
98
|
+
websocket-extensions (0.1.5)
|
|
99
99
|
xpath (3.2.0)
|
|
100
100
|
nokogiri (~> 1.8)
|
|
101
101
|
|
data/README.md
CHANGED
|
@@ -776,6 +776,25 @@ a `/downloads` folder at the same level as the `/config` and `/features` folders
|
|
|
776
776
|
└── README.md
|
|
777
777
|
|
|
778
778
|
|
|
779
|
+
When running tests in multiple concurrent threads using the `parallel_tests` gem, a new folder will be created within the `/downloads` folder for each
|
|
780
|
+
test thread. This is to ensure that files downloaded in each test thread are isolated from tests running in other parallel threads. An example of the
|
|
781
|
+
`/downloads` folder structure for 4 parallel threads is depicted below:
|
|
782
|
+
|
|
783
|
+
my_automation_project
|
|
784
|
+
├── config
|
|
785
|
+
├── downloads
|
|
786
|
+
│ ├── 1
|
|
787
|
+
│ ├── 2
|
|
788
|
+
│ ├── 3
|
|
789
|
+
│ └── 4
|
|
790
|
+
├── features
|
|
791
|
+
│ ├── step_definitions
|
|
792
|
+
│ ├── support
|
|
793
|
+
│ └── test_data
|
|
794
|
+
├── Gemfile
|
|
795
|
+
└── README.md
|
|
796
|
+
|
|
797
|
+
|
|
779
798
|
When testing file downloads using a local instance of Firefox, you will need to specify the MIME types of the various file types that your tests will
|
|
780
799
|
be downloading. This is accomplished by setting the `MIME_TYPES` Environment Variable to a comma-delimited string containing the list of MIME types to
|
|
781
800
|
be accepted. This list is required as it will prevent Firefox from displaying the File Download modal dialog, which will halt your automated tests. An
|
|
@@ -42,6 +42,9 @@ module TestCentricity
|
|
|
42
42
|
attr_accessor :grid
|
|
43
43
|
attr_accessor :tunneling
|
|
44
44
|
|
|
45
|
+
attr_accessor :parallel
|
|
46
|
+
attr_accessor :process_num
|
|
47
|
+
|
|
45
48
|
attr_accessor :signed_in
|
|
46
49
|
attr_accessor :portal_status
|
|
47
50
|
attr_accessor :portal_context
|
|
@@ -94,6 +97,22 @@ module TestCentricity
|
|
|
94
97
|
@session_time_stamp
|
|
95
98
|
end
|
|
96
99
|
|
|
100
|
+
def self.parallel=(state)
|
|
101
|
+
@parallel = state
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
def self.parallel
|
|
105
|
+
@parallel
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
def self.process_num=(num)
|
|
109
|
+
@process_num = num
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
def self.process_num
|
|
113
|
+
@process_num
|
|
114
|
+
end
|
|
115
|
+
|
|
97
116
|
def self.test_environment
|
|
98
117
|
if @test_environment.blank?
|
|
99
118
|
nil
|
|
@@ -209,7 +209,7 @@ module TestCentricity
|
|
|
209
209
|
ui_object.content_editable?
|
|
210
210
|
else
|
|
211
211
|
if property.is_a?(Hash)
|
|
212
|
-
property.
|
|
212
|
+
property.map do |key, value|
|
|
213
213
|
case key
|
|
214
214
|
when :cell
|
|
215
215
|
ui_object.get_table_cell(value[0].to_i, value[1].to_i)
|
|
@@ -279,7 +279,8 @@ module TestCentricity
|
|
|
279
279
|
else
|
|
280
280
|
case data_field.get_object_type
|
|
281
281
|
when :checkbox
|
|
282
|
-
|
|
282
|
+
check_state = data_param.is_a?(String) ? data_param.to_bool : data_param
|
|
283
|
+
data_field.set_checkbox_state(check_state)
|
|
283
284
|
when :selectlist
|
|
284
285
|
if data_field.get_siebel_object_type == 'JComboBox'
|
|
285
286
|
data_field.set("#{data_param}\t")
|
|
@@ -287,7 +288,8 @@ module TestCentricity
|
|
|
287
288
|
data_field.choose_option(data_param)
|
|
288
289
|
end
|
|
289
290
|
when :radio
|
|
290
|
-
|
|
291
|
+
check_state = data_param.is_a?(String) ? data_param.to_bool : data_param
|
|
292
|
+
data_field.set_selected_state(check_state)
|
|
291
293
|
when :textfield
|
|
292
294
|
data_field.set("#{data_param}\t")
|
|
293
295
|
if integrity_check && data_field.get_value != data_param
|
|
@@ -2,6 +2,7 @@ require 'selenium-webdriver'
|
|
|
2
2
|
require 'os'
|
|
3
3
|
require 'browserstack/local'
|
|
4
4
|
require 'webdrivers'
|
|
5
|
+
require 'fileutils'
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
module TestCentricity
|
|
@@ -16,6 +17,14 @@ module TestCentricity
|
|
|
16
17
|
browser = ENV['WEB_BROWSER']
|
|
17
18
|
# set downloads folder path
|
|
18
19
|
@downloads_path = "#{Dir.pwd}/downloads"
|
|
20
|
+
if ENV['PARALLEL']
|
|
21
|
+
Environ.parallel = true
|
|
22
|
+
Environ.process_num = ENV['TEST_ENV_NUMBER']
|
|
23
|
+
@downloads_path = "#{@downloads_path}/#{ENV['TEST_ENV_NUMBER']}"
|
|
24
|
+
Dir.mkdir(@downloads_path) unless Dir.exist?(@downloads_path)
|
|
25
|
+
else
|
|
26
|
+
Environ.parallel = false
|
|
27
|
+
end
|
|
19
28
|
@downloads_path = @downloads_path.tr('/', "\\") if OS.windows?
|
|
20
29
|
|
|
21
30
|
# assume that we're testing within a local desktop web browser
|
|
@@ -26,37 +35,37 @@ module TestCentricity
|
|
|
26
35
|
Environ.device = :web
|
|
27
36
|
Environ.device_name = 'browser'
|
|
28
37
|
|
|
29
|
-
case browser.downcase.to_sym
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
38
|
+
context = case browser.downcase.to_sym
|
|
39
|
+
when :appium
|
|
40
|
+
initialize_appium
|
|
41
|
+
'mobile device emulator'
|
|
42
|
+
when :browserstack
|
|
43
|
+
initialize_browserstack
|
|
44
|
+
'Browserstack cloud service'
|
|
45
|
+
when :crossbrowser
|
|
46
|
+
initialize_crossbrowser
|
|
47
|
+
'CrossBrowserTesting cloud service'
|
|
48
|
+
when :gridlastic
|
|
49
|
+
initialize_gridlastic
|
|
50
|
+
'Gridlastic cloud service'
|
|
51
|
+
when :lambdatest
|
|
52
|
+
initialize_lambdatest
|
|
53
|
+
'LambdaTest cloud service'
|
|
54
|
+
when :saucelabs
|
|
55
|
+
initialize_saucelabs
|
|
56
|
+
'Sauce Labs cloud service'
|
|
57
|
+
when :testingbot
|
|
58
|
+
initialize_testingbot
|
|
59
|
+
'TestingBot cloud service'
|
|
60
|
+
else
|
|
61
|
+
if ENV['SELENIUM'] == 'remote'
|
|
62
|
+
initialize_remote
|
|
63
|
+
'Selenium Grid'
|
|
64
|
+
else
|
|
65
|
+
initialize_local_browser
|
|
66
|
+
'local browser instance'
|
|
67
|
+
end
|
|
68
|
+
end
|
|
60
69
|
|
|
61
70
|
# set browser window size only if testing with a desktop web browser
|
|
62
71
|
unless Environ.is_device? || Capybara.current_driver == :appium
|
|
@@ -169,11 +178,11 @@ module TestCentricity
|
|
|
169
178
|
end
|
|
170
179
|
|
|
171
180
|
def self.initialize_local_browser
|
|
172
|
-
if OS.osx?
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
181
|
+
Environ.os = if OS.osx?
|
|
182
|
+
'OS X'
|
|
183
|
+
elsif OS.windows?
|
|
184
|
+
'Windows'
|
|
185
|
+
end
|
|
177
186
|
|
|
178
187
|
browser = ENV['WEB_BROWSER'].downcase.to_sym
|
|
179
188
|
|
|
@@ -344,7 +344,7 @@ module TestCentricity
|
|
|
344
344
|
element = @base_object.find(:css, component, minimum: 0, wait: 1)
|
|
345
345
|
rescue
|
|
346
346
|
begin
|
|
347
|
-
element = page.find(:css, component, minimum: 0, wait:
|
|
347
|
+
element = page.find(:css, component, minimum: 0, wait: 5)
|
|
348
348
|
rescue
|
|
349
349
|
raise "List #{component_name} (#{component}) for selectlist named '#{@name}' (#{locator}) not found"
|
|
350
350
|
end
|
|
@@ -7,6 +7,7 @@ module TestCentricity
|
|
|
7
7
|
attr_accessor :table_header
|
|
8
8
|
attr_accessor :header_row
|
|
9
9
|
attr_accessor :header_column
|
|
10
|
+
attr_accessor :row_header
|
|
10
11
|
attr_accessor :tree_expand
|
|
11
12
|
attr_accessor :tree_collapse
|
|
12
13
|
|
|
@@ -21,7 +22,8 @@ module TestCentricity
|
|
|
21
22
|
table_column: 'td',
|
|
22
23
|
table_header: 'thead',
|
|
23
24
|
header_row: 'tr',
|
|
24
|
-
header_column: 'th'
|
|
25
|
+
header_column: 'th',
|
|
26
|
+
row_header: nil
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
case @locator_type
|
|
@@ -52,6 +54,8 @@ module TestCentricity
|
|
|
52
54
|
@header_row = value
|
|
53
55
|
when :header_column
|
|
54
56
|
@header_column = value
|
|
57
|
+
when :row_header
|
|
58
|
+
@row_header = value
|
|
55
59
|
when :tree_expand
|
|
56
60
|
@tree_expand = value
|
|
57
61
|
when :tree_collapse
|
|
@@ -70,20 +74,18 @@ module TestCentricity
|
|
|
70
74
|
#
|
|
71
75
|
def get_row_count
|
|
72
76
|
wait_until_exists(5)
|
|
73
|
-
case @locator_type
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
end
|
|
86
|
-
end
|
|
77
|
+
delimiter = case @locator_type
|
|
78
|
+
when :xpath
|
|
79
|
+
"/"
|
|
80
|
+
when :css
|
|
81
|
+
" > "
|
|
82
|
+
end
|
|
83
|
+
path = if @table_section.nil?
|
|
84
|
+
"#{@locator}#{delimiter}#{@table_body}#{delimiter}#{@table_row}"
|
|
85
|
+
else
|
|
86
|
+
"#{@locator}#{delimiter}#{@table_body}#{delimiter}#{@table_section}"
|
|
87
|
+
end
|
|
88
|
+
page.all(@locator_type, path, visible: :all).count
|
|
87
89
|
end
|
|
88
90
|
|
|
89
91
|
# Wait until the table's row count equals the specified value, or until the specified wait time has expired. If the wait
|
|
@@ -138,33 +140,48 @@ module TestCentricity
|
|
|
138
140
|
row_count = get_row_count
|
|
139
141
|
case @locator_type
|
|
140
142
|
when :xpath
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
else
|
|
144
|
-
if @table_section.nil?
|
|
145
|
-
row_count == 1 ?
|
|
146
|
-
page.all(:xpath, "#{@locator}/#{@table_body}/#{@table_row}/#{@table_column}", visible: :all).count :
|
|
147
|
-
page.all(:xpath, "#{@locator}/#{@table_body}/#{@table_row}[2]/#{@table_column}", visible: :all).count
|
|
148
|
-
else
|
|
149
|
-
row_count == 1 ?
|
|
150
|
-
page.all(:xpath, "#{@locator}/#{@table_body}/#{@table_section}/#{@table_row}/#{@table_column}", visible: :all).count :
|
|
151
|
-
page.all(:xpath, "#{@locator}/#{@table_body}/#{@table_section}[2]/#{@table_row}/#{@table_column}", visible: :all).count
|
|
152
|
-
end
|
|
153
|
-
end
|
|
143
|
+
delimiter = "/"
|
|
144
|
+
index = "[2]"
|
|
154
145
|
when :css
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
146
|
+
delimiter = " > "
|
|
147
|
+
index = ":nth-of-type(2)"
|
|
148
|
+
end
|
|
149
|
+
path = if row_count.zero?
|
|
150
|
+
"#{@locator}#{delimiter}#{@table_header}#{delimiter}#{@header_row}#{delimiter}#{@header_column}"
|
|
151
|
+
else
|
|
152
|
+
if @table_section.nil?
|
|
153
|
+
if row_count == 1
|
|
154
|
+
"#{@locator}#{delimiter}#{@table_body}#{delimiter}#{@table_row}#{delimiter}#{@table_column}"
|
|
155
|
+
else
|
|
156
|
+
"#{@locator}#{delimiter}#{@table_body}#{delimiter}#{@table_row}#{index}#{delimiter}#{@table_column}"
|
|
157
|
+
end
|
|
158
|
+
else
|
|
159
|
+
if row_count == 1
|
|
160
|
+
"#{@locator}#{delimiter}#{@table_body}#{delimiter}#{@table_section}#{delimiter}#{@table_row}#{delimiter}#{@table_column}"
|
|
161
|
+
else
|
|
162
|
+
"#{@locator}#{delimiter}#{@table_body}#{delimiter}#{@table_section}#{index}#{delimiter}#{@table_row}#{delimiter}#{@table_column}"
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
if @row_header.nil?
|
|
167
|
+
page.all(@locator_type, path, visible: :all).count
|
|
168
|
+
else
|
|
169
|
+
cols = page.all(@locator_type, path, visible: :all).count
|
|
170
|
+
|
|
171
|
+
path = if @table_section.nil?
|
|
172
|
+
if row_count == 1
|
|
173
|
+
"#{@locator}#{delimiter}#{@table_body}#{delimiter}#{@table_row}#{delimiter}#{@row_header}"
|
|
174
|
+
else
|
|
175
|
+
"#{@locator}#{delimiter}#{@table_body}#{delimiter}#{@table_row}#{index}#{delimiter}#{@row_header}"
|
|
176
|
+
end
|
|
177
|
+
else
|
|
178
|
+
if row_count == 1
|
|
179
|
+
"#{@locator}#{delimiter}#{@table_body}#{delimiter}#{@table_section}#{delimiter}#{@table_row}#{delimiter}#{@row_header}"
|
|
180
|
+
else
|
|
181
|
+
"#{@locator}#{delimiter}#{@table_body}#{delimiter}#{@table_section}#{index}#{delimiter}#{@table_row}#{delimiter}#{@row_header}"
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
cols + page.all(@locator_type, path, visible: :all).count
|
|
168
185
|
end
|
|
169
186
|
end
|
|
170
187
|
|
|
@@ -615,7 +632,15 @@ module TestCentricity
|
|
|
615
632
|
row_spec = "#{@locator}/#{@table_body}/#{@table_section}"
|
|
616
633
|
row_spec = "#{row_spec}[#{row}]/#{@table_row}[1]"
|
|
617
634
|
end
|
|
618
|
-
column_spec =
|
|
635
|
+
column_spec = if @row_header.nil?
|
|
636
|
+
"/#{@table_column}[#{column}]"
|
|
637
|
+
else
|
|
638
|
+
if column == 1
|
|
639
|
+
"/#{@row_header}"
|
|
640
|
+
else
|
|
641
|
+
"/#{@table_column}[#{column - 1}]"
|
|
642
|
+
end
|
|
643
|
+
end
|
|
619
644
|
when :css
|
|
620
645
|
if @table_section.nil?
|
|
621
646
|
row_spec = "#{@locator} > #{@table_body} > #{@table_row}"
|
|
@@ -624,7 +649,16 @@ module TestCentricity
|
|
|
624
649
|
row_spec = "#{@locator} > #{@table_body} > #{@table_section}"
|
|
625
650
|
row_spec = "#{row_spec}:nth-of-type(#{row}) > #{@table_row}:nth-of-type(1)"
|
|
626
651
|
end
|
|
627
|
-
|
|
652
|
+
|
|
653
|
+
column_spec = if @row_header.nil?
|
|
654
|
+
" > #{@table_column}:nth-of-type(#{column})"
|
|
655
|
+
else
|
|
656
|
+
if column == 1
|
|
657
|
+
" > #{@row_header}"
|
|
658
|
+
else
|
|
659
|
+
" > #{@table_column}:nth-of-type(#{column - 1})"
|
|
660
|
+
end
|
|
661
|
+
end
|
|
628
662
|
end
|
|
629
663
|
"#{row_spec}#{column_spec}"
|
|
630
664
|
end
|
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.2.
|
|
4
|
+
version: 3.2.19
|
|
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:
|
|
11
|
+
date: 2021-01-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|