Hello Hari,

I am trying to call a java script function on clicking a radio button and
its working fine.
The coding is as given below:

UI Def:

 ui.Form(uid: "root", clocator: [tag: "form", name: "FormName", method:
"post", action: "/action", id: "login_form"]) {
      RadioButton(uid: "radio1", clocator: [tag: "input", type: "radio",
value: "Butter", name: "group1"], respond: ["click"])
      RadioButton(uid: "radio2", clocator: [tag: "input", type: "radio",
value: "Milk", name: "group1"], respond: ["click"])
    }

Groovy Method:

 public  login() {
    click("root.radio2")
  }

Thanks,
Khush.

On Thu, Dec 10, 2009 at 3:00 PM, Harihara Vinayakaram <[email protected]>wrote:

> Hi
>    I have the following UI Definition . The code in the page has a onClick
> for the radio button . Selenium has a problem in firing Events (
> http://blogs.atlassian.com/developer/2007/08/selenium_is_the_pain_worth_it.html)
> . So the onClick event is not fired .
>
>    I thought I will get the event to fire by manually addiing either a
> mouseDown or a click event in the respond. But I am getting an error like
>
> groovy.lang.MissingMethodException: No signature of method: 
> org.tellurium.object.UiObject.mouseDown() is applicable for argument types: 
> (org.tellurium.dsl.BaseDslContext$_mouseDown_closure48) values: 
> [org.tellurium.dsl.basedslcontext$_mousedown_closur...@17c3900]
>
>       at 
> org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
>       at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:55)
>
>       at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:191)
>       at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:207)
>       at org.tellurium.object.UiObject.methodMissing(UiObject.groovy:120)
>
>       at groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:825)
>       at 
> groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1103)
>       at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1063)
>
>       at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892)
>       at 
> org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39)
>       at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:43)
>
>       at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
>       at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
>       at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callSafe(AbstractCallSite.java:89)
>
>       at org.tellurium.dsl.BaseDslContext.mouseDown(BaseDslContext.groovy:640)
>       at org.tellurium.dsl.BaseDslContext$mouseDown.callCurrent(Unknown 
> Source)
>       at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:47)
>
>       at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:142)
>       at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:150)
>       at 
> com.yostech.arogyabhagya.modules.DependantPageUtils.editDependantPage(DependantPageUtils.groovy:43)
>
>       at 
> com.yostech.arogyabhagya.modules.DependantPageUtils$editDependantPage.call(Unknown
>  Source)
>       at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:43)
>       at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
>
>       at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
>
>
> Not sure what is that I am missing
>
> Regards
> Hari
>
>  ui.Table(uid:"dependantsTable", clocator:[class:"striped"],
> respond:"mouseDown"){
>             RadioButton(uid : "row: *, column:1",
> clocator:[id:"^dependent"],respond:"mouseDown") // Radio button to select
> the user
>             TextBox(uid: "row:*,column:2") // FirstName
>             TextBox(uid:"row:*,column:3") // LastName
>             TextBox(uid:"row:*,column:4") // Relation with main member
>             TextBox(uid:"row:*,column:5") // Gender
>             TextBox(uid:"row:*,column:6") // Age
>             TextBox(uid:"row:*,column:7") // DOB
>             TextBox(uid:"row:*,column:8") // Photo
>         }
>
>  --
> 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.
>



-- 
Khushwinder

--

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