testcentricity_web 2.3.6.2 → 2.3.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 92d640aae9a0a6c86733e83139a6c9e155eb0540
4
- data.tar.gz: efe95863b31b6af2020cac7aadfdc70b09bc1e01
3
+ metadata.gz: 0c12b8ca36bc5fddd9b209660074deb5fc29ab11
4
+ data.tar.gz: 14357ca8e24978ab748a4bb19ace803aa72ae35a
5
5
  SHA512:
6
- metadata.gz: b0d6dfe7fe89e33df97cdf5c5a02369dbf30b8a3cab1d77bbedff39f102f0235b939a9fb31ce8dc28183265933a5df640b0849c9fa66876ead7982654dbca188
7
- data.tar.gz: 5bb5ac6fb56f4329474d6750c4892e0b2041f421b3a9f6a37527837c29c0c27d8db8d9db41f9ff171c71c35ef263a86f92f5c57f44be892f383a675405e64c2a
6
+ metadata.gz: f51aac93d58018823d016edb616ff5ecb6837cc73a6cfe285b04016c83ea12627d1a7a6be33667a0338d88564faea912ab9fe709bbe3df03da8daa8e4c04087e
7
+ data.tar.gz: 052516e71ff0b3b777e3fa6109ae01936133d7136f4f60dd30c1c3b40d0c27ae8da4876197c669f0e44905afc6331df1b4c5798060f60e88eebba4c21228c1d4
data/README.md CHANGED
@@ -27,6 +27,10 @@ hosted instances of Chrome, Firefox, Safari, and IE web browsers.
27
27
 
28
28
 
29
29
  ## What's New
30
+ ###Version 2.3.7
31
+
32
+ * Added `width`, `height`, `x`, `y`, and `displayed?` methods to `UIElement` class.
33
+
30
34
  ###Version 2.3.6
31
35
 
32
36
  * Added `TextField.clear` method for deleting the contents of text fields. This method should trigger the `onchange` event for the associated text field.
@@ -596,7 +600,12 @@ With TestCentricity, all UI elements are based on the **UIElement** class, and i
596
600
  element.hidden?
597
601
  element.enabled?
598
602
  element.disabled?
603
+ element.displayed?
599
604
  element.get_value
605
+ element.width
606
+ element.height
607
+ element.x
608
+ element.y
600
609
  element.get_attribute(attrib)
601
610
  element.get_native_attribute(attrib)
602
611
 
@@ -1235,10 +1244,11 @@ service(s) that you intend to connect with.
1235
1244
 
1236
1245
  # BrowserStack iOS real device mobile browser profiles
1237
1246
  bs_iphone_device: --profile bs_iphone BS_REAL_MOBILE="true"
1247
+ bs_iphoneX: --profile bs_iphone_device BS_OS_VERSION="11.0" BS_DEVICE="iPhone X"
1238
1248
  bs_iphone8_plus: --profile bs_iphone_device BS_OS_VERSION="11.0" BS_DEVICE="iPhone 8 Plus"
1239
1249
  bs_iphone8: --profile bs_iphone_device BS_OS_VERSION="11.0" BS_DEVICE="iPhone 8"
1240
- bs_iphone7_plus: --profile bs_iphone_device BS_OS_VERSION="10.0" BS_DEVICE="iPhone 7 Plus"
1241
- bs_iphone7: --profile bs_iphone_device BS_OS_VERSION="10.0" BS_DEVICE="iPhone 7"
1250
+ bs_iphone7_plus: --profile bs_iphone_device BS_OS_VERSION="10.3" BS_DEVICE="iPhone 7 Plus"
1251
+ bs_iphone7: --profile bs_iphone_device BS_OS_VERSION="10.3" BS_DEVICE="iPhone 7"
1242
1252
 
1243
1253
  bs_ipad_device: --profile bs_ipad BS_REAL_MOBILE="true"
1244
1254
  bs_ipad5: --profile bs_ipad_device BS_OS_VERSION="11.0" BS_DEVICE="iPad 5th"
@@ -77,7 +77,7 @@
77
77
  :css_width: 375
78
78
  :css_height: 667
79
79
  :default_orientation: portrait
80
- :user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.0 EdgiOS/41.6.0.0 Mobile/14G60 Safari/603.3.8"
80
+ :user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.0 EdgiOS/41.8.0.0 Mobile/14G60 Safari/603.3.8"
81
81
  :iphone8:
82
82
  :name: "iPhone 8"
