我要在Cookie // find all A tags inside the containing DIV
List<WebElement> stars = driver.findElements(By.cssSelector("div.wh-rating-choices-holder > a"));
// loop through each element and hover
Actions action = new Actions(driver);
for (WebElement e : stars)
{
action.moveToElement(e).perform();
}
// after all the hovering is done, fetch the same elements but expect that they will now contain the 'hover' class
stars = driver.findElements(By.cssSelector("div.wh-rating-choices-holder > a.hover"));
// Assert (TestNG) that there are 5 stars that were hovered
Assert.assertEquals(stars.size(), 5, "Verify 5 elements were hovered");
// click the 5th star
stars.get(4).click();
中设置JWT。我必须在本地主机中设置max-age和到期时间,当我重新启动chrome浏览器时,cookie丢失了,但仍保留在firefox中,我可以看到chrome应用程序控制台中设置的到期日期,但是仍然以某种方式丢失了,是我错过了什么?
using cookie-parser in Node
在我的控制器响应中
var cookieOptions = {
httpOnly: true,
expires:new Date(new Date().getTime()+86409000),
maxAge:86409000
}