我想單擊名稱爲ready
的動畫按鈕。這是源代碼:等待動畫按鈕停止
我測試此代碼:
driver.switchTo().frame("iwg-game-full");
WebElement until = waitPage.until(ExpectedConditions.presenceOfElementLocated(By.id("ready")));
if (until.isDisplayed())
{
System.out.println("Play button is displayed");
driver.findElementById("ready").click();
}
但是當我運行的代碼我立即得到消息Play button is displayed
。我如何等待動畫完成?動畫
CSS代碼:
.popIn .animating {
animation: 0.5s ease 0s normal both 1 running popIn;
filter: blur(0px);
left: 0;
opacity: 0;
position: absolute;
top: 0;
will-change: transform;
}
@keyframes popIn {
0% {
opacity: 0;
transform: scale(0.1);
}
50% {
opacity: 1;
}
100% {
opacity: 1;
transform: scale(1);
}
}
.popIn:nth-child(1) .animating {
animation-delay: 0.1s;
}
.popIn:nth-child(2) .animating {
animation-delay: 0.2s;
}
.popIn:nth-child(3) .animating {
animation-delay: 0.3s;
}
這是否準備按鈕變成動畫結束後看不見? –
不,它只是在顯示之前隱藏和禁用。 –
你的意思是在完成動畫之後它變得隱藏和禁用。對?? –