testcentricity_web 0.8.6 → 0.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/testcentricity_web/elements/select_list.rb +14 -6
- data/lib/testcentricity_web/elements/textfield.rb +12 -0
- data/lib/testcentricity_web/page_objects_helper.rb +2 -0
- data/lib/testcentricity_web/page_sections_helper.rb +2 -0
- data/lib/testcentricity_web/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fa1311e296cf791b910409f84158f864898f0ef
|
4
|
+
data.tar.gz: 60c52b240c5d0391e674476ea82aa25ed589f355
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2912afd0fcae3d084304fd388516d8f49c2e5b9ad9d0054e69b052843b96ef3bd2e77e18c7ece153bd242c753ada9e8680a6d3155ae4f084c2496c0e095e569
|
7
|
+
data.tar.gz: 15961c490a34bcce68efd0b958b2336168d111d801513b3e2976715ab33ca97461c327c86bf8ff1286eaf45f039fdc8ebeb4ff0390046166560a9b9a3811595c
|
@@ -36,14 +36,10 @@ module TestCentricity
|
|
36
36
|
else
|
37
37
|
if option.is_a?(Array)
|
38
38
|
option.each do |item|
|
39
|
-
obj
|
39
|
+
select_item(obj, item)
|
40
40
|
end
|
41
|
-
elsif option.is_a?(Hash)
|
42
|
-
obj.find("option[value='#{option[:value]}']").click if option.has_key?(:value)
|
43
|
-
obj.find(:xpath, "option[#{option[:index]}]").select_option if option.has_key?(:index)
|
44
|
-
obj.select option[:text] if option.has_key?(:text)
|
45
41
|
else
|
46
|
-
obj
|
42
|
+
select_item(obj, option)
|
47
43
|
end
|
48
44
|
end
|
49
45
|
end
|
@@ -126,5 +122,17 @@ module TestCentricity
|
|
126
122
|
obj, _ = find_element
|
127
123
|
obj.native.send_keys(:escape)
|
128
124
|
end
|
125
|
+
|
126
|
+
private
|
127
|
+
|
128
|
+
def select_item(obj, option)
|
129
|
+
if option.is_a?(Hash)
|
130
|
+
obj.find("option[value='#{option[:value]}']").click if option.has_key?(:value)
|
131
|
+
obj.find(:xpath, "option[#{option[:index]}]").select_option if option.has_key?(:index)
|
132
|
+
obj.select option[:text] if option.has_key?(:text)
|
133
|
+
else
|
134
|
+
obj.select option
|
135
|
+
end
|
136
|
+
end
|
129
137
|
end
|
130
138
|
end
|
@@ -32,4 +32,16 @@ module TestCentricity
|
|
32
32
|
object_not_found_exception(obj, nil)
|
33
33
|
obj.native.attribute('maxlength')
|
34
34
|
end
|
35
|
+
|
36
|
+
# Return placeholder text of a text field.
|
37
|
+
#
|
38
|
+
# @return [String]
|
39
|
+
# @example
|
40
|
+
# placeholder_message = username_field.get_placeholder
|
41
|
+
#
|
42
|
+
def get_placeholder
|
43
|
+
obj, _ = find_element
|
44
|
+
object_not_found_exception(obj, nil)
|
45
|
+
obj.native.attribute('placeholder')
|
46
|
+
end
|
35
47
|
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: 0.8.
|
4
|
+
version: 0.8.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: 2016-
|
11
|
+
date: 2016-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|