我需要確認一個模式彈出窗口。我有一張填滿的表格,必須轉到下一頁。當我點擊繼續時,會出現一個模式彈出窗口,詢問填充的細節是否正確?無法使用硒在模態彈出窗口中查找元素
有兩個按鈕和一些其他描述。一個鍵讀取取消等說Yes, information is correct.
我試圖通過
driver.switchTo().frame(0); // there is only one popup
但是,無論我做webDriver
因爲沒有webelement發現在NullPointerException
導致後切換到模式的元素。
這正是我試圖
WebElement modalButtonContainer = AutoUtils.findElementByClassName(modalOverlay, "modalButtonContainer");
WebElement modalButton = AutoUtils.findElementByClassName(modalButtonContainer, "buttonClass");
modalButton.click();
但在NullPointer
所有結果。我如何點擊modalButton
?
分享網站的網址。 –