我无法在 Selenium Standalone 上编辑超时

Im not able to edit the timeout on Selenium Standalone

我正在尝试使用 webdriverio、selenium standalone 和 Gulp 创建测试自动化。 Selenium 在应用程序中 运行,但我无法编辑 selenium 超时默认值。页面加载正常,但速度非常慢,我得到默认的 10 秒超时。如何编辑超时?

这是我加载 Selenium 服务器的代码。 gulpfile.babel

import gulp from 'gulp';
import selenium from 'selenium-standalone';
import webdriver from 'gulp-webdriver';

let seleniumServer;

gulp.task('selenium:start', (done) => {
    selenium.install({ logger: function(message) {} }, () => {
        selenium.start((err, child) => {
            if (err) { return done(err); }
            seleniumServer = child;
            done();
        });
    });

});

gulp.task('config:setup', ['selenium:start'], () => {
    return gulp.src('wdio.conf.js')
        .pipe(webdriver({
            waitforTimeout: 60000
        })).on('error', () => {
            seleniumServer.kill();
            process.exit(1);
        });
});
gulp.task('handler', ['config:setup'], () => {
    seleniumServer.kill();
});

我的测试用例

describe('Creating a new invitation request', function() {
    let _page, _container;
    before(() => {
        _page = new page.page();
        _container = new container.container();

    });
    it('request invitation', function() {
        _page.navigate(_container.urlBase);
        expect(_page.createNewRequest(_container.userToCreate));
    });
});

提前致谢。

已编辑,添加了 wdio.conf.js

exports.config = {
    specs: [
        './testcases/*.js'
    ],
    exclude: [      
        './excluded/out/*.js'
    ],
    maxInstances: 1,
capabilities:
    capabilities: [{      
        maxInstances: 1,
        browserName: 'chrome'
    }],
    sync: true,
    logLevel: 'silent',
    coloredLogs: true,
    screenshotPath: './errorShots/',
    baseUrl: 'http://localhost',
    waitforTimeout: 90000,
    connectionRetryTimeout: 90000,
    connectionRetryCount: 3,
    framework: 'mocha',
    mochaOpts: {
        compilers: ['js:babel-core/register']
    }
}

wdio.conf.js 文件的 mochaOpts 属性上添加了 timeout compiler 选项下所需的毫秒数。 配置最终是这样的:

  exports.config = {
    specs: [
        './testcases/*.js'
    ],
    exclude: [      
        './excluded/out/*.js'
    ],
    maxInstances: 1,
capabilities:
    capabilities: [{      
        maxInstances: 1,
        browserName: 'chrome'
    }],
    sync: true,
    logLevel: 'silent',
    coloredLogs: true,
    screenshotPath: './errorShots/',
    baseUrl: 'http://localhost',
    waitforTimeout: 90000,
    connectionRetryTimeout: 90000,
    connectionRetryCount: 3,
    framework: 'mocha',
    mochaOpts: {
        compilers: ['js:babel-core/register'],
        timeout: 90000
    }
}