BTW, the included tag is used to include another UI module as one part of the current UI module:
http://code.google.com/p/aost/wiki/UserGuide070TelluriumBasics#%22Include%22_Frequently_Used_Sets_of_Elements_in_UI_Modul But that UI module must be in the same UI module Groovy file, or as a parent class file. For example, your current UI module extends that UI module class file. On Thu, Sep 2, 2010 at 4:13 PM, Jade <[email protected]> wrote: > That would be great! I'm really enjoying using tellurium for testing. > Thank you to the team for all of your awesome work! > > BTW, I need to pass both modules to the method that has both list and > selector calls such as: > module.click listUid > selectModule.getSelectOptions(selectorId) > > However, now that the code in in both modules, I'm not sure how to get > a handle of the second module from my data driven tests? > > From the module that defines the List, I call the method passing in > "this" for the module that defines the test. "this" gets mapped to > module in the actual method. > > This is my function call in my module test_degree test definition: > > TestingUtils.selectClickableOption("DegreeInformationForm.degree", > "DegreeInformationClickedForm.degreeSelector", this, indxToTest, > shouldFail) > > Within this function, I need to refer to the second module that > includes the Selector definitions but I don't know how to do that in a > data driven test environment? > > I've also tried including the second module but perhaps that only > works with modules that aren't data driven. The include code is: > > Include(uid: "DISelectorsModule", ref: > "DegreeInformationSelectorsModule"). > > and the error is: > > org.telluriumsource.exception.UiObjectNotFoundException: Cannot find > UI Object DegreeInformationSelectorsModule > > Jade > > On Sep 2, 12:08 pm, Jian Fang <[email protected]> wrote: > > The option object may need to be updated to handle this scenario. Your > > problem presents an > > excellent user case for use of the option object. I will take a look and > see > > how to improve it some time later. > > > > Thanks, > > > > Jian > > > > On Thu, Sep 2, 2010 at 12:55 PM, Jade <[email protected]> wrote: > > > Hi Jian, > > > > > I first tried the option object; Is this definition correct? > > > > > Option(uid: "degree") { > > > Selector(uid: "degree", clocator: [id: > > > "aspect_vireo_admin_View_field_degree"]) > > > > > List(uid: "degree", clocator: [tag: > "ol", > > > id: > > > "aspect_vireo_admin_View_field_degree"], separator: "li") { > > > Container(uid: "{all}", > clocator: > > > [:]) > > > } > > > } > > > > > If so, this call, getSelectOptions("DegreeInformationForm.degree"), > > > gives me an error (as you thought it might) No signature of method: > > > org.telluriumsource.ui.object.UiObject.getSelectOptions() is > > > applicable for argument types: (org.telluriumsource.dsl.BaseDslContext > > > $_getSelectOptions_closure27) values: > > > [org.telluriumsource.dsl.BaseDslContext > > > $_getselectoptions_closur...@67ee75a5] > > > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > > > > > so I'll try defining two Modules and including both of them and > > > referring to the Selection once the user has clicked on the list. > > > > > Jade > > > > > On Sep 2, 11:20 am, Jian Fang <[email protected]> wrote: > > > > Hi Jade, > > > > > > The getSelectedValue() only applies to the Selector object and thus, > the > > > > List object > > > > does not have that method defined. > > > > > > Now, I understand your use case and seems the UI changes after the > user > > > > clicks on the list. > > > > I would suggest you define two UI objects, one for the List and one > for > > > the > > > > Selector, thus, > > > > you could click on the List and then select on the Selector. That > means > > > you > > > > may need to > > > > defined two UI modules, one for the UI before the list click and one > for > > > > after the click. > > > > > > Tellurium does have an option object to represent two different > runtime > > > UIs, > > > > but I am not > > > > sure if it works for your case. More details here: > > > > > >http://code.google.com/p/aost/wiki/UserGuide070UIObjects#Option > > > > > > Thanks, > > > > > > Jian > > > > > > On Thu, Sep 2, 2010 at 12:01 PM, Jade <[email protected]> wrote: > > > > > Hi Jian, > > > > > > > The fix allows my form to validate but I'm running into problems > > > > > manipulating the lists. I think that the problems that I'm having > may > > > > > be caused by Ajax since the select list is only selectable once the > > > > > user clicks on it. I tried out the 0.8.0 version with the List(). > > > > > > > I get this error No signature of method: > > > > > org.telluriumsource.ui.object.UiObject.getSelectedValue() is > > > > > applicable for argument types: > (org.telluriumsource.dsl.BaseDslContext > > > > > $_getSelectedValue_closure32) values: > > > > > [org.telluriumsource.dsl.BaseDslContext > > > > > $_getselectedvalue_closur...@94b318] > > > > > > > Here's the json for the college list: > > > > > > > {"obj":{"uid":"college","locator":{"tag":"ol","attributes": > > > > > {"id":"aspect_vireo_admin_View_field_college"}},"events": > > > > > ["click"],"uiType":"List","separator":"li","metaData": > > > > > > {"id":"college","type":"UiObject"}},"key":"DegreeInformationForm.college"}, > > > > > {"obj":{"uid":"_all","locator":{},"uiType":"Container","metaData": > > > > > {"id":"_all","index": > > > > > > {"value":"all","type":"VAL"},"type":"List"}},"key":"DegreeInformationForm.college._all"} > > > > > > > and the module def: > > > > > > > public void defineModule() { > > > > > ui.Form(uid: "DegreeInformationForm", clocator: > [tag: > > > > > "form", > > > > > method: "post", action: "${postAction}", class: "ds-interactive-div > > > > > view-form", id: "aspect_vireo_admin_View_div_view-form"]) { > > > > > InputBox(uid: "committee_member_2", > clocator: > > > [tag: > > > > > "input", id: > > > > > "aspect_vireo_admin_View_field_committee-member-2", type: "text"], > > > > > respond: ["click"]) > > > > > InputBox(uid: "committee_member_1", > clocator: > > > [tag: > > > > > "input", id: > > > > > "aspect_vireo_admin_View_field_committee-member-1", type: "text"], > > > > > respond: ["click"]) > > > > > List(uid: "degree", clocator: [tag: "ol", > id: > > > > > "aspect_vireo_admin_View_field_degree"], separator: "li", respond: > > > > > ["click"]) { > > > > > Container(uid: "{all}", clocator: > [:]) > > > > > } > > > > > InputBox(uid: "school", clocator: [tag: > > > "input", > > > > > id: > > > > > "aspect_vireo_admin_View_field_school", type: "text"], respond: > > > > > ["click"]) > > > > > InputBox(uid: "committee_email", clocator: > [tag: > > > > > "input", id: > > > > > "aspect_vireo_admin_View_field_committee-email", type: "text"], > > > > > respond: ["click"]) > > > > > InputBox(uid: "department", clocator: [tag: > > > "input", > > > > > id: > > > > > "aspect_vireo_admin_View_field_department", type: "text"], respond: > > > > > ["click"]) > > > > > List(uid: "college", clocator: [tag: "ol", > id: > > > > > "aspect_vireo_admin_View_field_college"], separator: "li", respond: > > > > > ["click"]) { > > > > > Container(uid: "{all}", clocator: > [:]) > > > > > } > > > > > InputBox(uid: "committee_member_3", > clocator: > > > [tag: > > > > > "input", id: > > > > > "aspect_vireo_admin_View_field_committee-member-3", type: "text"], > > > > > respond: ["click"]) > > > > > InputBox(uid: "discipline", clocator: [tag: > > > "input", > > > > > id: > > > > > "aspect_vireo_admin_View_field_discipline", type: "text"], respond: > > > > > ["click"]) > > > > > InputBox(uid: "semester", clocator: [tag: > > > "input", > > > > > id: > > > > > "aspect_vireo_admin_View_field_semester", type: "text"], respond: > > > > > ["click"]) > > > > > List(uid: "degreeLevel", clocator: [tag: > "ol", > > > id: > > > > > "aspect_vireo_admin_View_field_degreeLevel"], separator: "li", > > > > > respond: ["click"]) { > > > > > Container(uid: "{all}", clocator: > [:]) > > > > > } > > > > > } > > > > > > > I'm using the following jars: > > > > > > > tellurium-core-0.8.0-20100831.183952-27.jar > > > > > tellurium-udl-0.8.0-20100823.183714-19.jar > > > > > selenium-server-1.0.1-te3.jar > > > > > > > Do you know why the call to getSelectedValue() is failing for the > > > > > list? > > > > > > > BTW, I changed the List to a Selector in the module definition > (and > > > > > the tag to "select" and the separator to "option" but then I get > this > > > > > exception: > > > > > > > ERROR: Specified element is not a Select (has no options) > > > > > > > The problem is the college is an ordered list until it's selected, > > > > > then it becomes a select list. > > > > > > > UI Module DegreeInformationForm: > > > > > > > [{"obj":{"uid":"DegreeInformationForm","locator": > > > > > {"tag":"form","attributes":{"id":"aspect_vireo_admin_View_div_view- > > > > > form","action":"xmlui/vireo/admin/detail?update=true","class":"ds- > > > > > interactive-div view- > > > > > form","method":"post"}},"uiType":"Form","metaData": > > > > > {"id":"DegreeInformationForm","type":"UiObject"}},{"obj": > > > > > {"uid":"college","locator":{"tag":"ol","attributes": > > > > > {"id":"aspect_vireo_admin_View_field_college"}},"events": > > > > > ["click"],"uiType":"Selector","metaData": > > > > > > {"id":"college","type":"UiObject"}},"key":"DegreeInformationForm.college"}] > > > > > > > ----- > > > > > Diagnosis Result for DegreeInformationForm.college > > > > > > > ------------------------------------------------------- > > > > > > > Matching count: 1 > > > > > > > Match Elements: > > > > > > > --- Element 1 --> > > > > > > > <ol alt="fakefield_18" title="" > > > > > id="aspect_vireo_admin_View_field_college" class="fakeField > fakeSelect > > > > > ds-select-field college editable"><li class="hidden" id="">none</ > > > > > li><li class="selected" id="Information">Information</li><li > > > > > class="hidden" id="Test College4">Test College4</li><li > class="hidden" > > > > > id="Test College3">Test College3</li><li class="hidden" id="Test > > > > > College2">Test College2</li><li class="hidden" id="Test > College1">Test > > > > > College1</li><li class="hidden" id="CS">CS</li></ol> > > > > > > > ------- > > > > > The diagnosis is finding the fake tag which matches what firefox > sees > > > > > but it doesn't match the page source: > > > > > > > When I inspect the HTML for the select element in firefox, the list > is > > > > > hidden: > > > > > > > <ol class="fakeField fakeSelect ds-select-field college editable" > > > > > id="aspect_vireo_admin_View_field_college" title="" > > > > > alt="fakefield_18"><li id="" class="hidden">none</li><li > > > > > id="Information" class="selected">Information</li><li id="Test > > > > > College4" class="hidden">Test College4</li><li id="Test College3" > > > > > class="hidden">Test College3</li><li id="Test College2" > > > > > class="hidden">Test College2</li><li id="Test College1" > > > > > class="hidden">Test College1</li><li id="CS" > class="hidden">CS</li></ > > > > > ol> > > > > > > > However, the html page source for the same select list is: > > > > > > > <select id="aspect_vireo_admin_View_field_college" > class="ds-select- > > > > > field college editable" name="college"> > > > > > <option value="">none</option> > > > > > <option value="Information" > selected="selected">Information</option> > > > > > <option value="Test College4">Test College4</option> > > > > > <option value="Test College3">Test College3</option> > > > > > <option value="Test College2">Test College2</option> > > > > > > > <option value="Test College1">Test College1</option> > > > > > <option value="CS">CS</option> > > > > > </select> > > > > > > > Jade > > > > > > > On Aug 31, 2:59 pm, Jade <[email protected]> wrote: > > > > > > Thanks very much Jian for the quick fix! I'll try it out when I'm > > > back > > > > > > in the office on Thurs. > > > > > > > > Jade > > > > > > > > I'm having trouble finding the latest > > > > > > > > On Aug 31, 1:45 pm, Jian Fang <[email protected]> wrote: > > > > ... > > > > read more ยป > > -- > 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.