83
83
  :os: ios
@@ -484,10 +484,16 @@ module TestCentricity
484
484
  actual = ui_object.visible?
485
485
  when :hidden
486
486
  actual = ui_object.hidden?
487
+ when :displayed
488
+ actual = ui_object.displayed?
487
489
  when :width
488
- actual = ui_object.get_width
490
+ actual = ui_object.width
489
491
  when :height
490
- actual = ui_object.get_height
492
+ actual = ui_object.height
493
+ when :x
494
+ actual = ui_object.x
495
+ when :y
496
+ actual = ui_object.y
491
497
  when :readonly
492
498
  actual = ui_object.read_only?
493
499
  when :checked
@@ -512,9 +512,9 @@ module TestCentricity
512
512
  # bar_chart_section.disabled?
513
513
  #
514
514
  def disabled?
515
- obj, = find_element
516
- object_not_found_exception(obj, nil)
517
- obj.disabled?
515
+ section, = find_section
516
+ raise "Section object '#{get_name}' (#{get_locator}) not found" unless section
517
+ section.disabled?
518
518
  end
519
519
 
520
520
  # Is Section object visible?
@@ -627,10 +627,16 @@ module TestCentricity
627
627
  actual = ui_object.visible?
628
628
  when :hidden
629
629
  actual = ui_object.hidden?
630
+ when :displayed
631
+ actual = ui_object.displayed?
630
632
  when :width
631
- actual = ui_object.get_width
633
+ actual = ui_object.width
632
634
  when :height
633
- actual = ui_object.get_height
635
+ actual = ui_object.height
636
+ when :x
637
+ actual = ui_object.x
638
+ when :y
639
+ actual = ui_object.y
634
640
  when :readonly
635
641
  actual = ui_object.read_only?
636
642
  when :checked
@@ -14,6 +14,18 @@ Capybara::Node::Element.class_eval do
14
14
  def get_height
15
15
  native.size.height
16
16
  end
17
+
18
+ def get_x
19
+ native.location.x
20
+ end
21
+
22
+ def get_y
23
+ native.location.y
24
+ end
25
+
26
+ def displayed?
27
+ native.displayed?
28
+ end
17
29
  end
18
30
 
19
31
 
@@ -307,6 +319,66 @@ module TestCentricity
307
319
  raise "Value of UI #{object_ref_message} failed to change from '#{value}' after #{timeout} seconds" if get_value == value
308
320
  end
309
321
 
322
+ # Return width of object.
323
+ #
324
+ # @return [Integer]
325
+ # @example
326
+ # button_width = my_button.width
327
+ #
328
+ def width
329
+ obj, type = find_element(false)
330
+ object_not_found_exception(obj, type)
331
+ obj.get_width
332
+ end
333
+
334
+ # Return height of object.
335
+ #
336
+ # @return [Integer]
337
+ # @example
338
+ # button_height = my_button.height
339
+ #
340
+ def height
341
+ obj, type = find_element(false)
342
+ object_not_found_exception(obj, type)
343
+ obj.get_height
344
+ end
345
+
346
+ # Return x coordinate of object's location.
347
+ #
348
+ # @return [Integer]
349
+ # @example
350
+ # button_x = my_button.x
351
+ #
352
+ def x
353
+ obj, type = find_element(false)
354
+ object_not_found_exception(obj, type)
355
+ obj.get_x
356
+ end
357
+
358
+ # Return y coordinate of object's location.
359
+ #
360
+ # @return [Integer]
361
+ # @example
362
+ # button_y = my_button.y
363
+ #
364
+ def y
365
+ obj, type = find_element(false)
366
+ object_not_found_exception(obj, type)
367
+ obj.get_y
368
+ end
369
+
370
+ # Is UI object displayed in browser window?
371
+ #
372
+ # @return [Boolean]
373
+ # @example
374
+ # basket_link.displayed??
375
+ #
376
+ def displayed?
377
+ obj, type = find_element(false)
378
+ object_not_found_exception(obj, type)
379
+ obj.displayed?
380
+ end
381
+
310
382
  def get_value(visible = true)
311
383
  obj, type = find_element(visible)
312
384
  object_not_found_exception(obj, type)
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '2.3.6.2'
2
+ VERSION = '2.3.7'
3
3
  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: 2.3.6.2
4
+ version: 2.3.7
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: 2018-01-01 00:00:00.000000000 Z
11
+ date: 2018-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler