Bug 963162 - Add WebDriver compatible getWindowHandle alias. r=dburns

getCurrentWindowHandle and getWindow are both aliases to this command
now.
This commit is contained in:
Andreas Tolfsen 2014-01-24 10:47:54 -05:00
parent a66ac9e197
commit aea63ad964
2 changed files with 5 additions and 4 deletions

View File

@ -781,7 +781,7 @@ class Marionette(object):
"""
self.window = self._send_message("getCurrentWindowHandle", "value")
self.window = self._send_message("getWindowHandle", "value")
return self.window
@property

View File

@ -1193,7 +1193,7 @@ MarionetteServerConnection.prototype = {
*
* @return unique window handle (string)
*/
getCurrentWindowHandle: function MDA_getCurrentWindowHandle() {
getWindowHandle: function MDA_getWindowHandle() {
this.command_id = this.getCommandId();
for (let i in this.browsers) {
if (this.curBrowser == this.browsers[i]) {
@ -2441,8 +2441,9 @@ MarionetteServerConnection.prototype.requestTypes = {
"goBack": MarionetteServerConnection.prototype.goBack,
"goForward": MarionetteServerConnection.prototype.goForward,
"refresh": MarionetteServerConnection.prototype.refresh,
"getCurrentWindowHandle": MarionetteServerConnection.prototype.getCurrentWindowHandle,
"getWindow": MarionetteServerConnection.prototype.getCurrentWindowHandle, // deprecated
"getWindowHandle": MarionetteServerConnection.prototype.getWindowHandle,
"getCurrentWindowHandle": MarionetteServerConnection.prototype.getWindowHandle, // Selenium 2 compat
"getWindow": MarionetteServerConnection.prototype.getWindowHandle, // deprecated
"getCurrentWindowHandles": MarionetteServerConnection.prototype.getWindowHandles,
"getWindows": MarionetteServerConnection.prototype.getWindowHandles, // deprecated
"getActiveFrame": MarionetteServerConnection.prototype.getActiveFrame,