????Web??????????е?????????????????????????????????????????????????????????????????????????????????????????cookie???????μ????е????
??????????????£?
1 public void yiCheCarSourceManageData(HashMap<String?? String> data) throws Exception{
2 ????//?????????棬??????????????
3 ????driver.get(CommonBean.YICHEURL);
4 ????//?????????????(???????λ????????????д??????????
5    YiCheLogin.yiCheLoginFun(username?? password);
6    //??????Ctrl+t?????±??
7    Actions actionOpenLinkInNewTab = new Actions(TestBase.driver);
8 ?? actionOpenLinkInNewTab.keyDown(Keys.CONTROL).sendKeys("t").keyUp(Keys.CONTROL).perform();
9 ?? //????????10??????10??????????????????????
10 ?? Thread.sleep(10 * 1000);
11 ?? //?л????′?????
12 ?? String currentWindow = driver.getWindowHandle();
13 ?? Set<String> handles = driver.getWindowHandles();
14 ?? handles.remove(currentWindow);
15 ?? if (handles.size() > 0) {
16     // ??λ????
17     driver.switchTo().window(handles.iterator().next());
18 ?? }
19 ?? //?±???У????????????
20 ?? driver.get(CommonBean.YICHEURL);
21 ?? Thread.sleep(5 * 1000);
22 }