【问题标题】:Start chrome & firefox with proxy using webdriverio in nodejs在 nodejs 中使用 webdriverio 使用代理启动 chrome 和 firefox
【发布时间】:2015-12-17 11:34:53
【问题描述】:

如何使用 NodeJs 中的 WebDriverIO 通过选项(/所需功能)打开带有代理设置的浏览器会话。我使用此代码设置代理,但它停止工作。浏览器在没有代理的情况下打开,并且不会执行任何进一步的操作。

options = {
    desiredCapabilities: {
        browserName: 'firefox',
        proxy: {
            proxyType: 'manual',
            httpProxy: '127.0.0.11:80'
        }
    }
};

client = webdriverio.remote(options).init();

【问题讨论】:

    标签: node.js proxy webdriver-io


    【解决方案1】:

    我相信这段代码应该可以工作:

    var webdriverio = require('webdriverio');
    
    
        var options = {
            desiredCapabilities: { 
                browserName: 'firefox'
                , proxy: {
                    proxyType: 'MANUAL'
                    , httpProxy: '127.0.0.11:80'
    
                }
            } 
        };
    
    client = webdriverio.remote(options).init();
    

    参考:https://github.com/webdriverio/webdriverio/issues/324

    【讨论】:

      猜你喜欢
      • 2022-01-06
      • 1970-01-01
      • 1970-01-01
      • 2016-09-22
      • 2017-04-26
      • 2020-08-30
      • 1970-01-01
      • 2020-05-17
      • 2012-05-26
      相关资源
      最近更新 更多