testcentricity_web 3.3.0 → 4.0.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 +4 -4
- data/CHANGELOG.md +29 -0
- data/Gemfile.lock +9 -7
- data/README.md +44 -12
- data/lib/testcentricity_web.rb +0 -10
- data/lib/testcentricity_web/browser_helper.rb +21 -13
- data/lib/testcentricity_web/data_objects/data_objects_helper.rb +5 -5
- data/lib/testcentricity_web/version.rb +1 -1
- data/lib/testcentricity_web/web_core/page_object.rb +1 -93
- data/lib/testcentricity_web/web_core/page_objects_helper.rb +1 -7
- data/lib/testcentricity_web/web_core/page_section.rb +0 -91
- data/lib/testcentricity_web/web_core/webdriver_helper.rb +89 -31
- data/lib/testcentricity_web/web_elements/checkbox.rb +1 -15
- data/lib/testcentricity_web/web_elements/file_field.rb +1 -1
- data/lib/testcentricity_web/web_elements/radio.rb +1 -1
- data/lib/testcentricity_web/web_elements/select_list.rb +0 -52
- data/lib/testcentricity_web/web_elements/ui_elements_helper.rb +5 -14
- metadata +2 -12
- data/lib/testcentricity_web/web_elements/cell_button.rb +0 -8
- data/lib/testcentricity_web/web_elements/cell_checkbox.rb +0 -38
- data/lib/testcentricity_web/web_elements/cell_element.rb +0 -69
- data/lib/testcentricity_web/web_elements/cell_image.rb +0 -8
- data/lib/testcentricity_web/web_elements/cell_radio.rb +0 -31
- data/lib/testcentricity_web/web_elements/list_button.rb +0 -8
- data/lib/testcentricity_web/web_elements/list_checkbox.rb +0 -38
- data/lib/testcentricity_web/web_elements/list_element.rb +0 -61
- data/lib/testcentricity_web/web_elements/list_radio.rb +0 -31
- data/lib/testcentricity_web/web_elements/siebel_open_ui_helper.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df556101ef2de8b85dae896e6d943d621e220a452101257a8c36aa4f32a6db51
|
4
|
+
data.tar.gz: 324e34cc74ccd75892e7cbba3f11ab6e4ada25699c94b8a5c9d49dda411866a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88a64d973f5dc89fee73245eb888c41c3d8fc673b83548e11798f5d4bc80679176a2abe0a5cde655e8d5c67a1d1887fa9963ecef92eeb2521e8dc6367d8bc3e6
|
7
|
+
data.tar.gz: 2f7a3967eadac906420d7175a0d8c0d915b6f70240aaee0a333bf332f6ed5b08a376464af7a7cc6a472f46540000e7e607dd4ac99b000c3f81e53c43488956d7
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,35 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
## [4.0.0] - 25-MAR-2021
|
5
|
+
|
6
|
+
### Changed
|
7
|
+
* `WebDriverConnect.initialize_web_driver` method now accepts an `options` hash as an optional parameter, which can be used to
|
8
|
+
specify an optional base host URL and/or the desired Selenium-Webdriver capabilities required to establish a connection with
|
9
|
+
a cloud hosted target web browser.
|
10
|
+
* User defined mobile device profiles can be specified in a `device.yml` file for testing locally hosted emulated mobile
|
11
|
+
web browsers running in an instance of the Chrome desktop browser. The user specified device profiles must be located at
|
12
|
+
`config/data/devices/devices.yml`. Refer to the **User defined mobile device profiles** section of the {file:README.md README} file.
|
13
|
+
|
14
|
+
### Removed
|
15
|
+
* Removed support for the following legacy UI elements:
|
16
|
+
* `CellElement`
|
17
|
+
* `CellButton`
|
18
|
+
* `CellCheckBox`
|
19
|
+
* `CellRadio`
|
20
|
+
* `CellImage`
|
21
|
+
* `ListElement`
|
22
|
+
* `ListButton`
|
23
|
+
* `ListCheckBox`
|
24
|
+
* Removed support for Siebel Open UI objects. This includes removal of the following legacy methods:
|
25
|
+
* `CheckBox.set_siebel_checkbox_state`
|
26
|
+
* `SelectList.choose_siebel_option`
|
27
|
+
* `SelectList.get_siebel_options`
|
28
|
+
* `SelectList.verify_siebel_options`
|
29
|
+
* `SelectList.read_only?`
|
30
|
+
* `UIElement.invoke_siebel_dialog`
|
31
|
+
* `UIElement.invoke_siebel_popup`
|
32
|
+
* `UIElement.get_siebel_object_type`
|
4
33
|
|
5
34
|
## [3.3.0] - 14-MAR-2021
|
6
35
|
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
testcentricity_web (
|
4
|
+
testcentricity_web (4.0.0.a1)
|
5
5
|
appium_lib
|
6
6
|
browserstack-local
|
7
7
|
capybara (>= 3.1, < 4)
|
@@ -25,7 +25,7 @@ GEM
|
|
25
25
|
appium_lib_core (~> 4.1)
|
26
26
|
nokogiri (~> 1.8, >= 1.8.1)
|
27
27
|
tomlrb (~> 1.1)
|
28
|
-
appium_lib_core (4.
|
28
|
+
appium_lib_core (4.5.0)
|
29
29
|
faye-websocket (~> 0.11.0)
|
30
30
|
selenium-webdriver (~> 3.14, >= 3.14.1)
|
31
31
|
axiom-types (0.1.1)
|
@@ -51,17 +51,19 @@ 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.17.0)
|
55
55
|
i18n (>= 1.6, < 2)
|
56
56
|
faye-websocket (0.11.0)
|
57
57
|
eventmachine (>= 0.12.0)
|
58
58
|
websocket-driver (>= 0.5.1)
|
59
59
|
ffi (1.15.0)
|
60
|
-
i18n (1.8.
|
60
|
+
i18n (1.8.10)
|
61
61
|
concurrent-ruby (~> 1.0)
|
62
62
|
ice_nine (0.11.2)
|
63
|
-
mini_mime (1.0
|
64
|
-
|
63
|
+
mini_mime (1.1.0)
|
64
|
+
mini_portile2 (2.5.0)
|
65
|
+
nokogiri (1.11.3)
|
66
|
+
mini_portile2 (~> 2.5.0)
|
65
67
|
racc (~> 1.4)
|
66
68
|
os (1.1.1)
|
67
69
|
power_assert (2.0.0)
|
@@ -80,7 +82,7 @@ GEM
|
|
80
82
|
rubyzip (>= 1.2.2)
|
81
83
|
spreadsheet (1.1.7)
|
82
84
|
ruby-ole (>= 1.0)
|
83
|
-
test-unit (3.4.
|
85
|
+
test-unit (3.4.1)
|
84
86
|
power_assert
|
85
87
|
thread_safe (0.3.6)
|
86
88
|
tomlrb (1.3.0)
|
data/README.md
CHANGED
@@ -23,7 +23,6 @@ The TestCentricity™ Web gem supports running automated tests against the follo
|
|
23
23
|
* [Gridlastic](https://www.gridlastic.com/test-environments.html)
|
24
24
|
* [LambdaTest](https://www.lambdatest.com/selenium-automation)
|
25
25
|
* web portals utilizing JavaScript front end application frameworks like Ember, React, Angular, and GWT
|
26
|
-
* enterprise web portals built using Siebel Open UI
|
27
26
|
* web pages containing HTML5 Video and Audio objects
|
28
27
|
|
29
28
|
|
@@ -483,6 +482,7 @@ With TestCentricity, all UI elements are based on the **UIElement** class, and i
|
|
483
482
|
element.click_at(x, y)
|
484
483
|
element.hover
|
485
484
|
element.hover_at(x, y)
|
485
|
+
element.scroll_to(position)
|
486
486
|
element.drag_by(right_offset, down_offset)
|
487
487
|
element.drag_and_drop(target, right_offset, down_offset)
|
488
488
|
|
@@ -638,11 +638,11 @@ navigated to by clicking associated links. One such Cucumber navigation scenario
|
|
638
638
|
|
639
639
|
Scenario Outline: Verify Home page navigation links
|
640
640
|
Given I am on the Home page
|
641
|
-
When I click the <
|
642
|
-
Then I expect the <
|
641
|
+
When I click the <page name> navigation link
|
642
|
+
Then I expect the <page name> page to be correctly displayed
|
643
643
|
|
644
644
|
Examples:
|
645
|
-
|
|
645
|
+
|page name |
|
646
646
|
|Registration |
|
647
647
|
|My Account |
|
648
648
|
|Terms & Conditions |
|
@@ -653,17 +653,17 @@ navigated to by clicking associated links. One such Cucumber navigation scenario
|
|
653
653
|
In the above example, the step definitions associated with the 3 steps might be implemented using a `page_dispatcher` method using a
|
654
654
|
`case` statement to parse the `page` parameter as in the example below:
|
655
655
|
|
656
|
-
Given(/^I am on the (
|
656
|
+
Given(/^I am on the (.*) page$/) do |page_name|
|
657
657
|
target_page = page_dispatcher(page_name)
|
658
658
|
target_page.load_page
|
659
659
|
end
|
660
660
|
|
661
|
-
When(/^I click the (
|
661
|
+
When(/^I click the (.*) navigation link$/) do |link_name|
|
662
662
|
target_page = page_dispatcher(link_name)
|
663
663
|
target_page.navigate_to
|
664
664
|
end
|
665
665
|
|
666
|
-
Then(/^I expect the (
|
666
|
+
Then(/^I expect the (.*) page to be correctly displayed$/) do |page_name|
|
667
667
|
target_page = page_dispatcher(page_name)
|
668
668
|
target_page.verify_page_exists
|
669
669
|
target_page.verify_page_ui
|
@@ -701,22 +701,22 @@ To use these **PageManager** methods, include the step definitions and code belo
|
|
701
701
|
|
702
702
|
include TestCentricity
|
703
703
|
|
704
|
-
Given(/^I am on the (
|
704
|
+
Given(/^I am on the (.*) page$/) do |page_name|
|
705
705
|
target_page = PageManager.find_page(page_name)
|
706
706
|
target_page.load_page
|
707
707
|
end
|
708
708
|
|
709
|
-
When(/^I click the (
|
709
|
+
When(/^I click the (.*) navigation link$/) do |page_name|
|
710
710
|
target_page = PageManager.find_page(page_name)
|
711
711
|
target_page.navigate_to
|
712
712
|
end
|
713
713
|
|
714
|
-
Then(/^I expect to see the (
|
714
|
+
Then(/^I expect to see the (.*) page$/) do |page_name|
|
715
715
|
target_page = PageManager.find_page(page_name)
|
716
716
|
target_page.verify_page_exists
|
717
717
|
end
|
718
718
|
|
719
|
-
Then(/^I expect the (
|
719
|
+
Then(/^I expect the (.*) page to be correctly displayed$/) do |page_name|
|
720
720
|
target_page = PageManager.find_page(page_name)
|
721
721
|
target_page.verify_page_exists
|
722
722
|
target_page.verify_page_ui
|
@@ -870,6 +870,38 @@ To use a local instance of the Chrome desktop browser to host the emulated mobil
|
|
870
870
|
to `chrome`.
|
871
871
|
|
872
872
|
|
873
|
+
#### User defined mobile device profiles
|
874
|
+
|
875
|
+
User defined mobile device profiles can be specified in a `device.yml` file for testing locally hosted emulated mobile web browsers running in an instance
|
876
|
+
of the Chrome desktop browser. The user specified device profiles must be located at `config/data/devices/devices.yml` as depicted below:
|
877
|
+
|
878
|
+
my_automation_project
|
879
|
+
├── config
|
880
|
+
│ ├── data
|
881
|
+
│ │ └── devices
|
882
|
+
│ │ └── devices.yml
|
883
|
+
│ ├── locales
|
884
|
+
│ └── cucumber.yml
|
885
|
+
├── downloads
|
886
|
+
├── features
|
887
|
+
│ ├── step_definitions
|
888
|
+
│ ├── support
|
889
|
+
│ └── test_data
|
890
|
+
├── Gemfile
|
891
|
+
└── README.md
|
892
|
+
|
893
|
+
The format for a new device profile is:
|
894
|
+
```
|
895
|
+
:new_device_profile:
|
896
|
+
:name: "New Device Name"
|
897
|
+
:os: (ios, android, kindle, or blackberry)
|
898
|
+
:type: (phone or tablet)
|
899
|
+
:css_width: css width in pixels
|
900
|
+
:css_height: css height in pixels
|
901
|
+
:default_orientation: (portrait or landscape)
|
902
|
+
:user_agent: "user agent string"
|
903
|
+
```
|
904
|
+
|
873
905
|
### Selenium Grid and Dockerized Selenium Grid hosted desktop and emulated mobile web browsers
|
874
906
|
|
875
907
|
For desktop and emulated mobile web browsers running on Selenium Grid or Dockerized Selenium Grid environments ([like Zalenium](https://opensource.zalando.com/zalenium/)), the following **Environment Variables** must be set
|
@@ -877,7 +909,7 @@ as described in the table below.
|
|
877
909
|
|
878
910
|
**Environment Variable** | **Description**
|
879
911
|
--------------- | ----------------
|
880
|
-
`WEB_BROWSER` | Must be set to one of the following desktop browsers - `chrome`, `chrome_headless`, `firefox`,
|
912
|
+
`WEB_BROWSER` | Must be set to one of the following desktop browsers - `chrome`, `chrome_headless`, or `firefox`, or any of the mobile web browsers described above.
|
881
913
|
`SELENIUM` | Must be set to `remote`
|
882
914
|
`REMOTE_ENDPOINT` | Must be set to the URL of the Grid hub, which is usually `http://localhost:4444/wd/hub`
|
883
915
|
|
data/lib/testcentricity_web.rb
CHANGED
@@ -35,16 +35,6 @@ require 'testcentricity_web/web_elements/range'
|
|
35
35
|
require 'testcentricity_web/web_elements/media'
|
36
36
|
require 'testcentricity_web/web_elements/audio'
|
37
37
|
require 'testcentricity_web/web_elements/video'
|
38
|
-
require 'testcentricity_web/web_elements/cell_element'
|
39
|
-
require 'testcentricity_web/web_elements/cell_button'
|
40
|
-
require 'testcentricity_web/web_elements/cell_checkbox'
|
41
|
-
require 'testcentricity_web/web_elements/cell_radio'
|
42
|
-
require 'testcentricity_web/web_elements/cell_image'
|
43
|
-
require 'testcentricity_web/web_elements/list_element'
|
44
|
-
require 'testcentricity_web/web_elements/list_button'
|
45
|
-
require 'testcentricity_web/web_elements/list_checkbox'
|
46
|
-
require 'testcentricity_web/web_elements/list_radio'
|
47
|
-
require 'testcentricity_web/web_elements/siebel_open_ui_helper'
|
48
38
|
|
49
39
|
|
50
40
|
module TestCentricity
|
@@ -2,9 +2,11 @@ require 'yaml'
|
|
2
2
|
|
3
3
|
|
4
4
|
module TestCentricity
|
5
|
-
|
5
|
+
class Browsers
|
6
6
|
include Capybara::DSL
|
7
7
|
|
8
|
+
@devices = {}
|
9
|
+
|
8
10
|
# Sets the size of the browser window.
|
9
11
|
#
|
10
12
|
# @param resolution [Array] the desired [width, height]
|
@@ -73,8 +75,8 @@ module TestCentricity
|
|
73
75
|
|
74
76
|
def self.close_all_browser_instances
|
75
77
|
Capybara.page.driver.browser.window_handles.each do |handle|
|
76
|
-
page.driver.browser.switch_to.window(handle)
|
77
|
-
page.driver.browser.close
|
78
|
+
Capybara.page.driver.browser.switch_to.window(handle)
|
79
|
+
Capybara.page.driver.browser.close
|
78
80
|
end
|
79
81
|
end
|
80
82
|
|
@@ -126,17 +128,15 @@ module TestCentricity
|
|
126
128
|
end
|
127
129
|
end
|
128
130
|
|
129
|
-
def self.mobile_device_agent(
|
130
|
-
|
131
|
-
device = get_devices[device_name]
|
131
|
+
def self.mobile_device_agent(browser)
|
132
|
+
device = get_device(browser)
|
132
133
|
agent_string = device[:user_agent]
|
133
134
|
raise "Device '#{device}' is not defined" unless agent_string
|
134
135
|
agent_string
|
135
136
|
end
|
136
137
|
|
137
|
-
def self.mobile_device_name(
|
138
|
-
|
139
|
-
device = get_devices[device_name]
|
138
|
+
def self.mobile_device_name(browser)
|
139
|
+
device = get_device(browser)
|
140
140
|
name = device[:name]
|
141
141
|
raise "Device '#{device}' is not defined" unless name
|
142
142
|
Environ.device_os = device[:os]
|
@@ -145,8 +145,7 @@ module TestCentricity
|
|
145
145
|
end
|
146
146
|
|
147
147
|
def self.browser_size(browser, orientation)
|
148
|
-
|
149
|
-
device = get_devices[device_name]
|
148
|
+
device = get_device(browser)
|
150
149
|
if device
|
151
150
|
width = device[:css_width]
|
152
151
|
height = device[:css_height]
|
@@ -170,8 +169,17 @@ module TestCentricity
|
|
170
169
|
|
171
170
|
private
|
172
171
|
|
173
|
-
def self.
|
174
|
-
|
172
|
+
def self.get_device(device)
|
173
|
+
if @devices.blank?
|
174
|
+
@devices = YAML.load_file File.expand_path('../../devices/devices.yml', __FILE__)
|
175
|
+
# read in user defined list of devices
|
176
|
+
external_device_file = 'config/data/devices/devices.yml'
|
177
|
+
unless File.size?(external_device_file).nil?
|
178
|
+
ext_devices = YAML.load_file(external_device_file)
|
179
|
+
@devices = @devices.merge(ext_devices)
|
180
|
+
end
|
181
|
+
end
|
182
|
+
@devices[device.gsub(/\s+/, '').downcase.to_sym]
|
175
183
|
end
|
176
184
|
end
|
177
185
|
end
|
@@ -5,8 +5,8 @@ require 'virtus'
|
|
5
5
|
|
6
6
|
module TestCentricity
|
7
7
|
|
8
|
-
|
9
|
-
XL_PRIMARY_DATA_FILE ||= "#{
|
8
|
+
PRIMARY_DATA_PATH ||= 'features/test_data/'
|
9
|
+
XL_PRIMARY_DATA_FILE ||= "#{PRIMARY_DATA_PATH}data.xls"
|
10
10
|
|
11
11
|
|
12
12
|
class DataObject
|
@@ -81,7 +81,7 @@ module TestCentricity
|
|
81
81
|
attr_accessor :node
|
82
82
|
|
83
83
|
def read_yaml_node_data(file_name, node_name)
|
84
|
-
@file_path = "#{
|
84
|
+
@file_path = "#{PRIMARY_DATA_PATH}#{file_name}"
|
85
85
|
@node = node_name
|
86
86
|
data = YAML.load_file(@file_path)
|
87
87
|
data[node_name]
|
@@ -94,7 +94,7 @@ module TestCentricity
|
|
94
94
|
end
|
95
95
|
|
96
96
|
def read_json_node_data(file_name, node_name)
|
97
|
-
@file_path = "#{
|
97
|
+
@file_path = "#{PRIMARY_DATA_PATH}#{file_name}"
|
98
98
|
@node = node_name
|
99
99
|
raw_data = File.read(@file_path)
|
100
100
|
data = JSON.parse(raw_data)
|
@@ -117,7 +117,7 @@ module TestCentricity
|
|
117
117
|
@worksheet = sheet
|
118
118
|
if ENV['TEST_ENVIRONMENT']
|
119
119
|
environment = ENV['TEST_ENVIRONMENT']
|
120
|
-
data_file = "#{
|
120
|
+
data_file = "#{PRIMARY_DATA_PATH}#{environment}_data.xls"
|
121
121
|
data_file = XL_PRIMARY_DATA_FILE unless ExcelData.row_spec_exists?(data_file, @worksheet, row_spec)
|
122
122
|
else
|
123
123
|
data_file = XL_PRIMARY_DATA_FILE
|
@@ -5,8 +5,7 @@ module TestCentricity
|
|
5
5
|
# @param element_name [Symbol] name of UI object (as a symbol)
|
6
6
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
7
7
|
# @example
|
8
|
-
# element :
|
9
|
-
# element :siebel_busy, "//html[contains(@class, 'siebui-busy')]"
|
8
|
+
# element :settings_item, 'a#userPreferencesTrigger'
|
10
9
|
#
|
11
10
|
def self.element(element_name, locator)
|
12
11
|
define_page_element(element_name, TestCentricity::UIElement, locator)
|
@@ -288,97 +287,6 @@ module TestCentricity
|
|
288
287
|
element_hash.each(&method(:filefield))
|
289
288
|
end
|
290
289
|
|
291
|
-
# Declare and instantiate a cell button in a table column on this page object.
|
292
|
-
#
|
293
|
-
# @param element_name [Symbol] name of cell button object (as a symbol)
|
294
|
-
# @param locator [String] XPath expression that uniquely identifies cell button within row and column of parent table object
|
295
|
-
# @param table [Symbol] Name (as a symbol) of parent table object
|
296
|
-
# @param column [Integer] 1-based index of table column that contains the cell button object
|
297
|
-
# @example
|
298
|
-
# cell_button :show_button, "a[@class='show']", :data_table, 5
|
299
|
-
# cell_button :edit_button, "a[@class='edit']", :data_table, 5
|
300
|
-
#
|
301
|
-
def self.cell_button(element_name, locator, table, column)
|
302
|
-
class_eval(%(def #{element_name};@#{element_name} ||= TestCentricity::CellButton.new("#{element_name}", self, "#{locator}", :page, #{table}, #{column});end))
|
303
|
-
end
|
304
|
-
|
305
|
-
# Declare and instantiate a cell checkbox in a table column on this page object.
|
306
|
-
#
|
307
|
-
# @param element_name [Symbol] name of cell checkbox object (as a symbol)
|
308
|
-
# @param locator [String] XPath expression that uniquely identifies cell checkbox within row and column of parent table object
|
309
|
-
# @param table [Symbol] Name (as a symbol) of parent table object
|
310
|
-
# @param column [Integer] 1-based index of table column that contains the cell checkbox object
|
311
|
-
# @example
|
312
|
-
# cell_checkbox :is_registered_check, "a[@class='registered']", :data_table, 4
|
313
|
-
#
|
314
|
-
def self.cell_checkbox(element_name, locator, table, column, proxy = nil)
|
315
|
-
class_eval(%(def #{element_name};@#{element_name} ||= TestCentricity::CellCheckBox.new("#{element_name}", self, "#{locator}", :page, #{table}, #{column}, #{proxy});end))
|
316
|
-
end
|
317
|
-
|
318
|
-
# Declare and instantiate a cell radio in a table column on this page object.
|
319
|
-
#
|
320
|
-
# @param element_name [Symbol] name of cell radio object (as a symbol)
|
321
|
-
# @param locator [String] XPath expression that uniquely identifies cell radio within row and column of parent table object
|
322
|
-
# @param table [Symbol] Name (as a symbol) of parent table object
|
323
|
-
# @param column [Integer] 1-based index of table column that contains the cell radio object
|
324
|
-
# @example
|
325
|
-
# cell_radio :track_a_radio, "a[@class='track_a']", :data_table, 8
|
326
|
-
#
|
327
|
-
def self.cell_radio(element_name, locator, table, column, proxy = nil)
|
328
|
-
class_eval(%(def #{element_name};@#{element_name} ||= TestCentricity::CellRadio.new("#{element_name}", self, "#{locator}", :page, #{table}, #{column}, #{proxy});end))
|
329
|
-
end
|
330
|
-
|
331
|
-
# Declare and instantiate a cell image in a table column on this page object.
|
332
|
-
#
|
333
|
-
# @param element_name [Symbol] name of cell image object (as a symbol)
|
334
|
-
# @param locator [String] XPath expression that uniquely identifies cell image within row and column of parent table object
|
335
|
-
# @param table [Symbol] Name (as a symbol) of parent table object
|
336
|
-
# @param column [Integer] 1-based index of table column that contains the cell image object
|
337
|
-
# @example
|
338
|
-
# cell_image :ready_icon, "img[@class='ready']", :data_table, 3
|
339
|
-
# cell_image :send_icon, "img[@class='send']", :data_table, 3
|
340
|
-
#
|
341
|
-
def self.cell_image(element_name, locator, table, column)
|
342
|
-
class_eval(%(def #{element_name};@#{element_name} ||= TestCentricity::CellImage.new("#{element_name}", self, "#{locator}", :page, #{table}, #{column});end))
|
343
|
-
end
|
344
|
-
|
345
|
-
# Declare and instantiate a list button in a row of a list object on this page object.
|
346
|
-
#
|
347
|
-
# @param element_name [Symbol] name of list button object (as a symbol)
|
348
|
-
# @param locator [String] XPath expression that uniquely identifies list button within row of parent list object
|
349
|
-
# @param list [Symbol] Name (as a symbol) of parent list object
|
350
|
-
# @example
|
351
|
-
# list_button :delete_button, "a[@class='delete']", :icon_list
|
352
|
-
# list_button :edit_button, "a[@class='edit']", :icon_list
|
353
|
-
#
|
354
|
-
def self.list_button(element_name, locator, list)
|
355
|
-
class_eval(%(def #{element_name};@#{element_name} ||= TestCentricity::ListButton.new("#{element_name}", self, "#{locator}", :page, #{list});end))
|
356
|
-
end
|
357
|
-
|
358
|
-
# Declare and instantiate a list checkbox in a row of a list object on this page object.
|
359
|
-
#
|
360
|
-
# @param element_name [Symbol] name of list checkbox object (as a symbol)
|
361
|
-
# @param locator [String] XPath expression that uniquely identifies list checkbox within row of parent list object
|
362
|
-
# @param list [Symbol] Name (as a symbol) of parent list object
|
363
|
-
# @example
|
364
|
-
# list_checkbox :is_registered_check, "a[@class='registered']", :data_list
|
365
|
-
#
|
366
|
-
def self.list_checkbox(element_name, locator, list, proxy = nil)
|
367
|
-
class_eval(%(def #{element_name};@#{element_name} ||= TestCentricity::ListCheckBox.new("#{element_name}", self, "#{locator}", :page, #{list}, #{proxy});end))
|
368
|
-
end
|
369
|
-
|
370
|
-
# Declare and instantiate a list radio in a row of a list object on this page object.
|
371
|
-
#
|
372
|
-
# @param element_name [Symbol] name of list radio object (as a symbol)
|
373
|
-
# @param locator [String] XPath expression that uniquely identifies list radio within row of parent list object
|
374
|
-
# @param list [Symbol] Name (as a symbol) of parent list object
|
375
|
-
# @example
|
376
|
-
# list_radio :sharing_radio, "a[@class='sharing']", :data_list
|
377
|
-
#
|
378
|
-
def self.list_radio(element_name, locator, list, proxy = nil)
|
379
|
-
class_eval(%(def #{element_name};@#{element_name} ||= TestCentricity::ListRadio.new("#{element_name}", self, "#{locator}", :page, #{list}, #{proxy});end))
|
380
|
-
end
|
381
|
-
|
382
290
|
# Instantiate a single PageSection object for this page object.
|
383
291
|
#
|
384
292
|
# @param section_name [Symbol] name of PageSection object (as a symbol)
|