testcentricity_web 2.3.15.1 → 2.3.16
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68595e3bcab28823d4fe64782abec19ff6419740
|
4
|
+
data.tar.gz: fe8e3d045f00f1736a5fc7f3456ce474410b2183
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d503a58934422dec74065e8cb9bf4707f4d0beb695e0253cbede76c26cd5a755c51021d0e76e1caef8f03983f5b8976c4b24d90dab9ec5ccffd8aee1a7d963d
|
7
|
+
data.tar.gz: c6a71f6edd10a03e6e130640316f247c7f208e6aff571727623d58d6fe176204288c57d88a2c3bb8d8c14acda86758c8265d99efb133875c481b58262802b56f
|
data/README.md
CHANGED
@@ -28,6 +28,10 @@ hosted instances of Chrome, Firefox, Safari, and IE web browsers.
|
|
28
28
|
|
29
29
|
|
30
30
|
## What's New
|
31
|
+
###Version 2.3.16
|
32
|
+
|
33
|
+
* Added `PageSection.double_click`, `PageObject.right_click`, and `PageObject.send_keys` methods.
|
34
|
+
|
31
35
|
###Version 2.3.15
|
32
36
|
|
33
37
|
* Added `PageObject.wait_until_exists` and `PageObject.wait_until_gone` methods.
|
@@ -527,7 +527,7 @@ module TestCentricity
|
|
527
527
|
#
|
528
528
|
def disabled?
|
529
529
|
section, = find_section
|
530
|
-
|
530
|
+
section_not_found_exception(section)
|
531
531
|
section.disabled?
|
532
532
|
end
|
533
533
|
|
@@ -564,7 +564,7 @@ module TestCentricity
|
|
564
564
|
#
|
565
565
|
def displayed?
|
566
566
|
section, = find_section
|
567
|
-
|
567
|
+
section_not_found_exception(section)
|
568
568
|
section.displayed?
|
569
569
|
end
|
570
570
|
|
@@ -628,6 +628,43 @@ module TestCentricity
|
|
628
628
|
raise "Section object '#{get_name}' (#{get_locator}) remained visible after #{timeout} seconds" if visible?
|
629
629
|
end
|
630
630
|
|
631
|
+
# Click on a Section object
|
632
|
+
#
|
633
|
+
# @example
|
634
|
+
# bar_chart_section.click
|
635
|
+
#
|
636
|
+
def click
|
637
|
+
section, = find_section
|
638
|
+
section_not_found_exception(section)
|
639
|
+
begin
|
640
|
+
section.click
|
641
|
+
rescue
|
642
|
+
section.click_at(10, 10) unless Capybara.current_driver == :poltergeist
|
643
|
+
end
|
644
|
+
end
|
645
|
+
|
646
|
+
# Double-click on a Section object
|
647
|
+
#
|
648
|
+
# @example
|
649
|
+
# bar_chart_section.double_click
|
650
|
+
#
|
651
|
+
def double_click
|
652
|
+
section, = find_section
|
653
|
+
section_not_found_exception(section)
|
654
|
+
page.driver.browser.action.double_click(section.native).perform
|
655
|
+
end
|
656
|
+
|
657
|
+
# Right-click on a Section object
|
658
|
+
#
|
659
|
+
# @example
|
660
|
+
# bar_chart_section.right_click
|
661
|
+
#
|
662
|
+
def right_click
|
663
|
+
section, = find_section
|
664
|
+
section_not_found_exception(section)
|
665
|
+
page.driver.browser.action.context_click(section.native).perform
|
666
|
+
end
|
667
|
+
|
631
668
|
# Click at a specific location within a Section object
|
632
669
|
#
|
633
670
|
# @param x [Integer] X offset
|
@@ -637,10 +674,22 @@ module TestCentricity
|
|
637
674
|
#
|
638
675
|
def click_at(x, y)
|
639
676
|
section, = find_section
|
640
|
-
|
677
|
+
section_not_found_exception(section)
|
641
678
|
section.click_at(x, y)
|
642
679
|
end
|
643
680
|
|
681
|
+
# Send keystrokes to a Section object
|
682
|
+
#
|
683
|
+
# @param keys [String] keys
|
684
|
+
# @example
|
685
|
+
# bar_chart_section.send_keys(:enter)
|
686
|
+
#
|
687
|
+
def send_keys(*keys)
|
688
|
+
section, = find_section
|
689
|
+
section_not_found_exception(section)
|
690
|
+
section.send_keys(*keys)
|
691
|
+
end
|
692
|
+
|
644
693
|
def verify_ui_states(ui_states)
|
645
694
|
ui_states.each do |ui_object, object_states|
|
646
695
|
object_states.each do |property, state|
|
@@ -845,13 +894,13 @@ module TestCentricity
|
|
845
894
|
|
846
895
|
def get_attribute(attrib)
|
847
896
|
section, = find_section
|
848
|
-
|
897
|
+
section_not_found_exception(section)
|
849
898
|
section[attrib]
|
850
899
|
end
|
851
900
|
|
852
901
|
def get_native_attribute(attrib)
|
853
902
|
section, = find_section
|
854
|
-
|
903
|
+
section_not_found_exception(section)
|
855
904
|
section.native.attribute(attrib)
|
856
905
|
end
|
857
906
|
|
@@ -865,5 +914,10 @@ module TestCentricity
|
|
865
914
|
rescue
|
866
915
|
[nil, nil]
|
867
916
|
end
|
917
|
+
|
918
|
+
def section_not_found_exception(section)
|
919
|
+
raise ObjectNotFoundError.new("Section object '#{get_name}' (#{get_locator}) not found") unless section
|
920
|
+
end
|
921
|
+
|
868
922
|
end
|
869
923
|
end
|
@@ -480,7 +480,7 @@ module TestCentricity
|
|
480
480
|
def object_not_found_exception(obj, obj_type)
|
481
481
|
@alt_locator.nil? ? locator = @locator : locator = @alt_locator
|
482
482
|
obj_type.nil? ? object_type = 'Object' : object_type = obj_type
|
483
|
-
raise ObjectNotFoundError("#{object_type} named '#{@name}' (#{locator}) not found") unless obj
|
483
|
+
raise ObjectNotFoundError.new("#{object_type} named '#{@name}' (#{locator}) not found") unless obj
|
484
484
|
end
|
485
485
|
|
486
486
|
def invalid_object_type_exception(obj, obj_type)
|
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.
|
4
|
+
version: 2.3.16
|
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-03-
|
11
|
+
date: 2018-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|