testcentricity_web 3.2.22 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +47 -0
- data/Gemfile.lock +25 -23
- 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/data_objects/environment.rb +40 -3
- data/lib/testcentricity_web/exception_queue_helper.rb +28 -5
- data/lib/testcentricity_web/utility_helpers.rb +4 -0
- 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 +127 -52
- 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,53 @@
|
|
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`
|
33
|
+
|
34
|
+
## [3.3.0] - 14-MAR-2021
|
35
|
+
|
36
|
+
### Fixed
|
37
|
+
* `WebDriverConnect.initialize_web_driver` method now correctly sets local Chrome browser Download directory when running
|
38
|
+
with headless Chrome.
|
39
|
+
|
40
|
+
## [3.2.25] - 11-MAR-2021
|
41
|
+
|
42
|
+
### Added
|
43
|
+
* Added `String.titlecase` method.
|
44
|
+
|
45
|
+
## [3.2.23] - 11-FEB-2021
|
46
|
+
|
47
|
+
### Changed
|
48
|
+
* Updated `PageObject.verify_ui_states` and `PageSection.verify_ui_states` methods to allow `:translate_upcase`,
|
49
|
+
`:translate_downcase`, `:translate_capitalize`, and `:translate_titlecase` conversions to fall back to `:en` default
|
50
|
+
locale if translated strings are missing from the current locale specified in `I18n.locale`.
|
4
51
|
|
5
52
|
## [3.2.22] - 09-FEB-2021
|
6
53
|
|
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)
|
@@ -21,58 +21,60 @@ GEM
|
|
21
21
|
specs:
|
22
22
|
addressable (2.7.0)
|
23
23
|
public_suffix (>= 2.0.2, < 5.0)
|
24
|
-
appium_lib (
|
25
|
-
appium_lib_core (~>
|
24
|
+
appium_lib (11.2.0)
|
25
|
+
appium_lib_core (~> 4.1)
|
26
26
|
nokogiri (~> 1.8, >= 1.8.1)
|
27
27
|
tomlrb (~> 1.1)
|
28
|
-
appium_lib_core (
|
29
|
-
faye-websocket (~> 0.
|
28
|
+
appium_lib_core (4.5.0)
|
29
|
+
faye-websocket (~> 0.11.0)
|
30
30
|
selenium-webdriver (~> 3.14, >= 3.14.1)
|
31
31
|
axiom-types (0.1.1)
|
32
32
|
descendants_tracker (~> 0.0.4)
|
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.
|
36
|
+
capybara (3.35.3)
|
37
37
|
addressable
|
38
38
|
mini_mime (>= 0.1.3)
|
39
39
|
nokogiri (~> 1.8)
|
40
40
|
rack (>= 1.6.0)
|
41
41
|
rack-test (>= 0.6.3)
|
42
|
-
regexp_parser (
|
42
|
+
regexp_parser (>= 1.5, < 3.0)
|
43
43
|
xpath (~> 3.2)
|
44
44
|
childprocess (0.9.0)
|
45
45
|
ffi (~> 1.0, >= 1.0.11)
|
46
46
|
chronic (0.10.2)
|
47
47
|
coercible (1.0.0)
|
48
48
|
descendants_tracker (~> 0.0.1)
|
49
|
-
concurrent-ruby (1.1.
|
49
|
+
concurrent-ruby (1.1.8)
|
50
50
|
descendants_tracker (0.0.4)
|
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
|
-
faye-websocket (0.
|
56
|
+
faye-websocket (0.11.0)
|
57
57
|
eventmachine (>= 0.12.0)
|
58
58
|
websocket-driver (>= 0.5.1)
|
59
|
-
ffi (1.
|
60
|
-
i18n (1.8.
|
59
|
+
ffi (1.15.0)
|
60
|
+
i18n (1.8.10)
|
61
61
|
concurrent-ruby (~> 1.0)
|
62
62
|
ice_nine (0.11.2)
|
63
|
-
mini_mime (1.0
|
64
|
-
mini_portile2 (2.
|
65
|
-
nokogiri (1.
|
66
|
-
mini_portile2 (~> 2.
|
67
|
-
|
68
|
-
|
69
|
-
|
63
|
+
mini_mime (1.1.0)
|
64
|
+
mini_portile2 (2.5.0)
|
65
|
+
nokogiri (1.11.3)
|
66
|
+
mini_portile2 (~> 2.5.0)
|
67
|
+
racc (~> 1.4)
|
68
|
+
os (1.1.1)
|
69
|
+
power_assert (2.0.0)
|
70
|
+
public_suffix (4.0.6)
|
71
|
+
racc (1.5.2)
|
70
72
|
rack (2.2.3)
|
71
73
|
rack-test (1.1.0)
|
72
74
|
rack (>= 1.0, < 3)
|
73
75
|
rake (13.0.1)
|
74
76
|
redcarpet (3.5.0)
|
75
|
-
regexp_parser (1.
|
77
|
+
regexp_parser (2.1.1)
|
76
78
|
ruby-ole (1.2.12.2)
|
77
79
|
rubyzip (2.3.0)
|
78
80
|
selenium-webdriver (3.142.7)
|
@@ -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.
|
85
|
+
test-unit (3.4.1)
|
84
86
|
power_assert
|
85
87
|
thread_safe (0.3.6)
|
86
88
|
tomlrb (1.3.0)
|
@@ -89,11 +91,11 @@ GEM
|
|
89
91
|
coercible (~> 1.0)
|
90
92
|
descendants_tracker (~> 0.0, >= 0.0.3)
|
91
93
|
equalizer (~> 0.0, >= 0.0.9)
|
92
|
-
webdrivers (4.
|
94
|
+
webdrivers (4.6.0)
|
93
95
|
nokogiri (~> 1.6)
|
94
96
|
rubyzip (>= 1.3.0)
|
95
97
|
selenium-webdriver (>= 3.0, < 4.0)
|
96
|
-
websocket-driver (0.7.
|
98
|
+
websocket-driver (0.7.3)
|
97
99
|
websocket-extensions (>= 0.1.0)
|
98
100
|
websocket-extensions (0.1.5)
|
99
101
|
xpath (3.2.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
|
@@ -36,11 +36,14 @@ module TestCentricity
|
|
36
36
|
attr_accessor :device_name
|
37
37
|
attr_accessor :device_type
|
38
38
|
attr_accessor :device_os
|
39
|
+
attr_accessor :device_os_version
|
39
40
|
attr_accessor :device_orientation
|
40
41
|
attr_accessor :platform
|
41
42
|
attr_accessor :driver
|
42
43
|
attr_accessor :grid
|
43
44
|
attr_accessor :tunneling
|
45
|
+
attr_accessor :locale
|
46
|
+
attr_accessor :language
|
44
47
|
|
45
48
|
attr_accessor :parallel
|
46
49
|
attr_accessor :process_num
|
@@ -58,8 +61,12 @@ module TestCentricity
|
|
58
61
|
attr_accessor :user_id
|
59
62
|
attr_accessor :password
|
60
63
|
attr_accessor :append
|
64
|
+
attr_accessor :app_id
|
65
|
+
attr_accessor :api_key
|
61
66
|
attr_accessor :option1
|
62
67
|
attr_accessor :option2
|
68
|
+
attr_accessor :option3
|
69
|
+
attr_accessor :option4
|
63
70
|
attr_accessor :dns
|
64
71
|
attr_accessor :db_username
|
65
72
|
attr_accessor :db_password
|
@@ -71,12 +78,18 @@ module TestCentricity
|
|
71
78
|
@user_id = data['USER_ID']
|
72
79
|
@password = data['PASSWORD']
|
73
80
|
@append = data['APPEND']
|
81
|
+
@app_id = data['APP_ID']
|
82
|
+
@api_key = data['API_KEY']
|
74
83
|
@option1 = data['OPTIONAL_1']
|
75
84
|
@option2 = data['OPTIONAL_2']
|
85
|
+
@option3 = data['OPTIONAL_3']
|
86
|
+
@option4 = data['OPTIONAL_4']
|
76
87
|
@dns = data['DNS']
|
77
88
|
@db_username = data['DB_USERNAME']
|
78
89
|
@db_password = data['DB_PASSWORD']
|
79
90
|
@a11y_standard = ENV['ACCESSIBILITY_STANDARD'] || 'best-practice'
|
91
|
+
@locale = ENV['LOCALE'] || 'en'
|
92
|
+
@language = ENV['LANGUAGE'] || 'English'
|
80
93
|
|
81
94
|
super
|
82
95
|
end
|
@@ -205,6 +218,14 @@ module TestCentricity
|
|
205
218
|
@device_os
|
206
219
|
end
|
207
220
|
|
221
|
+
def self.device_os_version=(version)
|
222
|
+
@device_os_version = version
|
223
|
+
end
|
224
|
+
|
225
|
+
def self.device_os_version
|
226
|
+
@device_os_version
|
227
|
+
end
|
228
|
+
|
208
229
|
def self.is_ios?
|
209
230
|
@device_os == :ios
|
210
231
|
end
|
@@ -245,6 +266,22 @@ module TestCentricity
|
|
245
266
|
@tunneling
|
246
267
|
end
|
247
268
|
|
269
|
+
def self.language=(language)
|
270
|
+
@language = language
|
271
|
+
end
|
272
|
+
|
273
|
+
def self.language
|
274
|
+
@language
|
275
|
+
end
|
276
|
+
|
277
|
+
def self.locale=(locale)
|
278
|
+
@locale = locale
|
279
|
+
end
|
280
|
+
|
281
|
+
def self.locale
|
282
|
+
@locale
|
283
|
+
end
|
284
|
+
|
248
285
|
def self.platform=(platform)
|
249
286
|
@platform = platform
|
250
287
|
end
|
@@ -305,13 +342,13 @@ module TestCentricity
|
|
305
342
|
report_header = "\n<b><u>TEST ENVIRONMENT</u>:</b> #{ENV['TEST_ENVIRONMENT']}\n"\
|
306
343
|
" <b>Browser:</b>\t #{Environ.browser.capitalize}\n"
|
307
344
|
report_header = "#{report_header} <b>Device:</b>\t\t #{Environ.device_name}\n" if Environ.device_name
|
308
|
-
report_header = "#{report_header} <b>Device OS:</b>\t #{Environ.device_os}\n" if Environ.device_os
|
345
|
+
report_header = "#{report_header} <b>Device OS:</b>\t #{Environ.device_os} #{Environ.device_os_version}\n" if Environ.device_os
|
309
346
|
report_header = "#{report_header} <b>Device type:</b>\t #{Environ.device_type}\n" if Environ.device_type
|
310
347
|
report_header = "#{report_header} <b>Driver:</b>\t\t #{Environ.driver}\n" if Environ.driver
|
311
348
|
report_header = "#{report_header} <b>Grid:</b>\t\t #{Environ.grid}\n" if Environ.grid
|
312
349
|
report_header = "#{report_header} <b>OS:</b>\t\t\t #{Environ.os}\n" if Environ.os
|
313
|
-
report_header = "#{report_header} <b>Locale:</b>\t\t #{
|
314
|
-
report_header = "#{report_header} <b>Language:</b>\t #{
|
350
|
+
report_header = "#{report_header} <b>Locale:</b>\t\t #{Environ.locale}\n" if Environ.locale
|
351
|
+
report_header = "#{report_header} <b>Language:</b>\t #{Environ.language}\n" if Environ.language
|
315
352
|
report_header = "#{report_header} <b>Country:</b>\t #{ENV['COUNTRY']}\n" if ENV['COUNTRY']
|
316
353
|
report_header = "#{report_header} <b>WCAG Accessibility Standard:</b>\t #{ENV['ACCESSIBILITY_STANDARD']}\n" if ENV['ACCESSIBILITY_STANDARD']
|
317
354
|
"#{report_header}\n\n"
|