watir_robot 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +2 -0
- data/lib/watir_robot/keywords/form.rb +23 -1
- data/lib/watir_robot/parser.rb +3 -1
- data/watir_robot.gemspec +2 -2
- metadata +4 -4
data/CHANGELOG
CHANGED
@@ -49,6 +49,28 @@ module WatirRobot
|
|
49
49
|
@browser.form(parse_location(form_loc)).checkbox(parse_location(field_loc)).exists?
|
50
50
|
end
|
51
51
|
|
52
|
+
#
|
53
|
+
# Verify that a form contains a specific element
|
54
|
+
#
|
55
|
+
# @param [String] form_loc attribute/value pairs that match an HTML element
|
56
|
+
# @param [String] field_loc attribute/value pairs that match an HTML element
|
57
|
+
#
|
58
|
+
def form_should_contain_element(form_loc, field_loc)
|
59
|
+
raise(Exception::ElementMatchError, "The element described by #{field_loc} was not located in the form described by #{form_loc}.") unless
|
60
|
+
@browser.form(parse_location(form_loc)).checkbox(parse_location(field_loc)).exists?
|
61
|
+
end
|
62
|
+
|
63
|
+
#
|
64
|
+
# Verify that a form does not contain a specific element
|
65
|
+
#
|
66
|
+
# @param [String] form_loc attribute/value pairs that match an HTML element
|
67
|
+
# @param [String] field_loc attribute/value pairs that match an HTML element
|
68
|
+
#
|
69
|
+
def form_should_not_contain_element(form_loc, field_loc)
|
70
|
+
raise(Exception::ElementMatchError, "The element described by #{field_loc} was erroneously located in the form described by #{form_loc}.") if
|
71
|
+
@browser.form(parse_location(form_loc)).checkbox(parse_location(field_loc)).exists?
|
72
|
+
end
|
73
|
+
|
52
74
|
#
|
53
75
|
# Verify that a form contains a specific file-field
|
54
76
|
#
|
@@ -139,4 +161,4 @@ module WatirRobot
|
|
139
161
|
|
140
162
|
end
|
141
163
|
|
142
|
-
end
|
164
|
+
end
|
data/lib/watir_robot/parser.rb
CHANGED
@@ -121,6 +121,8 @@ module WatirRobot
|
|
121
121
|
return {:css => loc[4..loc.length]}
|
122
122
|
elsif loc[0..5].downcase == 'xpath='
|
123
123
|
return {:xpath => loc[6..loc.length]}
|
124
|
+
elsif !loc.include? '='
|
125
|
+
return {:id => loc}
|
124
126
|
else
|
125
127
|
# Comma-separated attributes
|
126
128
|
attr_list = loc.split(',')
|
@@ -172,4 +174,4 @@ module WatirRobot
|
|
172
174
|
|
173
175
|
end
|
174
176
|
|
175
|
-
end
|
177
|
+
end
|
data/watir_robot.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{watir_robot}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.8"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Daniel Gregoire"]
|
9
|
-
s.date = %q{2011-03-
|
9
|
+
s.date = %q{2011-03-04}
|
10
10
|
s.description = %q{Watir Robot - Remote keyword library for Robot Framework}
|
11
11
|
s.email = %q{}
|
12
12
|
s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README.rdoc", "lib/watir_robot.rb", "lib/watir_robot/exception.rb", "lib/watir_robot/keywords/area.rb", "lib/watir_robot/keywords/browser.rb", "lib/watir_robot/keywords/button.rb", "lib/watir_robot/keywords/checkbox.rb", "lib/watir_robot/keywords/element.rb", "lib/watir_robot/keywords/file_field.rb", "lib/watir_robot/keywords/form.rb", "lib/watir_robot/keywords/image.rb", "lib/watir_robot/keywords/link.rb", "lib/watir_robot/keywords/list.rb", "lib/watir_robot/keywords/native.rb", "lib/watir_robot/keywords/page.rb", "lib/watir_robot/keywords/radio.rb", "lib/watir_robot/keywords/select.rb", "lib/watir_robot/keywords/table.rb", "lib/watir_robot/keywords/text_field.rb", "lib/watir_robot/parser.rb"]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: watir_robot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 8
|
10
|
+
version: 0.1.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Daniel Gregoire
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-03-
|
18
|
+
date: 2011-03-04 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|