[英]how to handle the selenium script to validate the completion of report which takes 20 minutes using selenium webdriver?
在我的項目中,工作流的結束是生成特定報告並在報告完成后使用數據庫驗證報告詳細信息。 單擊生成按鈕后,報告將立即處於進行中狀態。 完成並在 UI 中顯示狀態需要 15 到 25 分鍾。 我想知道如何處理這個問題並等待報告完成並繼續進行報告與數據庫驗證?
我想這樣的事情應該可以工作:
WebDriverWait wait = new WebDriverWait(getDriver(), 1800);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("successStatus")));
將getDriver()
替換為您的 WebDriver,將1800
替換為您想要等待的successStatus
,將successStatus
替換為顯示您的成功消息的元素 ID(或任何其他適合您需要的 By 對象)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.