selenium-webdriver 2.32.1 → 2.33.0

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,5 +1,17 @@
1
- 2.33.0 (???)
2
- ============
1
+ 2.33.0 (2013-05-26)
2
+ ===================
3
+
4
+ Remote:
5
+ * Support rotating devices, such as iPhone & iPad in simulator and Android browser in emulator
6
+ * Support for interacting with touch screen devices, such as iPhone & iPad in simulator and Android browser in emulator
7
+ * Improve error messages for invalid wire protocol responses
8
+ Chrome:
9
+ * Accept :service_log_path for Chrome. (#3475)
10
+ IE:
11
+ * IE >=9 versions triggerMouseEvent like other browsers (#2218).
12
+ Various:
13
+ * Element#text ignores elements in <head>
14
+
3
15
 
4
16
  2.32.1 (2013-04-11)
5
17
  ===================
@@ -12,7 +24,7 @@ Safari:
12
24
 
13
25
  Safari:
14
26
  * The Safari extension is now packaged with the gem and automatically installed (#5322)
15
- * Improved detection of the binary location on 64-bit windows (5273)
27
+ * Improved detection of the binary location on 64-bit windows (#5273)
16
28
  Opera:
17
29
  * Allow passing :desired_capabailities (#5279)
18
30
  Firefox:
@@ -37,14 +37,6 @@ module Selenium
37
37
  ]
38
38
  end
39
39
 
40
- def setScreenOrientation(orientation)
41
- execute :setScreenOrientation, {}, :orientation => orientation
42
- end
43
-
44
- def getScreenOrientation
45
- execute :getScreenOrientation
46
- end
47
-
48
40
  def capabilities
49
41
  @capabilities ||= Remote::Capabilities.android
50
42
  end
@@ -11,7 +11,7 @@ module Selenium
11
11
  if opts.has_key?(:url)
12
12
  url = opts.delete(:url)
13
13
  else
14
- @service = Service.default_service
14
+ @service = Service.default_service(*extract_service_args(opts))
15
15
  @service.start
16
16
 
17
17
  url = @service.uri
@@ -102,6 +102,16 @@ module Selenium
102
102
  caps
103
103
  end
104
104
 
105
+ def extract_service_args(opts)
106
+ args = []
107
+
108
+ if opts.has_key?(:service_log_path)
109
+ args << "--log-path=#{opts.delete(:service_log_path)}"
110
+ end
111
+
112
+ args
113
+ end
114
+
105
115
  end # Bridge
106
116
  end # Chrome
107
117
  end # WebDriver
@@ -29,13 +29,13 @@ module Selenium
29
29
  @executable_path = path
30
30
  end
31
31
 
32
- def self.default_service
33
- new executable_path, PortProber.above(DEFAULT_PORT)
32
+ def self.default_service(*extra_args)
33
+ new executable_path, PortProber.above(DEFAULT_PORT), *extra_args
34
34
  end
35
35
 
36
- def initialize(executable_path, port)
36
+ def initialize(executable_path, port, *extra_args)
37
37
  @uri = URI.parse "http://#{Platform.localhost}:#{port}"
38
- server_command = [executable_path, "--port=#{port}"]
38
+ server_command = [executable_path, "--port=#{port}", *extra_args]
39
39
 
40
40
  @process = ChildProcess.build(*server_command)
41
41
  @socket_poller = SocketPoller.new Platform.localhost, port, START_TIMEOUT
@@ -196,8 +196,7 @@ module Selenium
196
196
 
197
197
  class << self
198
198
  def for_code(code)
199
- return if code == 0
200
- return WebDriverError if code.nil?
199
+ return if [nil, 0].include? code
201
200
 
202
201
  Errors[code - 1] || WebDriverError
203
202
  end
@@ -80,7 +80,9 @@ module Selenium
80
80
  DriverExtensions::HasInputDevices,
81
81
  DriverExtensions::UploadsFiles,
82
82
  DriverExtensions::TakesScreenshot,
83
- DriverExtensions::HasSessionId
83
+ DriverExtensions::HasSessionId,
84
+ DriverExtensions::Rotatable,
85
+ DriverExtensions::HasTouchScreen
84
86
  ]
85
87
  end
86
88
 
@@ -471,6 +473,14 @@ module Selenium
471
473
 
472
474
  end
473
475
 
476
+ def setScreenOrientation(orientation)
477
+ execute :setScreenOrientation, {}, :orientation => orientation
478
+ end
479
+
480
+ def getScreenOrientation
481
+ execute :getScreenOrientation
482
+ end
483
+
474
484
  #
475
485
  # logs
476
486
  #
@@ -48,12 +48,10 @@ module Selenium
48
48
  private
49
49
 
50
50
  def assert_ok
51
- if @code.nil? || @code >= 400
52
- if e = error()
53
- raise e
54
- else
55
- raise Error::ServerError, self
56
- end
51
+ if e = error()
52
+ raise e
53
+ elsif @code.nil? || @code >= 400
54
+ raise Error::ServerError, self
57
55
  end
58
56
  end
59
57
 
@@ -5277,7 +5277,7 @@ safaridriver.message.Message.prototype.toJSON = function() {
5277
5277
  return this.data_
5278
5278
  };
5279
5279
  safaridriver.message.Message.prototype.toString = function() {
5280
- return bot.json.stringify(this)
5280
+ return bot.json.stringify(this.toJSON())
5281
5281
  };
5282
5282
  safaridriver.message.Connect = function(a) {
5283
5283
  safaridriver.message.Message.call(this, safaridriver.message.Connect.TYPE);
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: selenium-webdriver
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.32.1
5
+ version: 2.33.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: 2013-04-11 00:00:00 +02:00
13
+ date: 2013-05-27 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency