这有帮助吗?(操作,在遇到麻烦之后,我意识到您的问题出在 Chrome 上)但这在 Windows 7 上的 Firefox 9.0.1 上运行良好
    String configFile = "/apps/configs/logins.cfg";
    // server, port, userid, password defaults
    String userid   = "willey@customer.com";
    String password = "willeyCoy0tt3";
    String server     = "desert.acme.com";
    String securePort = "447";
    // load the properties file - this might throw an exception
    //    if it cannot find or cannot open the file 
    Properties prop = new Properties();
    prop.load(new FileInputStream( configFile ));
    //get the values
    userid   = prop.getProperty( "user" );
    password = prop.getProperty( "password" );
    baseUrl = "https://" + userid + ":" + password + "@" + server + ":" + securePort + "/services/login.html";
    driver = new FirefoxDriver();
    driver.manage().timeouts().implicitlyWait(35, TimeUnit.SECONDS);
    // after that, just use to load the other pages, for example
    driver.get(baseUrl + "/services/listOrders.html");