Bug 1362528 - Let getWindowHandles and getChromeWindowHandles return list of strings
By the webdriver spec both commands have to return a list of strings for the
window handles. Right now those are numbers.
MozReview-Commit-ID: 5Gn624BaVI1
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -1275,17 +1275,17 @@ GeckoDriver.prototype.getWindowHandle =
*
* Each window handle is assigned by the server and is guaranteed unique,
* however the return array does not have a specified ordering.
*
* @return {Array.<string>}
* Unique window handles.
*/
GeckoDriver.prototype.getWindowHandles = function (cmd, resp) {
- return this.windowHandles;
+ return this.windowHandles.map(String);
}
/**
* Get the current window's handle. This corresponds to a window that
* may itself contain tabs.
*
* Return an opaque server-assigned identifier to this window that
* uniquely identifies it within this Marionette instance. This can
@@ -1308,17 +1308,17 @@ GeckoDriver.prototype.getChromeWindowHan
/**
* Returns identifiers for each open chrome window for tests interested in
* managing a set of chrome windows and tabs separately.
*
* @return {Array.<string>}
* Unique window handles.
*/
GeckoDriver.prototype.getChromeWindowHandles = function (cmd, resp) {
- return this.chromeWindowHandles;
+ return this.chromeWindowHandles.map(String);
}
/**
* Get the current position and size of the browser window currently in focus.
*
* Will return the current browser window size in pixels. Refers to
* window outerWidth and outerHeight values, which include scroll bars,
* title bars, etc.