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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 065efc5a65b07d6384a095d926f80038f1793dda
4
- data.tar.gz: 7b0de3bfb436068551d23134c6d14a50658ae20e
3
+ metadata.gz: f45bd2fe6c901c8d3e0409f9e2840347a0eea1e3
4
+ data.tar.gz: 445b57defbb02ff5fa3c15d2afdd255ac77cd1b3
5
5
  SHA512:
6
- metadata.gz: 77c5c4b60f2ac9895874f84078ea77c561e50ed3541bc4c3dd2394571fc8cbc4b56d61e0f1821d036a326b37643c76012f1546d40cb8aed14bfb0250e9a2cb94
7
- data.tar.gz: d81f96ba971e9f7bce3864996d06d10b2662fff119f7479877eb5abcc2cb5fe4f0b64157ff467853b8d308374c5b7b9f315622cd9db4ba7b8583381d23ae4d2f
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.13.1)
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.3.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.2
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 <page> navigation link
582
- Then I expect the <page> page to be correctly displayed
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
- |page |
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
 
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '3.0.14'
2
+ VERSION = '3.0.15'
3
3
  end
@@ -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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testcentricity_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.14
4
+ version: 3.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - A.J. Mrozinski