Hi Manoj,
You click on the small tag, which will not be responsive to any actions. You
should click on the Input radio button directly.
The following UI module is generated by Trump:
Form(uid: "root", clocator: [tag: "form", name: "tag-chooser-form", id:
"tag-chooser-form"]){
Container(uid: "T4ls", clocator: [tag: "li"]){
RadioButton(uid: "input0", clocator: [tag: "input", type: "radio",
name: "tc-type", value: "2", id: "tc-type-humor"])
TextBox(uid: "label2", clocator: [tag: "label", text: "Humor"])
}
Container(uid: "T4ls2", clocator: [tag: "li"]){
RadioButton(uid: "input1", clocator: [tag: "input", type: "radio",
name: "tc-type", value: "7018", id: "tc-type-opinion"])
TextBox(uid: "label3", clocator: [tag: "label", text: "Opinion"])
}
}
Of course, you may like to generalize it using the List object:
ui.Form(uid:"tags", clocator:[tag:"form", id:"tag-chooser-form"]){
List(uid: "list", clocator:[tag:"ul", id: "tc-type"], separator:"li"){
Container(uid: "all"){
RadioButton(uid: "input", clocator: [tag: "input", type:
"radio"])
TextBox(uid: "label", clocator: [tag: "label"])
}
}
}
The key is to have an abstract UI Container to include both the RadioButton
and TextBox objects, Then,
you can click on "tags.list[1].input".
Let us know if this works for you.
Thanks,
Jian
On Mon, Aug 10, 2009 at 3:34 PM, Manoj Chavan <[email protected]>wrote:
>
> Hi All,
>
> I have the following html source ..
>
>
> My GUI:
>
>
> -------------------------------------------------------------------------------
> | O RadioBtn 1 |
> | O RadioBtn 2 |
> |
> |
> |
> |
>
> --------------------------------------------------------------------------------
>
> <form id="tag-chooser-form" name="tag-chooser-form">
> <small> </small>
> <div id="step-content-type" class="">
> <small> </small>
> <ul id="tc-type">
> <small> </small>
> <li>
> <small>
> <input id="tc-type-humor" type="radio" value="2" name="tc-type"/>
> <label for="tc-type-humor">Humor</label>
> </small>
> </li>
> <small> </small>
> <li>
> <small>
> <input id="tc-type-opinion" type="radio" value="7018" name="tc-type"/>
> <label for="tc-type-opinion">Opinion</label>
> </small>
> </li>
> <small> </small>
>
>
> ................<rest deleted >........
>
> </form>
>
>
>
> My module def.
>
> ui.Form(uid:"tags", clocator:[tag:"form", id:"tag-chooser-form"]){
>
> // Tag Type
> List(uid:"tagtype", clocator:[tag:"ul", id: "tc-type"],
> separator:"li"){
> UrlLink(uid: "all", clocator:[tag:"small"],
> respond:["click"])
> }
>
> // Tag Topics
> Container(uid:"topic", clocator:[tag:"div",
> id:"popular-topics"]){
> List(uid:"tagtopic", clocator:[tag:"ul"],
> separator:"li"){
> UrlLink(uid: "all", clocator:[tag:"small"],
> respond:["click"])
> }
> }
>
> //Continue to Topic Selection
> UrlLink(uid:"continue", clocator:[tag:"a",
> id:"continue-after-type"])
> }
>
> public void selectTagtype(int i){
> click "tags.tagtype[" + i +"]"
> pause 500
> }
>
>
>
> Question: In my test case I call 'selectTagtype(1);
>
> I do not get any error but the radio button is not getting selected. The
> click is happening in the 'li' elements space and
> not in the 'small' tags space for the button to be selected. How do I
> ensure the click is recorded and the correct radio
> btn is selected?
>
>
> Regards,
>
> Manoj
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---