I think i understand what you mean. let me rephrase so we are sure we understand eachother:
jlocator will allow a hash of attributes, and generate the jquery under the hood in tellurium core. for most objects, methods will stay the same, except be using jquery instead of xpath in selenium-core some objects, where it makes sense, like the list object, and maybe some container objects can have new methods that will return multiple items from the object's children. am i getting close to your meaning? On Dec 11, 12:44 pm, [email protected] wrote: > jlocator should be a hash map like clocator > > jlocator: [attributes] > > Then you should automatically generate the appropriate JQuery in the > selenium > core level. > > In your example, > > ui.Button(uid:"button", jlocator:"button") > > Yes, it should only return one button since you only defined one > Button. I prefer not > to define the ButtonCollection object since it is an abstract object > and not really clear to user what > the UI may look like. If you really have multiple buttons under one > tag, you should > use the List object. In the list object, you should have some code to > select multiple > buttons or select one specific button. > > With that has been said, the processing flow may look like as follows, > > UI jlocator definition > > | attributes > > UI object > > | search criteria based on object methods > > EventHandler > > | > > modified Selenium RC > > | > > new Selenium Core or Tellurium Engine (JQuery) > > Thanks, > > Jian > > On Dec 11, 10:23 am, Mikhail Koryak <[email protected]> wrote: > > > That makes sense for the table object, because you can supply the > > table id, and from that id you can locate the table, and from that can > > get the table html and find out exactly how many rows, columns, and > > headers it has, and the generate the xpath to access any cell. so just > > by knowing the id of the table, you can have methods to access cells, > > you can have a method to get the text of all elements in a row or a > > column etc. > > > But what i am having a problem with is the following scenario: lets > > say you have a jlocator that looks like this: > > > ui.Button(uid:"button", jlocator:"button") > > > the jquery $("button") is what was asked for, which selects all DOM > > elements that have the tag button. Now we have a collection of buttons > > selected in the uid button. what happens when you write > > click "button" > > should i click the 1st element in the collection of buttons? is this > > what the user expects to happen? > > > on the other hand, maybe we should constrain existing elements such as > > ui.Button to expect the jquery to select a single element, and add new > > objects such as ui.ButtonCollection to support multiple elements. in > > this example ButtonCollection would have methods that work well > > collections, such as getting multiple elements, etc. > > > Back to your original question: > > i can add suppport for generating different jquery for each object > > under the hood, but i will need help defining what that jquery should > > be > > > On Dec 10, 10:42 am, [email protected] wrote: > > > > Sorry, I did not reply to the list for last post. > > > > For methods that return void, a single element, or multiple elements, > > > the passed in search criteria should be different and that part should > > > be handled at the Tellurium core level, i.e., inside the Tellurium > > > object. For example, you can take a look at how a cell, a row, or a > > > column are handled in the Table object. For jlocator case, we need to > > > do this in a similar way, i.e., pass different search criteria. > > > > Thanks, > > > > Jian > > > > Jian, > > > that sounds good, i think that all Action methods, the ones that > > > return void, should act on a single element, that makes the most > > > sense, and should throw an error multiple elements are passed in. on > > > the other hand the accessor methods should allow for multiple elements > > > to be passed in. > > > > does this sound right to you? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
