commonwatir 2.0.4 → 3.0.0.rc1

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.
data/CHANGES CHANGED
@@ -1,3 +1,44 @@
1
+ == 3.0.0 - 2012/01/13 - more conformance with WatirSpec
2
+
3
+ * Button#text returns value if exists instead of text
4
+ * Browser#goto prepends url automatically with http:// if scheme is missing
5
+ * Browser#element(s)_by_(xpath/css) are now private methods - use #element(:css => ...) and #element(:xpath => ...) instead
6
+ * Browser#label supports searching by :for attribute
7
+ * Browser#options method for searching <option> elements
8
+ * Browser#body, #thead, #tfoot, #tbody, #frameset and #fieldset added
9
+ * Browser#window and Browser#windows added implementing window switching API (https://github.com/jarib/watirspec/blob/master/window_switching_spec.rb)
10
+ * Element#present? returns false if exception is thrown by #exists? or #visible?
11
+ * Element#style returns CSS text instead of OLE object
12
+ * Element#text returns an empty string for non-visible elements
13
+ * Element#parent returns correct instance of Element class (e.g. Div instead of Element)
14
+ * Element#focus focuses document before focusing on the element
15
+ * Element#right_click and Element#double_click added
16
+ * Element#to_subtype added which returns specific instance of Watir::Element subclass
17
+ * Element#send_keys added
18
+ * Element#eql? as an alias for Element#== added
19
+ * Element#tag_name added
20
+ * ElementCollection#[] method supports negative indexes like regular Arrays
21
+ * ElementCollection#[] returns always an object, even if the index is out of bounds
22
+ * FileField#set and Image#save uses correct Windows file path (e.g. convert "\"-es into "/"-es)
23
+ * FileField#set raises Errno::ENOENT instead of WatirException if file doesn't exist
24
+ * FileField#value= as an alias for FileField#set added
25
+ * Font#color, #face and #size added
26
+ * Form#submit triggers onSubmit event and doesn't submit the form if event's callback returns false
27
+ * Frame#execute_script added
28
+ * Image#file_size, #height and #width return integer instead of a string
29
+ * Image#save blocking fixed
30
+ * Meta#content and #http_equiv added
31
+ * Option code rewritten, causing changes in its API
32
+ * SelectList code rewritten, causing changes in its API
33
+ * SelectList#(selected_)options returns now Options collection instead of an array of strings
34
+ * Table and its subelements code rewritten, causing changes in its API
35
+ * Table#strings and #hashes added
36
+ * TextField#label added
37
+ * searching elements will find only correct types - e.g. using Browser#div returns only DIV element even if all other provided selectors match
38
+ * all selectors and tag of the element needs to match even if searching by :id
39
+ * supporting html5 data-* attributes by using :data_* for locating and #data_* for retrieving attribute values
40
+ * many other internal changes
41
+
1
42
  == Version 2.0.4 - 2011/10/29
2
43
 
3
44
  * IE#execute_script escapes multi-line JavaScript scripts
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.4
1
+ 3.0.0.rc1
@@ -33,7 +33,7 @@ module Watir
33
33
  #
34
34
 
35
35
  def present?
36
- exists? && visible?
36
+ exists? && visible? rescue false
37
37
  end
38
38
 
39
39
  #
data/lib/watir/matches.rb CHANGED
@@ -15,3 +15,9 @@ class Integer
15
15
  return self == x
16
16
  end
17
17
  end
18
+
19
+ class Object
20
+ def matches(x)
21
+ raise TypeError, "#{self.class} is not supported as a locator"
22
+ end
23
+ end
data/lib/watir/options.rb CHANGED
@@ -22,11 +22,11 @@ module Watir
22
22
  # Return the Watir options, as a hash. If they haven't been parsed yet,
23
23
  # they will be now.
24
24
  def options
25
- @@options ||= Watir::Options.new.execute
25
+ @@options ||= Watir::WatirOptions.new.execute
26
26
  end
27
27
  end
28
28
 
29
- class Options < UserChoices::Command
29
+ class WatirOptions < UserChoices::Command
30
30
  include UserChoices
31
31
  def add_sources builder
32
32
  builder.add_source EnvironmentSource, :with_prefix, 'watir_'
metadata CHANGED
@@ -1,13 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commonwatir
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
5
- prerelease:
4
+ hash: 15424119
5
+ prerelease: 6
6
6
  segments:
7
- - 2
7
+ - 3
8
8
  - 0
9
- - 4
10
- version: 2.0.4
9
+ - 0
10
+ - rc
11
+ - 1
12
+ version: 3.0.0.rc1
11
13
  platform: ruby
12
14
  authors:
13
15
  - Bret Pettichord
@@ -15,7 +17,7 @@ autorequire:
15
17
  bindir: bin
16
18
  cert_chain: []
17
19
 
18
- date: 2011-10-28 00:00:00 Z
20
+ date: 2012-01-13 00:00:00 Z
19
21
  dependencies:
20
22
  - !ruby/object:Gem::Dependency
21
23
  name: user-choices
@@ -123,12 +125,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
123
125
  required_rubygems_version: !ruby/object:Gem::Requirement
124
126
  none: false
125
127
  requirements:
126
- - - ">="
128
+ - - ">"
127
129
  - !ruby/object:Gem::Version
128
- hash: 3
130
+ hash: 25
129
131
  segments:
130
- - 0
131
- version: "0"
132
+ - 1
133
+ - 3
134
+ - 1
135
+ version: 1.3.1
132
136
  requirements: []
133
137
 
134
138
  rubyforge_project: wtr