如何使用Geb在firefox上单击弹出窗口

如何使用Geb在firefox上单击弹出窗口,firefox,selenium-webdriver,geb,Firefox,Selenium Webdriver,Geb,我正在使用Geb编写测试。我使用的浏览器是Firefox。我想单击一个下拉列表,该列表在单击菜单按钮后显示。我可以点击菜单按钮,它会给我一个下拉列表,但我不能选择我想要的项目,Firefox只是挂起。Chrome很好用 这是我的密码: container.menuButton.click() // this works fine. A list of appears. container.menuOption("Coke").click() // the selection doesn't ha

我正在使用Geb编写测试。我使用的浏览器是Firefox。我想单击一个下拉列表,该列表在单击菜单按钮后显示。我可以点击菜单按钮,它会给我一个下拉列表,但我不能选择我想要的项目,Firefox只是挂起。Chrome很好用

这是我的密码:

container.menuButton.click() // this works fine. A list of appears.
container.menuOption("Coke").click() // the selection doesn't happen here it just hangs

如何让Firefox工作?

您能编写
menuOption()
函数实现吗?我认为这里有问题。菜单选项{String option->def menuClasses=[“Coke”:“Coke”:“Fanta”:“Fanta”,“Sprite”:“Sprite”]find(“.menu container.item.${menuClasses[option]}”)}这是否只是一个简单的HTML选择,您正在使用它作为“下拉”列表?