Closed DinisCruz closed 9 years ago
fixed using
wd = require('wd');
wd.addAsyncMethod('get',
function(url) {
var cb = wd.findCallback(arguments);
this.eval('window.location.href="'+url+'"', cb);
});
as see in
_browser = function()
{
var chai = require("chai");
var chaiAsPromised = require("chai-as-promised");
chai.use(chaiAsPromised);
chai.should();
wd = require('wd');
wd.addAsyncMethod('get',
function(url) {
var cb = wd.findCallback(arguments);
this.eval('window.location.href="'+url+'"', cb);
});
chaiAsPromised.transferPromiseness = wd.transferPromiseness;
var browser = wd.promiseChainRemote();
return browser.attach(sessionId)
}()
at the moment we have to use
browser.eval("window.location.href='http://www.google.com'", function() ...
(see https://github.com/o2platform/webkit-repl/blob/master/editor.html#L61) which is not a good solutionthe problem is that calling
browser.get('http://xyz.com', function() ...
, will open that url in the main webkit window (not it the iframe1 frame)