我有一个没有标题的弹出窗口,我想使用任何其他条件检测窗口(例如包装整个弹出窗口的div)并单击其中的按钮。
我尝试了以下内容:
when:
withWindow({ $("div", class:"main.msgAlert" )}) {
$('#close').click()
}
then: true
但我总是在te #close行动中获得org.openqa.selenium.ElementNotVisibleException
。
我是否未能检测到窗口或是否与按钮有关?