As I replied in the previous email, you could either change the InputBox to
UrlLink by overwriting the default tag to "input".

Or use the respond attribute, for example,

InputBox(uid: "loginbtn", clocator: [tag: "input", type: "image", class:
"login_button", src: "/images/sprites/buttons.jpg"], respond: ["click"])

In this way, the click method will be added at runtime.

On Tue, Jun 16, 2009 at 5:00 PM, Manoj Chavan <[email protected]>wrote:

> No There wasnt.. it passed. Here is the output.
>
> // Login Form Def
>         ui.Form(uid: "brlogin", clocator: [tag: "form", method: "post",
> action: "/login"]){
>             InputBox(uid: "uid", clocator: [tag: "input", type: "text",
> class: "email hint text-input", name: "user[email]", id:
> "inline-login-email"])
>             InputBox(uid: "pwd", clocator: [tag: "input", type:
> "password",  class: "password hint text-input", name: "user[password]", id:
> "inline-login-password"])
>             InputBox(uid: "loginbtn", clocator: [tag: "input", type:
> "image", class: "login_button", src: "/images/sprites/buttons.jpg"])
>         }
>
> //MY Methods
>      public void typeUid(String input){
>          type "brlogin.uid", input
>      }
>
>      public void typePwd(String input){
>          type "brlogin.pwd", input
>      }
>
>      public void clickLogin(){
>          click "brlogin.loginbtn"          << This throws an exception as
> click is not defined for InputBox.... How can I
>                                                            resolve this.
>          waitForPageToLoad 30000
>      }
>
>
>
>
> *From:* Jian Fang <[email protected]>
> *To:* [email protected]
> *Sent:* Tuesday, June 16, 2009 1:54:02 PM
>
> *Subject:* Re: Help with Groovy Module
>
> When you create the UI module using TrUMP, did the UI module pass the
> validation? Was there any
> red mark "X" on the UI module?
>
> On Tue, Jun 16, 2009 at 4:51 PM, Manoj Chavan <[email protected]>wrote:
>
>>
>>
>> Thanks John... TrUMP was similar except the last UrlLink  was defined as
>> InputBox.
>>
>> Manoj
>>
>>
>>
>> ----- Original Message ----
>> > From: John <[email protected]>
>> > To: tellurium-users <[email protected]>
>> > Sent: Tuesday, June 16, 2009 1:16:06 PM
>> > Subject: Re: Help with Groovy Module
>> >
>> >
>> > Seems this is a perfect example for TrUMP. What is the UI module
>> > generated by TrUMP?
>> >
>> > On Jun 16, 3:27 pm, Manoj Chavan wrote:
>> > > Hi Need some expert help with a Form definition.
>> > >
>> > > Below is the html for this I have defined the Groovy Definition. At
>> the end I
>> > have placed the error I am getting
>> > > trying to identify the controls. What did I miss. Thanks for all the
>> help and
>> > the guidance.
>> > >
>> > > Manoj
>> > >
>> > >
>>
>> > >
>>
>> > >
>>
>> > >
>>         *
>> > >
>> > value="Email Address" name="user[email]"/>
>> > >
>> > >
>>         *
>> > >
>> > type="password" value="Password" name="user[password]"/>
>> > >
>> > >
>>         *
>> > >
>> > >
>> > >
>>        *
>> > > Forgot password?
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > // Login Form Def
>> > >         ui.Form(uid: "brlogin", clocator: [action: "/login", method:
>> "post"],
>> > group: "true") {
>> > >             InputBox(uid: "uid", clocator: [id: "inline-login-email" ,
>> name:
>> > "user[email]"])
>> > >             InputBox(uid: "pwd", clocator: [id:
>> "inline-login-password", name:
>> > "user[password]"])
>> > >             UrlLink(uid: "loginbtn", clocator: [class: "login_button",
>> src:
>> > "/images/sprites/buttons.jpg"])
>> > >         }
>> > >
>> > > Dump locator information for brlogin
>> > > -------------------------------------------------------
>> > > brlogin: //descendant-or-self::fo...@action="/login" and
>> @method="post"]
>> > >
>> > > brlogin.uid:
>> > //descendant-or-self::form[descendant::inp...@id="inline-login-email"
>> and
>> > @name="user[email]"] and descendant::inp...@id="inline-login-password"
>> and
>> > @name="user[password]"] and descendant::a...@class="login_button" and
>> > @src="/images/sprites/buttons.jpg"] and @action="/login" and
>> > @method="post"]/descendant-or-self::inp...@id="inline-login-email" and
>> > @name="user[email]"]
>> > >
>> > > brlogin.pwd:
>> > //descendant-or-self::form[descendant::inp...@id="inline-login-email"
>> and
>> > @name="user[email]"] and
>> > > descendant::inp...@id="inline-login-password" and
>> @name="user[password]"] and
>> > descendant::a...@class="login_button" and
>> @src="/images/sprites/buttons.jpg"] and
>> > @action="/login" and
>> > @method="post"]/descendant-or-self::inp...@id="inline-login-password"
>> and
>> > @name="user[password]"]
>> > >
>> > > brlogin.loginbtn:
>> > //descendant-or-self::form[descendant::inp...@id="inline-login-email"
>> and
>> > @name="user[email]"] and descendant::inp...@id="inline-login-password"
>> and
>> > @name="user[password]"] and descendant::a...@class="login_button" and
>> > @src="/images/sprites/buttons.jpg"] and @action="/login" and
>> > @method="post"]/descendant-or-self::a...@class="login_button" and
>> > @src="/images/sprites/buttons.jpg"]
>> > > -------------------------------------------------------
>> > >
>> > > 12:18:02.985 INFO - Command request:
>> >
>> mouseOver[//descendant-or-self::form[descendant::inp...@id="inline-login-email"
>> > and @name="user[email]"] and
>> descendant::inp...@id="inline-login-password" and
>> > @name="user[password]"] and descendant::a...@class="login_button" and
>> > @src="/images/sprites/buttons.jpg"] and @action="/login" and
>> > @method="post"]/descendant-or-self::inp...@id="inline-login-email" and
>> > @name="user[email]"], ] on session 100ee604607c40bca80932608bab3bac
>> > > 12:18:03.028 INFO - Got result: ERROR: Element
>> > //descendant-or-self::form[descendant::inp...@id="inline-login-email"
>> and
>> > @name="user[email]"] and descendant::inp...@id="inline-login-password"
>> and
>> > @name="user[password]"] and descendant::a...@class="login_button" and
>> > @src="/images/sprites/buttons.jpg"] and @action="/login" and
>> > @method="post"]/descendant-or-self::inp...@id="inline-login-email" and
>> > @name="user[email]"] not found on session
>> 100ee604607c40bca80932608bab3bac
>> > > 12:18:03.043 INFO - Command request:
>> > captureScreenshot[Screenshot1245179883037.png, ] on session
>> > 100ee604607c40bca80932608bab3bac
>> > > 12:18:03.047 INFO - Creating Robot
>> > > 12:18:04.493 INFO - Got result: OK on session
>> 100ee604607c40bca80932608bab3bac
>> > > Screenshot for exception <
>> > //descendant-or-self::form[descendant::inp...@id="inline-login-email"
>> and
>> > @name="user[email]"] and descendant::inp...@id="inline-login-password"
>> and
>> > @name="user[password]"] and descendant::a...@class="login_button" and
>> > @src="/images/sprites/buttons.jpg"] and @action="/login" and
>> > @method="post"]/descendant-or-self::inp...@id="inline-login-email" and
>> > @name="user[email]"] not found>> is saved to file
>> Screenshot1245179883037.png
>> >
>>
>>
>>
>>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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