当前位置: 动力学知识库 > 问答 > 编程问答 >

selenium - Selecting popup without title and clicking button inside it with geb

问题描述:

I have a popup without title and I want to detect the window using any other criteria (for example a div that wraps the whole popup) and click a button inside it.

I've tried the following:

 when:

withWindow({ $("div", class:"main.msgAlert" )}) {

$('#close').click()

}

then: true

But I always get a org.openqa.selenium.ElementNotVisibleException at te #close action.

Am I failing at detecting the window or is the error related to the button?

分享给朋友:
您可能感兴趣的文章:
随机阅读: