jarib-celerity 0.0.5.7 → 0.0.5.8
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.
@@ -37,14 +37,21 @@ module Celerity
|
|
37
37
|
#
|
38
38
|
# @param [String, Regexp] value A value.
|
39
39
|
# @raise [Celerity::Exception::NoValueFoundException] if the value does not exist.
|
40
|
+
# @return [String, nil] The option selected. If multiple options match, returns the first match
|
41
|
+
#
|
40
42
|
#
|
41
43
|
|
42
44
|
def select(value)
|
43
45
|
assert_exists
|
44
46
|
raise NoValueFoundException, "unknown option with value #{value.inspect} for select_list #{@conditions.inspect}" unless include?(value)
|
47
|
+
|
48
|
+
selected = nil
|
45
49
|
@object.getOptions.select { |e| matches?(e.asText, value) }.each do |option|
|
50
|
+
selected ||= option.asText
|
46
51
|
@container.update_page option.click
|
47
52
|
end
|
53
|
+
|
54
|
+
selected
|
48
55
|
end
|
49
56
|
alias_method :set, :select
|
50
57
|
|
Binary file
|
Binary file
|
data/lib/celerity/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jarib-celerity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.5.
|
4
|
+
version: 0.0.5.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jari Bakken
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2009-02-
|
14
|
+
date: 2009-02-24 00:00:00 -08:00
|
15
15
|
default_executable:
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
@@ -80,7 +80,7 @@ files:
|
|
80
80
|
- lib/celerity/htmlunit/cssparser-0.9.5.jar
|
81
81
|
- lib/celerity/htmlunit/htmlunit-2.5-SNAPSHOT.jar
|
82
82
|
- lib/celerity/htmlunit/htmlunit-core-js-2.4.jar
|
83
|
-
- lib/celerity/htmlunit/nekohtml-1.9.
|
83
|
+
- lib/celerity/htmlunit/nekohtml-1.9.12-20090216.090710-7.jar
|
84
84
|
- lib/celerity/htmlunit/sac-1.3.jar
|
85
85
|
- lib/celerity/htmlunit/serializer-2.7.1.jar
|
86
86
|
- lib/celerity/htmlunit/xalan-2.7.1.jar
|