2016-11-09 2 views
0

Ich habe Windows 10 Laptop. Mein Problem ist, dass nachdem ich die Datei conf.js ausgeführt habe, der Browser sich öffnet, aber nicht mit der Test-URL verbunden ist. unten Fehlermeldung geben.Winkelmesser Browser aber keine Verbindung zu Test-URL

C:\Users\acer\AppData\Roaming\npm\node_modules\protractor\FFAutomation>C:\Users\acer\AppData\Roaming\npm\protractor conf.js 
    Report destination: target\screenshots\Report.html 
    [15:59:26] I/direct - Using FirefoxDriver directly... 
    [15:59:26] I/launcher - Running 1 instances of WebDriver 
    [16:00:15] E/launcher - Timed out waiting for the WebDriver server at http://127.0.0.1:55402/hub 
    [16:00:15] E/launcher - Error: Timed out waiting for the WebDriver server at http://127.0.0.1:55402/hubat Error (native) 

    And lastly [16:00:15] E/launcher - Process exited with error code 199 
enter code here 

Die conf.js Datei ist unten angegeben: var HtmlScreenshotReporter = ('Winkelmesser-jasmine2-Bildschirm-reporter') erforderlich ist;

var reporter = new HtmlScreenshotReporter({ 
    dest: 'target/screenshots', 
    filename: 'Report.html', 
    reportTitle: 'Execution Report', 
    showSummary: true, 
    showQuickLinks: true, 

    pathBuilder: function(currentSpec, suites, browserCapabilities) { 
     // will return chrome/your-spec-name.png 
    return browserCapabilities.get('browserName') + '/' + currentSpec.fullName; 
    } 
}); 

exports.config = { 

    directConnect: true, 
    //seleniumAddress: 'http://localhost:4444/wd/hub', 
    capabilities: {'browserName': 'firefox'}, 
    // multiCapabilities: [ 
    // { 
    //  browserName: 'firefox' 
    // }, 
    // { 
    //  browserName: 'chrome' 
    // } 
    // ], 

    framework: 'jasmine', 
    specs: ['Login_spec3.js'], 
    //'Login_spec2.js','Article_spec.js','Catalog_spec.js',   '  'LoginwithTD_spec2.js', 'Login_spec3copy.js','Setting_spec.js' 
    allScriptsTimeout: 300000, 
    getPageTimeout: 300000, 
    jasmineNodeOpts: { 
     defaultTimeoutInterval: 300000 
    }, 

    // Setup the report before any tests start 
    beforeLaunch: function() { 
    return new Promise(function(resolve){ 
     reporter.beforeLaunch(resolve); 
     }); 
    }, 
    // Close the report after all tests finish 
    afterLaunch: function(exitCode) { 
     return new Promise(function(resolve){ 
     reporter.afterLaunch(resolve.bind(this, exitCode)); 
     }); 
    }, 

    onPrepare: function() { 
     var width = 1300; 
     var height = 1200; 
     browser.driver.manage().window().setSize(width,height); 
     jasmine.getEnv().addReporter(reporter); 
     afterAll(function(done) { 
      process.nextTick(done); 
     }) 
     //browser.params.users = require('./shared.params.' + countryCode + '.json').users; 
    } 

}; 

*I have copied some scripts(which is executable on her macbook) from a friend and paste it in a folderin window 10 pc named FFAutomation path.    C:\Users\acer\AppData\Roaming\npm\node_modules\protractor\FFAutomation 

1)I have update the chrome driver to version 2.24 chromedriver_win32 , update the chrome driver with command "webdriver-manager update" and run the webdriver with command "webdriver-manager start". 
2) Than i run conf.js file on another terminal with the firefox browser 
C:\Users\acer\AppData\Roaming\npm\node_modules\protractor\FFAutomation>C:\Users\ acer\AppData\Roaming\npm\protractor conf.js 
I am getting this following error 
Report destination: target\screenshots\Report.html 
    [15:59:26] I/direct - Using FirefoxDriver directly... 
    [15:59:26] I/launcher - Running 1 instances of WebDriver 
    [16:00:15] E/launcher - Timed out waiting for the WebDriver server at http://127.0.0.1:55402/hub 
    [16:00:15] E/launcher - Error: Timed out waiting for the WebDriver server at http://127.0.0.1:55402/hubat Error (native) 

    And lastly [16:00:15] E/launcher - Process exited with error code 199 
    enter code here 
    3) Than i run conf.js file on another terminal with the "chrome" browser 
C:\Users\acer\AppData\Roaming\npm\node_modules\protractor\FFAutomation>C:\Users\   acer\AppData\Roaming\npm\protractor conf.js 
    I am getting this following error 
    Error: Error: Cannot find module '/Users/rohitgathibandhe/npm- global/lib/node_modules/protractor/FFAutomation/Function_Lib.js' 
    E/launcher - Process exited with error code 100 
+0

können Sie den Inhalt der Datei 'config.json' hochladen? –

+0

Ändern Sie den Chrome-Treiber in v23.x.x. Es wird aufgelöst ich denke –

+0

@sudharshan. Ich habe die Datei conf.js hochgeladen, die ich ausgeführt habe und den obigen Fehler erhalten habe. Die gleiche Datei conf.js wird auf Macbook ausgeführt. Bitte geben Sie mir Ihr Feedback so schnell wie möglich zurück. – user7132782

Antwort

0

Run webdriver-manager start bevor die Tests ausgeführt werden.

+0

@morgan. Ja, ich habe versucht, webdriver-manager zu starten und es erfolgreich ausgeführt. – user7132782

Verwandte Themen