Hello,
I am not sure what I am doing wrong with clearText. This function was
working before but it is not anymore.
In my DslContext class I have the following code:
uiModName = "createAccount";
public void defineUi()
{
ui.Form(uid: uiModName, clocator: [tag: "form", method: "post",
action: "
https://www.mysite.com/signup.jsp"])
{
InputBox(uid: "email", clocator: [id: "email"])
InputBox(uid: "newPassword", clocator: [id: "newPassword"])
InputBox(uid: "newPassword2", clocator: [id: "newPassword2"])
InputBox(uid: "firstName", clocator: [id: "firstName"])
InputBox(uid: "lastName", clocator: [id: "lastName"])
}
}
public void clearForm()
{
clearText uiModName + ".email"
clearText uiModName + ".newPassword"
clearText uiModName + ".newPassword2"
clearText uiModName + ".firstName"
clearText uiModName + ".lastName"
}
My html file has:
...
<input type="text" name="email" maxlength="80" id="email" value="" />
...
<input type="password" name="newPassword" maxlength="20"
id="newPassword" />
and so on. All of those id's exist in the html file.
The error I am getting is:
com.thoughtworks.selenium.SeleniumException: ERROR: Element
uimcal={"rid":"createAccount.newPassword","locator":"jquery=#newPassword"}
not found
at
com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:
97)
at
com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:
91)
...
back to every one of the clearText calls in the clearForm()
function.
But this function also in that DslContext class works fine:
public void fillOutForm(String email, String password, String
password2, String fn, String ln) throws SeleniumException
{
type uiModName + ".email", email
type uiModName + ".newPassword", password
type uiModName + ".newPassword2", password2
type uiModName + ".firstName", fn
type uiModName + ".lastName", ln
}
Any ideas why the clearText calls fail when the type calls work?