watir-webdriver 0.5.6 → 0.5.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,11 +11,19 @@ module Watir
11
11
  end
12
12
 
13
13
  def add(name, value, opts = {})
14
- @control.add_cookie :name => name,
15
- :value => value,
16
- :secure => opts[:secure],
17
- :path => opts[:path],
18
- :expires => opts[:expires]
14
+ cookie = {
15
+ :name => name,
16
+ :value => value,
17
+ :secure => opts[:secure],
18
+ :path => opts[:path],
19
+ :expires => opts[:expires],
20
+ }
21
+
22
+ if opts[:domain]
23
+ cookie[:domain] = opts[:domain]
24
+ end
25
+
26
+ @control.add_cookie cookie
19
27
  end
20
28
 
21
29
  def delete(name)
@@ -38,6 +38,10 @@ module Watir
38
38
  sorter.print
39
39
  end
40
40
 
41
+ def fetch_interface(interface)
42
+ @interfaces_by_name[interface] or raise "#{interface} not found in IDL"
43
+ end
44
+
41
45
  private
42
46
 
43
47
  def download_and_parse
@@ -55,6 +59,7 @@ module Watir
55
59
  end
56
60
 
57
61
  def extract_interface_map
62
+ # http://www.whatwg.org/specs/web-apps/current-work/#elements-1
58
63
  table = @doc.search("//h3[@id='elements-1']/following-sibling::table[1]").first
59
64
  table or raise "could not find elements-1 table"
60
65
 
@@ -93,10 +98,6 @@ module Watir
93
98
  end
94
99
  end
95
100
 
96
- def fetch_interface(interface)
97
- @interfaces_by_name[interface] or raise "#{interface} not found in IDL"
98
- end
99
-
100
101
  def parse_idl(str)
101
102
  result = idl_parser.parse(str)
102
103
 
@@ -113,7 +114,7 @@ module Watir
113
114
  end
114
115
 
115
116
  def sorter
116
- @idl_sroter ||= IDLSorter.new(@interfaces)
117
+ @idl_sorter ||= IDLSorter.new(@interfaces)
117
118
  end
118
119
 
119
120
  end # SpecExtractor
@@ -1,3 +1,3 @@
1
1
  module Watir
2
- VERSION = "0.5.6"
2
+ VERSION = "0.5.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watir-webdriver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-01 00:00:00.000000000 Z
12
+ date: 2012-05-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: selenium-webdriver