watir-classic 3.6.0 → 3.7.0

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: 3fade9f7ab5eddd5282759d5e6fad042ba20505a
4
- data.tar.gz: b5877f740e2e7cba0702f02a6b168e3bbecc98f1
3
+ metadata.gz: 73e938bbd43dbc55379ce36d3fc826bb636a65d4
4
+ data.tar.gz: b9894a14322b0077c26cbfd1d729966f3a355e78
5
5
  SHA512:
6
- metadata.gz: 1556009c313738b71cfdeacfe325ebb5eb1a2a84eb29cf8a919f2852007118e2fd522657a7c3cfc4646571e481117df3aa3b9d349f1746f6f15ecdd2bd86d15d
7
- data.tar.gz: 8ce619e8d51e9f190fdf58a0afaa51bbb366a461c88172e0a320dae9b240790ee7f22e900f745fc13b7702503354fa421e0a633c456f7b8830ea4f2d9d9e834d
6
+ metadata.gz: b04aa3fde25905e96a31297f6de93dad85618c8a3aef68801ba02c234c9eb44650471355342c349625473cf736f074acc23db1ac8de4d6d74063f031f549d259
7
+ data.tar.gz: cde4f06da44866e0890e618b91c9e555c7895cfd27d2ae146ccb28ccc8607859d505413ae4a7b43956f01789624f9429ffc4587af8ab0db7ea85d88628147047
data/CHANGES CHANGED
@@ -1,3 +1,8 @@
1
+ == 3.7.0 - 2013/05/10
2
+
3
+ * Add #required? method for input elements.
4
+ * Improve the stability of drag and drop methods.
5
+
1
6
  == 3.6.0 - 2013/03/16
2
7
 
3
8
  * Add full support for Ruby 2.0 and IE10.
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- watir-classic (3.5.0)
4
+ watir-classic (3.7.0)
5
5
  ffi (~> 1.0)
6
6
  multi_json
7
- nokogiri (= 1.5.7.rc3)
7
+ nokogiri (>= 1.5.7.rc3)
8
8
  rautomation (~> 0.7)
9
9
  user-choices
10
10
  win32-process (>= 0.5.5)
@@ -18,18 +18,17 @@ GEM
18
18
  childprocess (0.3.9)
19
19
  ffi (~> 1.0, >= 1.0.11)
20
20
  diff-lcs (1.2.1)
21
- ffi (1.4.0)
22
- ffi (1.4.0-x86-mingw32)
21
+ ffi (1.8.1-x86-mingw32)
23
22
  hoe (3.5.1)
24
23
  rake (>= 0.8, < 11.0)
25
24
  mini_magick (3.5.0)
26
25
  subexec (~> 0.2.1)
27
- multi_json (1.6.1)
26
+ multi_json (1.7.2)
28
27
  nokogiri (1.5.7.rc3-x86-mingw32)
29
28
  rack (1.5.2)
30
29
  rack-protection (1.4.0)
31
30
  rack
32
- rake (10.0.3)
31
+ rake (10.0.4)
33
32
  rautomation (0.8.0)
34
33
  ffi
35
34
  rspec (2.13.0)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.6.0
1
+ 3.7.0
@@ -54,7 +54,10 @@ module Watir
54
54
  end
55
55
 
56
56
  def source_x_y_relative
57
- center_x_y_absolute left_edge, top_edge
57
+ document_element = ole_object.document.documentElement
58
+ x = left_edge + document_element.scrollLeft - ole_object.offsetWidth
59
+ y = top_edge + document_element.scrollTop - ole_object.offsetHeight
60
+ center_x_y_absolute x, y
58
61
  end
59
62
 
60
63
  def assert_target(target)
@@ -63,7 +66,7 @@ module Watir
63
66
  end
64
67
 
65
68
  def top_edge
66
- ole_object.getBoundingClientRect(0).top.to_i
69
+ bounding_client_rect(:top)
67
70
  end
68
71
 
69
72
  def top_edge_absolute
@@ -71,7 +74,7 @@ module Watir
71
74
  end
72
75
 
73
76
  def left_edge
74
- ole_object.getBoundingClientRect(0).left.to_i
77
+ bounding_client_rect(:left)
75
78
  end
76
79
 
77
80
  def left_edge_absolute
@@ -79,16 +82,21 @@ module Watir
79
82
  end
80
83
 
81
84
  def right_edge
82
- ole_object.getBoundingClientRect(0).right.to_i
85
+ bounding_client_rect(:right)
83
86
  end
84
87
 
85
88
  def bottom_edge
86
- ole_object.getBoundingClientRect(0).bottom.to_i
89
+ bounding_client_rect(:bottom)
87
90
  end
88
91
 
89
92
  def center_x_y_absolute x, y
90
93
  return (right_edge - left_edge) / 2 + x, (bottom_edge - top_edge) / 2 + y
91
94
  end
92
95
 
96
+ private
97
+
98
+ def bounding_client_rect(which)
99
+ ole_object.getBoundingClientRect(0).send(which).to_i
100
+ end
93
101
  end
94
102
  end
@@ -3,6 +3,7 @@ module Watir
3
3
  # Super-class for input elements like {SelectList}, {Button} etc.
4
4
  class InputElement < Element
5
5
  attr_ole :disabled?
6
+ attr_ole :required?
6
7
  attr_ole :name
7
8
  attr_ole :value
8
9
  attr_ole :alt
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watir-classic
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.0
4
+ version: 3.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bret Pettichord
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-16 00:00:00.000000000 Z
11
+ date: 2013-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: win32-process