Angularjs 如何在配置文件中启动webdriver manager

Angularjs 如何在配置文件中启动webdriver manager,angularjs,selenium,testing,protractor,webdriver-manager,Angularjs,Selenium,Testing,Protractor,Webdriver Manager,我正在尝试将配置文件设置为不必转到mac终端并键入webdriver manager start。是否可以让配置文件执行此操作?我在下面列出了我的代码,让您知道我设置了什么。我只是不知道这是否可能。让我知道。我用的是MacBookPro exports.config = { seleniumServerJar: './selenium/selenium-server-standalone-2.45.1.jar', seleniumPort: null, chrome

我正在尝试将配置文件设置为不必转到mac终端并键入webdriver manager start。是否可以让配置文件执行此操作?我在下面列出了我的代码,让您知道我设置了什么。我只是不知道这是否可能。让我知道。我用的是MacBookPro

exports.config = {

    seleniumServerJar: './selenium/selenium-server-standalone-2.45.1.jar',

    seleniumPort: null,

    chromeDriver: './selenium/chromedriver.exe',
    chromeDriver: null,


    seleniumAddress: 'http://localhost:4444/wd/hub',


    // ----- What tests to run -----

    suites: {
        CSRSmokeTest: '../smoke/deskTop/CSR.js'
        DesktopSmokeTest: '../smoke/deskTop/**.js'
    },

    chromeOnly: false,

    multiCapabilities: [
        {
            'browserName': 'chrome',
            'chromeOptions': {
                args: ['--lang=en',
                    '--window-size=1900,1200']
            }
        },

    ],

    baseUrl: location + '/login/#/login',
    rootElement: 'body',

    onPrepare: function () {
        browser.ignoreSynchronization = true;
        browser.get(location + '/login/#/login');
    },
    params: {
        user: {

            //TEST******************************************


        },
        url: {

            //some code

        }

    },

    jasmineNodeOpts: {
        // onComplete will be called just before the driver quits.
        onComplete: null,
        // If true, display spec names.
        isVerbose: true,
        // If true, print colors to the terminal.
        showColors: true,
        // If true, include stack traces in failures.
        includeStackTrace: true,
        // Default time to wait in ms before a test fails.
        defaultTimeoutInterval: 6000000
    }
};

如果您只是不想输入terminal,则有几个选项:

  • 只保留
    seleniumServerJar
    选项,然后删除
    seleniumAddress
    。但是每次启动Selenium都需要额外的5-20秒(取决于硬件)
  • 对Chrome使用
    directConnect:true
    。然后,您根本不需要Selenium服务器。它适合我,但不是完全可移植的解决方案
  • 在服务器上的某个位置安装Selenium,并让它永远运行。在这种情况下,应用程序应该具有可公开访问的URL,而不仅仅是localhost

  • 你想知道昨天一整天都在做什么,我只需要把chromedriver.exe放在正确的文件夹中。非常感谢。