gpt4 book ai didi

ajax - Grails + Selenium-rc-提交AJAX表单

转载 作者:行者123 更新时间:2023-12-02 14:46:37 24 4
gpt4 key购买 nike

我在测试帐户创建过程时遇到问题。这是我得到的错误:

Object [object HTMLIFrameElement] has no method 'getCurrentWindow'
com.thoughtworks.selenium.SeleniumException: Object [object HTMLIFrameElement] has no method 'getCurrentWindow'
at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97)
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91)
at com.thoughtworks.selenium.DefaultSelenium.waitForPageToLoad(DefaultSelenium.java:635)
at com.thoughtworks.selenium.Selenium$waitForPageToLoad$0.call(Unknown Source)
at grails.plugins.selenium.SeleniumWrapper.waitForPageToLoad(SeleniumWrapper.groovy)
at com.thoughtworks.selenium.Selenium$waitForPageToLoad.call(Unknown Source)
at grails.plugins.selenium.meta.AndWaitDynamicMethod.invoke(AndWaitDynamicMethod.groovy:33)
at grails.plugins.selenium.SeleniumWrapper.methodMissing(SeleniumWrapper.groovy:125)
at tokenadmin.SignUpTests.testManualSignUp(SignUpTests.groovy:33)

这是屏幕截图:

以及相关代码的一部分:
    selenium.waitForElementPresent("css=#registerForm");
selenium.type("name=name", "selenium test 1");
selenium.type("name=email", emailAddress);
selenium.type("css=input[tabindex=\"13\"]", "123123");
selenium.type("name=password1", "123123");
selenium.type("css=input[tabindex=\"14\"]", "123123");
selenium.type("name=password2", "123123");
selenium.submitAndWait("css=#registerForm")
assertTrue(selenium.isTextPresent("Please confirm your e-mail address"));

有什么想法怎么办?

更新:

我将所有内容都更改为localhost:8080,然后突然开始工作。不知道为什么。

最佳答案

将项目网址更改为localhost:8080后,它开始工作

关于ajax - Grails + Selenium-rc-提交AJAX表单,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8422285/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com