selenium-webdriver 2.3.2 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,10 @@
1
+ 2.4.0 (2011-08-11)
2
+ ==================
3
+
4
+ * Firefox 6 support.
5
+ * Raise in switch_to.alert when no alert is present.
6
+ * Improved handling of non-breaking spaces for Element#text.
7
+
1
8
  2.3.2 (2011-08-01)
2
9
  ==================
3
10
 
@@ -3,17 +3,17 @@ require 'rake'
3
3
 
4
4
  module Selenium
5
5
  module Rake
6
- include ::Rake::DSL if defined?(::Rake::DSL)
7
6
 
8
7
  class MissingJarFileError < StandardError
9
8
  end
10
9
 
11
-
12
10
  #
13
11
  # Defines rake tasks for starting, stopping and restarting the Selenium server.
14
12
  #
15
13
  # Usage:
16
14
  #
15
+ # require 'selenium/rake/server_task'
16
+ #
17
17
  # Selenium::Rake::ServerTask.new do |t|
18
18
  # t.jar = "/path/to/selenium-server-standalone.jar"
19
19
  # t.port = 4444
@@ -22,12 +22,13 @@ module Selenium
22
22
  #
23
23
  # Tasks defined:
24
24
  #
25
- # rake selenium:server:start
26
- # rake selenium:server:stop
27
- # rake selenium:server:restart
25
+ # rake selenium:server:start
26
+ # rake selenium:server:stop
27
+ # rake selenium:server:restart
28
28
  #
29
29
 
30
30
  class ServerTask
31
+ include ::Rake::DSL if defined?(::Rake::DSL)
31
32
 
32
33
  #
33
34
  # Path to the selenium server jar
@@ -2,8 +2,11 @@ module Selenium
2
2
  module WebDriver
3
3
  class Alert
4
4
 
5
+ attr_reader :text
6
+
5
7
  def initialize(bridge)
6
8
  @bridge = bridge
9
+ @text = bridge.getAlertText
7
10
  end
8
11
 
9
12
  def accept
@@ -18,10 +21,6 @@ module Selenium
18
21
  @bridge.setAlertValue keys
19
22
  end
20
23
 
21
- def text
22
- @bridge.getAlertText
23
- end
24
-
25
24
  end # Alert
26
25
  end # WebDriver
27
26
  end # Selenium
@@ -28,42 +28,48 @@ module Selenium
28
28
  class NoSuchWindowError < WebDriverError; end # 23
29
29
  class InvalidCookieDomainError < WebDriverError; end # 24
30
30
  class UnableToSetCookieError < WebDriverError; end # 25
31
- # 26
32
- # 27
33
- # TimeOutError # 28
31
+ class UnexpectedAlertError < WebDriverError; end # 26
32
+ class NoAlertOpenError < WebDriverError; end # 27
33
+ class ScriptTimeOutError < WebDriverError; end # 28
34
34
  class InvalidElementCoordinatesError < WebDriverError; end # 29
35
+ # 30
36
+ # 31
37
+ class InvalidSelectorError < WebDriverError; end # 32
35
38
  class UnsupportedOperationError < WebDriverError; end
36
39
 
37
40
  Errors = [
38
- IndexOutOfBoundsError,
39
- NoCollectionError,
40
- NoStringError,
41
- NoStringLengthError,
42
- NoStringWrapperError,
43
- NoSuchDriverError,
44
- NoSuchElementError,
45
- NoSuchFrameError,
46
- UnknownCommandError,
47
- ObsoleteElementError,
48
- ElementNotDisplayedError,
49
- InvalidElementStateError,
50
- UnhandledError,
51
- ExpectedError,
52
- ElementNotSelectableError,
53
- NoSuchDocumentError,
54
- UnexpectedJavascriptError,
55
- NoScriptResultError,
56
- XPathLookupError,
57
- NoSuchCollectionError,
58
- TimeOutError,
59
- NullPointerError,
60
- NoSuchWindowError,
61
- InvalidCookieDomainError,
62
- UnableToSetCookieError,
63
- nil, # not used
64
- nil, # not used
65
- TimeOutError, # repeated.
66
- InvalidElementCoordinatesError
41
+ IndexOutOfBoundsError, # 1
42
+ NoCollectionError, # 2
43
+ NoStringError, # 3
44
+ NoStringLengthError, # 4
45
+ NoStringWrapperError, # 5
46
+ NoSuchDriverError, # 6
47
+ NoSuchElementError, # 7
48
+ NoSuchFrameError, # 8
49
+ UnknownCommandError, # 9
50
+ ObsoleteElementError, # 10
51
+ ElementNotDisplayedError, # 11
52
+ InvalidElementStateError, # 12
53
+ UnhandledError, # 13
54
+ ExpectedError, # 14
55
+ ElementNotSelectableError, # 15
56
+ NoSuchDocumentError, # 16
57
+ UnexpectedJavascriptError, # 17
58
+ NoScriptResultError, # 18
59
+ XPathLookupError, # 19
60
+ NoSuchCollectionError, # 20
61
+ TimeOutError, # 21
62
+ NullPointerError, # 22
63
+ NoSuchWindowError, # 23
64
+ InvalidCookieDomainError, # 24
65
+ UnableToSetCookieError, # 25
66
+ UnexpectedAlertError, # 26
67
+ NoAlertOpenError, # 27
68
+ ScriptTimeOutError, # 28
69
+ InvalidElementCoordinatesError, # 29
70
+ nil, # 30
71
+ nil, # 31
72
+ InvalidSelectorError # 32
67
73
  ]
68
74
 
69
75
  class << self
@@ -73,7 +73,7 @@ module Selenium
73
73
 
74
74
  sock.close
75
75
  true
76
- rescue *NOT_CONNECTED_ERRORS => e
76
+ rescue *NOT_CONNECTED_ERRORS
77
77
  $stderr.puts [@host, @port].inspect if $DEBUG
78
78
  false
79
79
  end
@@ -110,6 +110,10 @@ module Selenium
110
110
  #
111
111
  # alerts
112
112
  #
113
+
114
+ def getAlert
115
+ execute :getAlert
116
+ end
113
117
 
114
118
  def acceptAlert
115
119
  execute :acceptAlert
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: selenium-webdriver
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.3.2
5
+ version: 2.4.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jari Bakken
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-08-01 00:00:00 +02:00
13
+ date: 2011-08-11 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -43,7 +43,7 @@ dependencies:
43
43
  requirements:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: 0.1.9
46
+ version: 0.2.1
47
47
  type: :runtime
48
48
  version_requirements: *id003
49
49
  - !ruby/object:Gem::Dependency