testcentricity_web 3.0.14 → 3.0.15
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 +6 -0
- data/Gemfile.lock +3 -3
- data/README.md +12 -9
- data/lib/testcentricity_web/version.rb +1 -1
- data/lib/testcentricity_web/web_core/webdriver_helper.rb +1 -0
- data/lib/testcentricity_web/web_elements/ui_elements_helper.rb +19 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f45bd2fe6c901c8d3e0409f9e2840347a0eea1e3
|
4
|
+
data.tar.gz: 445b57defbb02ff5fa3c15d2afdd255ac77cd1b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35159fd12f89b212b21bdbdb638775dd9ed73eb1440a8752a8f36c09f39037475b95e349988635b4ddd90b6839074c631fdf8940b5d067b81a27b36d43f4c701
|
7
|
+
data.tar.gz: ce6f61a344de88fc0af06ae2d8ce50af8d77cc55835bd71fe47a829a2262091dc4ac7c71a923510d39a69f7a9445f4cd3065f5bc03b4360924f80d8efc2efca4
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
## [3.0.15] - 2018-09-19
|
5
|
+
|
6
|
+
### Added
|
7
|
+
* `UIElement.hover_at` method.
|
8
|
+
* Added support for specifying IP Geolocation when testing on BrowserStack cloud hosted browsers.
|
9
|
+
|
4
10
|
## [3.0.14] - 2018-09-17
|
5
11
|
|
6
12
|
### Added
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
testcentricity_web (3.0.
|
4
|
+
testcentricity_web (3.0.14)
|
5
5
|
appium_lib
|
6
6
|
browserstack-local
|
7
7
|
capybara (>= 3.1, < 4)
|
@@ -70,7 +70,7 @@ GEM
|
|
70
70
|
test-unit (3.2.8)
|
71
71
|
power_assert
|
72
72
|
tomlrb (1.2.7)
|
73
|
-
webdrivers (3.
|
73
|
+
webdrivers (3.4.1)
|
74
74
|
nokogiri (~> 1.6)
|
75
75
|
rubyzip (~> 1.0)
|
76
76
|
selenium-webdriver (~> 3.0)
|
@@ -90,4 +90,4 @@ DEPENDENCIES
|
|
90
90
|
testcentricity_web!
|
91
91
|
|
92
92
|
BUNDLED WITH
|
93
|
-
1.16.
|
93
|
+
1.16.4
|
data/README.md
CHANGED
@@ -465,6 +465,7 @@ With TestCentricity, all UI elements are based on the **UIElement** class, and i
|
|
465
465
|
element.right_click
|
466
466
|
element.click_at(x, y)
|
467
467
|
element.hover
|
468
|
+
element.hover_at(x, y)
|
468
469
|
element.drag_by(right_offset, down_offset)
|
469
470
|
element.drag_and_drop(target, right_offset, down_offset)
|
470
471
|
|
@@ -477,6 +478,7 @@ With TestCentricity, all UI elements are based on the **UIElement** class, and i
|
|
477
478
|
element.disabled?
|
478
479
|
element.displayed?
|
479
480
|
element.get_value
|
481
|
+
element.count
|
480
482
|
element.width
|
481
483
|
element.height
|
482
484
|
element.x
|
@@ -578,17 +580,17 @@ navigated to by clicking associated links. One such Cucumber navigation scenario
|
|
578
580
|
|
579
581
|
Scenario Outline: Verify Home page navigation links
|
580
582
|
Given I am on the Home page
|
581
|
-
When I click the <
|
582
|
-
Then I expect the <
|
583
|
+
When I click the <page_name> navigation link
|
584
|
+
Then I expect the <page_name> page to be correctly displayed
|
583
585
|
|
584
586
|
Examples:
|
585
|
-
|
|
586
|
-
|Registration
|
587
|
-
|My Account
|
588
|
-
|Terms & Conditions
|
589
|
-
|Privacy Policy
|
590
|
-
|FAQs
|
591
|
-
|Contact Us
|
587
|
+
|page_name |
|
588
|
+
|Registration |
|
589
|
+
|My Account |
|
590
|
+
|Terms & Conditions |
|
591
|
+
|Privacy Policy |
|
592
|
+
|FAQs |
|
593
|
+
|Contact Us |
|
592
594
|
|
593
595
|
In the above example, the step definitions associated with the 3 steps might be implemented using a `page_dispatcher` method using a
|
594
596
|
`case` statement to parse the `page` parameter as in the example below:
|
@@ -896,6 +898,7 @@ for information regarding the specific capabilities.
|
|
896
898
|
`ORIENTATION` | [Optional] Set to `portrait` or `landscape`
|
897
899
|
`RECORD_VIDEO` | [Optional] Enable screen video recording during test execution (`true` or `false`)
|
898
900
|
`TIME_ZONE` | [Optional] Specify custom time zone. Refer to `browserstack.timezone` capability in chart
|
901
|
+
`IP_GEOLOCATION` | [Optional] Specify IP Geolocation. Refer to [IP Geolocation](https://www.browserstack.com/automate/ip-geolocation) to select a country code.
|
899
902
|
`CONSOLE_LOGS` | [Optional] Used to capture browser console logs. Refer to `browserstack.console` capability in chart
|
900
903
|
|
901
904
|
|
@@ -267,6 +267,7 @@ module TestCentricity
|
|
267
267
|
capabilities['browserstack.selenium_version'] = ENV['SELENIUM_VERSION'] if ENV['SELENIUM_VERSION']
|
268
268
|
capabilities['browserstack.console'] = ENV['CONSOLE_LOGS'] if ENV['CONSOLE_LOGS']
|
269
269
|
capabilities['browserstack.timezone'] = ENV['TIME_ZONE'] if ENV['TIME_ZONE']
|
270
|
+
capabilities['browserstack.geoLocation'] = ENV['IP_GEOLOCATION'] if ENV['IP_GEOLOCATION']
|
270
271
|
capabilities['browserstack.video'] = ENV['RECORD_VIDEO'] if ENV['RECORD_VIDEO']
|
271
272
|
capabilities['browserstack.debug'] = 'true'
|
272
273
|
capabilities['project'] = ENV['AUTOMATE_PROJECT'] if ENV['AUTOMATE_PROJECT']
|
@@ -9,6 +9,12 @@ Capybara::Node::Element.class_eval do
|
|
9
9
|
driver.browser.action.move_to(native).move_by(right.to_i, top.to_i).click.perform
|
10
10
|
end
|
11
11
|
|
12
|
+
def hover_at(x, y)
|
13
|
+
right = x - (native.size.width / 2)
|
14
|
+
top = y - (native.size.height / 2)
|
15
|
+
driver.browser.action.move_to(native).move_by(right.to_i, top.to_i).perform
|
16
|
+
end
|
17
|
+
|
12
18
|
def get_width
|
13
19
|
native.size.width
|
14
20
|
end
|
@@ -472,6 +478,19 @@ module TestCentricity
|
|
472
478
|
obj.hover
|
473
479
|
end
|
474
480
|
|
481
|
+
# Hover at a specific location within an object
|
482
|
+
#
|
483
|
+
# @param x [Integer] X offset
|
484
|
+
# @param y [Integer] Y offset
|
485
|
+
# @example
|
486
|
+
# timeline_bar.hover_at(100, 5)
|
487
|
+
#
|
488
|
+
def hover_at(x, y)
|
489
|
+
obj, = find_element
|
490
|
+
raise "UI #{object_ref_message} not found" unless obj
|
491
|
+
obj.hover_at(x, y)
|
492
|
+
end
|
493
|
+
|
475
494
|
def drag_by(right_offset, down_offset)
|
476
495
|
obj, type = find_element
|
477
496
|
object_not_found_exception(obj, type)
|