Selenium Geb测试失败,在PhantomJS中使用Geb.waiting.WaitTimeoutException,通过的是Chrome&;火狐

Selenium Geb测试失败,在PhantomJS中使用Geb.waiting.WaitTimeoutException,通过的是Chrome&;火狐,selenium,grails,phantomjs,geb,Selenium,Grails,Phantomjs,Geb,我正在Grails/Angular应用程序中实现Geb/Selenium。我对Geb和Selenium都是新手。运行以下Geb测试时: def "navigate to User edit page" () { given: login(admin, pass) when: waitFor { to UserListPage } then: at (new UserListPage()) waitFor {

我正在Grails/Angular应用程序中实现Geb/Selenium。我对Geb和Selenium都是新手。运行以下Geb测试时:

def "navigate to User edit page" () {
    given:
        login(admin, pass)
    when:
        waitFor { to UserListPage }
    then:
        at (new UserListPage())
        waitFor { userList.hasUser("admin") }
        userList.hasUser("marisa.adelman")
    when:
        userList.clickUser("marisa.adelman")
    then:
        waitFor(60) { at (new UserMaintenancePage()) }
}
userList.clickUser(“marisa.adelman”)
为提供的用户查找表中的行,并单击该行以加载维护页面。该测试在Chrome和Firefox中都通过,但在PhantomJS中使用WaitTimeoutException运行时失败,如下所示:

    Failure:  |
navigate to User edit page(vdo.auth.AdminFunctionalSpec)
 |
geb.waiting.WaitTimeoutException: condition did not pass in 60.0 seconds.     Failed with exception:
geb.waiting.WaitTimeoutException: condition did not pass in 10.0 seconds.     Failed with exception:
Assertion failed: 

$("form", id: "frmUserCreateEdit")
|
[]

at geb.waiting.Wait.waitFor(Wait.groovy:138)
at geb.waiting.DefaultWaitingSupport.doWaitFor(DefaultWaitingSupport.groovy:51)
at geb.waiting.DefaultWaitingSupport.waitFor(DefaultWaitingSupport.groovy:42)
at geb.Page.waitFor(Page.groovy:511)
at geb.Browser.methodMissing(Browser.groovy:207)
at geb.spock.GebSpec.methodMissing(GebSpec.groovy:56)
at vdo.auth.AdminFunctionalSpec.navigate to User edit         page(AdminFunctionalSpec.groovy:123)
Caused by: geb.waiting.WaitTimeoutException: condition did not pass in 10.0         seconds. Failed with exception:
Assertion failed: 

$("form", id: "frmUserCreateEdit")
|
[]

at geb.waiting.Wait.waitFor(Wait.groovy:138)
at geb.Page.verifyThisPageAtOnly(Page.groovy:226)
at geb.Page.verifyAt(Page.groovy:182)
at geb.Browser.doAt(Browser.groovy:455)
at geb.Browser.at(Browser.groovy:354)
at geb.spock.GebSpec.methodMissing(GebSpec.groovy:56)
at vdo.auth.AdminFunctionalSpec.navigate to User edit     page_closure13(AdminFunctionalSpec.groovy:123)
at geb.waiting.Wait.waitFor(Wait.groovy:127)
... 6 more
原因:断言失败:

$("form", id: "frmUserCreateEdit")
|
[]

at     vdo.auth.pages.UserMaintenancePage._clinit__closure1(UserMaintenancePage.groovy:1    0)
at geb.waiting.Wait.waitFor(Wait.groovy:127)
... 13 more
我已经尝试将个人等待的超时时间设置为10到60秒;GebConfig超时时间介于10到60秒之间
atCheckWaiting
在UserMaintenancePage等页面上设置为true。所有这些都没有运气


我是否缺少一个PhantomJS配置设置,或者是否有某种解决方法可以实际测试到页面的链接?任何其他指针都会很感激

测试的输出是什么?也许在phantomJs文件夹结果中,您发现了一个空html和空屏幕截图?如果是,我也有同样的怪癖行为(测试在chrome或firefox中运行良好,但在phantomJs下失败),这是由我的公司卡巴斯基防病毒软件引起的。一旦禁用,它又开始工作…测试的输出是什么?也许在phantomJs文件夹结果中,您发现了一个空html和空屏幕截图?如果是,我也有同样的怪癖行为(测试在chrome或firefox中运行良好,但在phantomJs下失败),这是由我的公司卡巴斯基防病毒软件引起的。一旦禁用,它又开始工作。。。