testcentricity_web 3.2.16 → 3.2.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +31 -0
- data/Gemfile.lock +12 -12
- data/LICENSE.md +1 -1
- data/README.md +2 -2
- data/lib/testcentricity_web/version.rb +1 -1
- data/lib/testcentricity_web/web_core/page_objects_helper.rb +1 -1
- data/lib/testcentricity_web/web_elements/select_list.rb +2 -2
- data/lib/testcentricity_web/web_elements/table.rb +77 -43
- data/lib/testcentricity_web/web_elements/ui_elements_helper.rb +16 -4
- 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: aa65a9fd864b32c3b3b83f570ae9a6990d6b2072b75935fcf8489e26ff5cb759
|
4
|
+
data.tar.gz: da08a618537d5dc3930c3c5740d5a05a73dab8a017ad497cec4aa154956d162d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d6968587d9580dea196021b2b4631b690393b4300883c3e036a5df215ae8f679e1f51bdda1c38f2aa7a221f374ee0bdc400fe7f9a7db4e31a8bcac9675b84ef
|
7
|
+
data.tar.gz: a6ff4c34c5260f4bd8dbaef959635ff79723587e2de0498255a749593778536e867264e8fab13e97dfcf315b9fca4cc711e1d77c1feb277738d2defcba8db305
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,37 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
|
5
|
+
## [3.2.21] - 04-FEB-2021
|
6
|
+
|
7
|
+
### Changed
|
8
|
+
* `UIElement.hover_at` method now accepts an optional `visible` parameter to allow hovering over UI elements that are not
|
9
|
+
visible.
|
10
|
+
|
11
|
+
## [3.2.20] - 21-JAN-2021
|
12
|
+
|
13
|
+
### Changed
|
14
|
+
* `UIElement.hover` method now accepts an optional `visible` parameter to allow hovering over UI elements that are not
|
15
|
+
visible.
|
16
|
+
|
17
|
+
## [3.2.19] - 05-JAN-2021
|
18
|
+
|
19
|
+
### Fixed
|
20
|
+
* `SelectList.choose_option` and `SelectList.get_options` methods now wait up to 5 seconds for list drop menu to appear.
|
21
|
+
|
22
|
+
## [3.2.18] - 12-AUG-2020
|
23
|
+
|
24
|
+
### Fixed
|
25
|
+
* Updated `PageObject.verify_ui_states` and `PageSection.verify_ui_states` methods to correctly handle `:row`, `:column`,
|
26
|
+
`:cell`, `:item`, and `:attribute` properties.
|
27
|
+
|
28
|
+
## [3.2.17] - 19-JUNE-2020
|
29
|
+
|
30
|
+
### Changed
|
31
|
+
* Updated `Table.define_table_elements` method to accept value for `:row_header` element.
|
32
|
+
* Updated `Table.get_row_count`, `Table.get_column_count`, and `Table.get_table_cell_locator` methods to support tables
|
33
|
+
with row headers in row #1.
|
34
|
+
|
4
35
|
## [3.2.16] - 13-MAY-2020
|
5
36
|
|
6
37
|
### Changed
|
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.21)
|
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)
|
@@ -67,12 +67,12 @@ GEM
|
|
67
67
|
os (1.1.0)
|
68
68
|
power_assert (1.2.0)
|
69
69
|
public_suffix (4.0.5)
|
70
|
-
rack (2.2.
|
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/LICENSE.md
CHANGED
data/README.md
CHANGED
@@ -778,7 +778,7 @@ a `/downloads` folder at the same level as the `/config` and `/features` folders
|
|
778
778
|
|
779
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
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
|
781
|
+
`/downloads` folder structure for 4 parallel threads is depicted below:
|
782
782
|
|
783
783
|
my_automation_project
|
784
784
|
├── config
|
@@ -1673,7 +1673,7 @@ landscape orientation running on the BrowserStack service:
|
|
1673
1673
|
|
1674
1674
|
## Copyright and License
|
1675
1675
|
|
1676
|
-
TestCentricity™ Framework is Copyright (c) 2014-
|
1676
|
+
TestCentricity™ Framework is Copyright (c) 2014-2021, Tony Mrozinski.
|
1677
1677
|
All rights reserved.
|
1678
1678
|
|
1679
1679
|
Redistribution and use in source and binary forms, with or without
|
@@ -68,7 +68,7 @@ module TestCentricity
|
|
68
68
|
|
69
69
|
unless @options_list.nil?
|
70
70
|
find_component(@options_list, 'drop menu')
|
71
|
-
raise "Could not find option #{option} to choose" unless first(:css, @list_item, minimum: 0, wait:
|
71
|
+
raise "Could not find option #{option} to choose" unless first(:css, @list_item, minimum: 0, wait: 5)
|
72
72
|
|
73
73
|
if option.is_a?(Array)
|
74
74
|
option.each do |item|
|
@@ -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
|
@@ -528,11 +528,17 @@ module TestCentricity
|
|
528
528
|
|
529
529
|
# Hover the cursor over an object
|
530
530
|
#
|
531
|
+
# @param visible [Boolean, Symbol] Only find elements with the specified visibility:
|
532
|
+
# * true - only finds visible elements.
|
533
|
+
# * false - finds invisible _and_ visible elements.
|
534
|
+
# * :all - same as false; finds visible and invisible elements.
|
535
|
+
# * :hidden - only finds invisible elements.
|
536
|
+
# * :visible - same as true; only finds visible elements.
|
531
537
|
# @example
|
532
538
|
# basket_link.hover
|
533
539
|
#
|
534
|
-
def hover
|
535
|
-
obj, type = find_element
|
540
|
+
def hover(visible = true)
|
541
|
+
obj, type = find_element(visible)
|
536
542
|
object_not_found_exception(obj, type)
|
537
543
|
obj.hover
|
538
544
|
end
|
@@ -541,11 +547,17 @@ module TestCentricity
|
|
541
547
|
#
|
542
548
|
# @param x [Integer] X offset
|
543
549
|
# @param y [Integer] Y offset
|
550
|
+
# @param visible [Boolean, Symbol] Only find elements with the specified visibility:
|
551
|
+
# * true - only finds visible elements.
|
552
|
+
# * false - finds invisible _and_ visible elements.
|
553
|
+
# * :all - same as false; finds visible and invisible elements.
|
554
|
+
# * :hidden - only finds invisible elements.
|
555
|
+
# * :visible - same as true; only finds visible elements.
|
544
556
|
# @example
|
545
557
|
# timeline_bar.hover_at(100, 5)
|
546
558
|
#
|
547
|
-
def hover_at(x, y)
|
548
|
-
obj, = find_element
|
559
|
+
def hover_at(x, y, visible = true)
|
560
|
+
obj, = find_element(visible)
|
549
561
|
raise "UI #{object_ref_message} not found" unless obj
|
550
562
|
obj.hover_at(x, y)
|
551
563
|
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.21
|
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-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|