Open ghost opened 7 years ago
var wd = require('wd');
browser = wd.remote();//'http://localhost:4444/wd/hub');
var url='https://api.ipify.org?format=json'
var desired = {browserName: 'chrome'}
var desired =
{ browserName: 'chrome',
proxy:
{ proxyType: 'manual',
ftpProxy: undefined,
httpProxy: undefined,
sslProxy: '127.0.0.1:8081', //your proxy host:port..
noProxy: undefined } }
browser.init( desired , function() {
browser.get("http://admc.io/wd/test-pages/guinea-pig.html", function() {
browser.title(function(err, title) {
// title.should.include('WD');
console.log(title)
browser.elementById('i am a link', function(err, el) {
browser.clickElement(el, function() {
/* jshint evil: true */
browser.eval("window.location.href", function(err, href) {
// href.should.include('guinea-pig2');
console.log(href)
browser.quit();
});
});
});
});
});
});
As in documentation I configure proxy same way as node request:
When I comment the proxy line, page open just after module is exported. However, with proxy selenium open browser but page is not loaded, no errors, no action at all.
Please advise, what can cause the problem?