Https?????Http????????????
???????????? ???????[ 2015/7/22 11:48:25 ] ??????????????? ??????
??????????
????????????????https?????????????web???????????cookie??????????????????selenium??????selenium????????????????????????????htmlunit ????????????java ????????????????????????Ч?????htmlunit?????????????????????????????????У??????н???????????????????????????
???????Htmlunit???????
??????????Maven??????????????
????<dependency>
????<groupId>net.sourceforge.htmlunit</groupId>
????<artifactId>htmlunit</artifactId>
????<version>2.15</version>
????</dependency>
????<dependency>
???????Htmlunit???cookie??
final WebClient webClient = new WebClient(BrowserVersion.CHROME);
webClient.getOptions().setUseInsecureSSL(true);
webClient.getOptions().setJavaScriptEnabled(false);
webClient.getOptions().setCssEnabled(false);
HtmlPage page = null;
page = webClient.getPage(loginUrl);
HtmlElement corpid = (HtmlElement) page.getElementById("id_corpid");
HtmlElement corppw = (HtmlElement) page.getElementById("id_corppw");
corpid.click();
String username = ph.readValue("userName");
corpid.type(username);
corppw.click();
String password = new String(dec.decodeBuffer(ph.readValue("password")));
corppw.type(password);
List<HtmlButton> loginBtn = (List<HtmlButton>) page.getByXPath("//div[@id='corp']/form/div[@class='span2 offset7 controls']/button");
Page resultPage = loginBtn.get(0).click();
String EHRCookie = HtmlUnitUtil.getCookieHeader(webClient);
logger.info("???openidpage cookie??? "+cookie);
return cookie;
??????л????????cookie?????????
????[INFO ]13:29:15??882??main??[Class]LoginUtil?? [Method]getEHRCookie?? ???openidpage cookie??? JSESSIONID=8A1979AC21C24DD8622E41D89ABFF6F3.classa-***.org-8010; sessionid=23d2b3e737c34cb8d8898bbec94c6a11
??????????Httpclient?м????????cookie????http????
????//????cookie
????httpGet.addHeader(new BasicHeader("Cookie"??cookie));
?????????????ù?????????????????????????н????????
???????
??????Https????????http??web??????????У??????Htmlunit??httpclient???????????????????????????в???????д??
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Web?????????????????Web????????????????Docker Compose???????Web???????WEB?????ΧС??APP??????WEB????WEB???????????????WEB??????APP?????????Web??????????Web????????????Linux?????′?Java Web???????WEB?????ΧWeb?????Χ???Web??????????????HTTP(1)????Э??Web?????е?A/B?????????????????Web??????????Web??????ò?????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????