centOS,Jenkins,Firefox& Selenium GRID - HTTPS证书问题

时间:2014-04-09 12:14:43

标签: firefox https jenkins selenium-grid

我让詹金斯在远程机器(centOS)上无头跑。我试图在安全证书是自签名的开发环境中使用Selenium Grid(在同一centOS机器上同时具有集线器和节点)运行一些自动登录测试。因此,在主页上,当点击登录链接时,它会出现在https错误页面,而selenium webdriver需要登录页面。所以所有测试都失败了。我试图创建firefox配置文件:

    nodeUrl = "http://localhost:4444/wd/hub";   
    DesiredCapabilities capability = DesiredCapabilities.firefox();

    FirefoxProfile profile = new FirefoxProfile();
    profile.setAcceptUntrustedCertificates(true);               
    profile.setAssumeUntrustedCertificateIssuer(false);

    capability.setCapability(FirefoxDriver.PROFILE, profile);
    capability.setBrowserName("firefox"); 
    capability.setPlatform(Platform.ANY);

    driver = new RemoteWebDriver(new URL(nodeUrl), capability);

但这没有用。我怎样才能确保当节点调用firefox时,它接受那个不受信任的证书?

0 个答案:

没有答案
相关问题