mirror of https://github.com/vitalif/phantomjs
Importing GhostDriver 1.1.1.
Yes, 1.1.0 has just been imported. But the key feature in 1.1.1 is Session Isolation in WebDriver: something that has been requested many times, particularly when using GhostDriver with Selenium Grid.1.x
parent
18b8a4d444
commit
056aa50c19
|
@ -1,7 +1,7 @@
|
||||||
2014-01-04 16:44:10
|
2014-01-12 21:02:05
|
||||||
|
|
||||||
commit 491a60b0adf78e6d7a4eff980de81bb3eb8c764d (HEAD, refs/remotes/origin/master, refs/remotes/origin/HEAD, refs/heads/master)
|
commit 24452f72b6daa0a8ba14822172012d781c89fbcb (HEAD, tag: refs/tags/1.1.1, refs/heads/master)
|
||||||
Author: Ivan De Marino <detronizator@gmail.com>
|
Author: Ivan De Marino <detronizator@gmail.com>
|
||||||
Date: Thu Jan 2 23:02:21 2014 +0000
|
Date: Sun Jan 12 20:37:01 2014 +0000
|
||||||
|
|
||||||
Updated CHANGELOG to mention upgraded Atoms in 1.1.0
|
Changing only the Driver (no need for the Java Bindings) to 1.1.1
|
||||||
|
|
|
@ -35,7 +35,7 @@ ghostdriver = {
|
||||||
hub : require("./hub_register.js"),
|
hub : require("./hub_register.js"),
|
||||||
logger : require("./logger.js"),
|
logger : require("./logger.js"),
|
||||||
config : null, //< this will be set below
|
config : null, //< this will be set below
|
||||||
version : "1.1.0"
|
version : "1.1.1"
|
||||||
};
|
};
|
||||||
|
|
||||||
// create logger
|
// create logger
|
||||||
|
|
|
@ -101,6 +101,7 @@ ghostdriver.Session = function(desiredCapabilities) {
|
||||||
},
|
},
|
||||||
_windows = {}, //< NOTE: windows are "webpage" in Phantom-dialect
|
_windows = {}, //< NOTE: windows are "webpage" in Phantom-dialect
|
||||||
_currentWindowHandle = null,
|
_currentWindowHandle = null,
|
||||||
|
_cookieJar = require('cookiejar').create(),
|
||||||
_id = require("./third_party/uuid.js").v1(),
|
_id = require("./third_party/uuid.js").v1(),
|
||||||
_inputs = ghostdriver.Inputs(),
|
_inputs = ghostdriver.Inputs(),
|
||||||
_capsPageSettingsPref = "phantomjs.page.settings.",
|
_capsPageSettingsPref = "phantomjs.page.settings.",
|
||||||
|
@ -284,8 +285,12 @@ ghostdriver.Session = function(desiredCapabilities) {
|
||||||
_addNewPage = function(newPage) {
|
_addNewPage = function(newPage) {
|
||||||
_log.debug("_addNewPage");
|
_log.debug("_addNewPage");
|
||||||
|
|
||||||
_decorateNewWindow(newPage); //< decorate the new page
|
// decorate the new Window/Page
|
||||||
_windows[newPage.windowHandle] = newPage; //< store the page/window
|
newPage = _decorateNewWindow(newPage);
|
||||||
|
// set session-specific CookieJar
|
||||||
|
newPage.cookieJar = _cookieJar;
|
||||||
|
// store the Window/Page by WindowHandle
|
||||||
|
_windows[newPage.windowHandle] = newPage;
|
||||||
},
|
},
|
||||||
|
|
||||||
// Delete any closing page from the "_windows" container of this session
|
// Delete any closing page from the "_windows" container of this session
|
||||||
|
@ -487,9 +492,15 @@ ghostdriver.Session = function(desiredCapabilities) {
|
||||||
|
|
||||||
// Ensure a Current Window is available, if it's found to be `null`
|
// Ensure a Current Window is available, if it's found to be `null`
|
||||||
if (_currentWindowHandle === null) {
|
if (_currentWindowHandle === null) {
|
||||||
// First call to get the current window: need to create one
|
// Create the first Window/Page
|
||||||
page = _decorateNewWindow(require("webpage").create());
|
page = require("webpage").create();
|
||||||
|
// Decorate it with listeners and helpers
|
||||||
|
page = _decorateNewWindow(page);
|
||||||
|
// set session-specific CookieJar
|
||||||
|
page.cookieJar = _cookieJar;
|
||||||
|
// Make the new Window, the Current Window
|
||||||
_currentWindowHandle = page.windowHandle;
|
_currentWindowHandle = page.windowHandle;
|
||||||
|
// Store by WindowHandle
|
||||||
_windows[_currentWindowHandle] = page;
|
_windows[_currentWindowHandle] = page;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -616,6 +627,9 @@ ghostdriver.Session = function(desiredCapabilities) {
|
||||||
for (k in _windows) {
|
for (k in _windows) {
|
||||||
_closeWindow(k);
|
_closeWindow(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Release CookieJar resources
|
||||||
|
_cookieJar.close();
|
||||||
},
|
},
|
||||||
|
|
||||||
_getLog = function (type) {
|
_getLog = function (type) {
|
||||||
|
|
Loading…
Reference in New Issue