WebClient webClient = WebClientUtil.initWebClient(); HtmlPage loginPage = webClient.getPage(new URL(login)); System.out.println("等待系统加载JS..."); webClient.waitForBackgroundJavaScript(10000); // System.out.println(loginPage.asText()); //使用IAM方式登录 if(loginPage.getElementById("subUserLogin") == null){ System.out.println("页面加载失败!"); return; } loginPage.getElementById("ch-zh-cn").click(); HtmlPage chLoginPage = (HtmlPage) loginPage.getEnclosingWindow().getTopWindow().getEnclosedPage();