无法在chrome和firefox中调用browser.get()

时间:2015-12-14 11:28:06

标签: google-chrome firefox protractor

我使用Protractor来测试我的角度应用程序,直到昨天它运行良好,从今天早上起它无法调用browser.get()它显示下面的错误。

  

警告 - 不推荐使用chromeOnly。使用directConnect警告 - 不推荐使用chromeOnly。使用directConnect使用FirefoxDriver   直接... [launcher]运行1个WebDriver ERROR实例 - 无法使用   启动WebDriver会话。

     

E:\节点\ node_modules \量角器\ node_modules \硒的webdriver \ HTTP \ util.js中:87             错误('在' + url等待WebDriver服务器超时));             ^错误:在http://127.0.0.1:53981/hub等待WebDriver服务器超时       在错误()       at onResponse(e:\ node \ node_modules \ protractor \ node_modules \ selenium-webdriver \ http \ util.js:87:11)       在e:\ node \ node_modules \ protractor \ node_modules \ selenium-webdriver \ http \ util.js:42:21       在e:\ node \ node_modules \ protractor \ node_modules \ selenium-webdriver \ lib \ webdriver \ _ http:http:js:96:5       在ClientRequest。 (E:\节点\ node_modules \量角器\ node_modules \硒的webdriver \ HTTP \ index.js:145:7)       在ClientRequest.emit(events.js:95:17)       在Socket.socketErrorListener(http.js:1552:9)       在Socket.emit(events.js:95:17)       在net.js:441:14       在进程中。 tickCallback(node.js:442:13)   ====异步任务==== WebDriver.createSession()       在Function.webdriver.WebDriver.acquireSession (e:\ node \ node_modules \ protractor \ node_modules \ selenium-webdriver \ lib \ webdriver \ webdriver.js:149:22)       在Function.webdriver.WebDriver.createSession(e:\ node \ node_modules \ protractor \ node_modules \ selenium-webdriver \ lib \ webdriver \ webdriver.js:123:30)       在新的驱动程序(e:\ node \ node_modules \ protractor \ node_modules \ selenium-webdriver \ firefox \ index.js:189:36)       在DirectDriverProvider.getNewDriver(e:\ node \ node_modules \ protractor \ lib \ driverProviders \ direct.js:75:16)       在Runner.createBrowser(e:\ node \ node_modules \ protractor \ lib \ runner.js:178:37)       在e:\ node \ node_modules \ protractor \ lib \ runner.js:259:24       在_fulfilled(e:\ node \ node_modules \ protractor \ node_modules \ q \ q.js:797:54)       at self.promiseDispatch.done(e:\ node \ node_modules \ protractor \ node_modules \ q \ q.js:826:30)       在Promise.promise.promiseDispatch(e:\ node \ node_modules \ protractor \ node_modules \ q \ q.js:759:13)   [launcher]进程已退出,错误代码为1

protractor.conf

exports.config = {
allScriptsTimeout: 110000,
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: [
    'E:/XAMPP/htdocs/Testing/Marketing/marketing.js',
],
capabilities: {
    "browserName": "firefox"
},
chromeOnly: true,
baseUrl: 'http://localhost/',
framework: 'jasmine',
jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 3000000,
    isVerbose: true,
},
onPrepare: function () {
    browser.driver.manage().window().maximize();
    jasmine.getEnv().addReporter(new HtmlReporter({
        baseDirectory: '/tmp/screenshots'
    }));
    new HtmlReporter({
        baseDirectory: '/tmp/screenshots'
        , takeScreenShotsOnlyForFailedSpecs: true
    });
},

0 个答案:

没有答案