1

基本的な問題は、分度器を Internet Explorer で動作させることができないことです (Chrome では動作します)。それで、私はこの記事を読みました: Internet Explorer 11 で分度器を実行できません。しかし、私の問題を解決するには不十分なようです。

エラーは次のとおりです。

Step 8/8: Protractor Tests (Command Line) (5s)
[15:35:54][Step 8/8] ##teamcity[buildStatisticValue key='buildStageDuration:buildStepRUNNER_84' value='0.0']
[15:35:54][Step 8/8] Starting: C:\TeamCity\buildAgent1\work\d1b0bf39062e588e\src\Slate.Iva.Web.Tests\e2e\run_protractor_tests.bat
[15:35:54][Step 8/8] in directory: C:\TeamCity\buildAgent1\work\d1b0bf39062e588e\src\Slate.Iva.Web.Tests\e2e
[15:35:54][Step 8/8] 
[15:35:54][Step 8/8] C:\TeamCity\buildAgent1\work\d1b0bf39062e588e\src\Slate.Iva.Web.Tests\e2e>protractor "conf.js" 
[15:35:58][Step 8/8] Using the selenium server at http://localhost:4444/wd/hub
[15:35:59][Step 8/8] Running Jasmine Tests
[15:35:59][Step 8/8] 
[15:35:59][Step 8/8] C:\Users\BuildAgent\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\atoms\error.js:109
[15:35:59][Step 8/8]   var template = new Error(this.message);
[15:35:59][Step 8/8]                  ^
[15:35:59][Step 8/8] Process exited with code 1
[15:35:59][Step 8/8] ##teamcity[buildStatisticValue key='buildStageDuration:buildStepRUNNER_84' value='5171.0']
[15:35:59][Step 8/8] Step Protractor Tests (Command Line) failed

conf.js は次のとおりです。

exports.config = {
    // To use chrome instead of Selenium Standalone sever (comment out seleniumAddress below)
    //chromeOnly: true,
    //chromeDriver: '../selenium/chromedriver',

    //seleniumServerJar: '../node_modules/protractor/selenium/selenium-server-standalone-2.37.0.jar',
    //seleniumPort: 4444,

    // The address of a running selenium server.
    seleniumAddress: 'http://localhost:4444/wd/hub',

    // Capabilities to be passed to the webdriver instance.
    capabilities: {
        'browserName': 'chrome'
    },

    baseUrl: String (process.env.COMPUTERNAME.toLowerCase()) === String ('build') ? 'http://slate-dev/' : 'http://' + process.env.COMPUTERNAME + '/',

    // Spec patterns are relative to the current working directly when protractor is called.
    //specs: ['example/example_spec.js', 'PrintSettings/AssignPrinterToDocTypes_spec.js'],
    specs: [
        '**/*_spec.js'
    ],

    // can use 'suites' instead of 'specs' - check api documentation
    suites: {
        notes: 'notes/notes_spec.js',
        lead: 'lead/lead_spec.js',
        reviews: 'product_reviews/*_spec.js',
        blind: 'blind_allocate/blind_allocate_spec.js',
        creditor: 'creditor/creditor_spec.js'
  },

  // Options to be passed to Jasmine-node.
  jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 80000
  },

    allScriptsTimeout: 80000,

    onPrepare: function () {

        if (process.env.TEAMCITY_VERSION) {
            require('jasmine-reporters');
            jasmine.getEnv().addReporter(new jasmine.TeamcityReporter());
        };
        //var ScreenShotReporter = require('protractor-screenshot-reporter');
        var ScreenShotReporter = require('protractor-html-screenshot-reporter');
        var path = require('path');
        jasmine.getEnv().addReporter (new ScreenShotReporter ({
            baseDirectory: 'tmp/report',
            pathBuilder: function pathBuilder(spec, descriptions, results, capabilities) {
                return descriptions.join ('-');
            }
            //takeScreenShotsOnlyForFailedSpecs: true
        }));
    }
};
4

1 に答える 1

-1

私の設定には次のものがあります。

そして、windows\system32 から IEDriverServer.exe を 1 回実行して、新しいファイアウォール ルールを有効にしました。

//Capabilities to be passed to the webdriver instance
capabilities: {
    'browserName': 'internet explorer'
},
于 2015-05-12T11:17:19.617 に答える