Hi,

clearText actually calls the type() command under the hood as shown in the
code

    def clearText(WorkflowContext context, String locator, String[] events)
{
        String[] defaultEvents = null
        if(extraEvent)
           defaultEvents = ["focus", "mouseOver", "mouseOut", "blur"]

        processEvents(context, locator, events, defaultEvents){
           cbp.type(context, locator, "")
        }
    }

I suspect this may not be a clearText() command problem, but a ui module
definition problem.

Could you try the following to validate the whole UI module

validate("createAccount");

or call the following methods to validate each UI?

  diagnose uiModName + ".email"
  diagnose uiModName + ".newPassword"
  diagnose uiModName + ".newPassword2"
  diagnose uiModName + ".firstName"
  diagnoset uiModName + ".lastName"

Please let us know what are the output.

Thanks,

Jian

On Fri, Jul 9, 2010 at 7:02 PM, kamundse <[email protected]> wrote:

> 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?
>
> --
> You received this message because you are subscribed to the Google Groups
> "tellurium-users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<tellurium-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/tellurium-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"tellurium-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tellurium-users?hl=en.

Reply via email to