I update the code to enhance the jQuery selector by

1) Remove tag if ID presents
2) Allow partial matching for the ID attribute, you can use the same
partial matching symbol "^", "$", "*", and "!" now.
3) Always look at the flag in the workflow context, this may solve
your 3rd problem
4) Add a jQuery selector optimizer to pickup the real useful part of
the selector and ignore the rest.

The artifacts are updated in our Maven repo and our user group. Please
test them and let us know
if you have any problem.

Thanks,

Jian

On Apr 16, 11:30 am, dominicm <[email protected]> wrote:
> Yes, for these tables at least.
>
> On Apr 16, 3:43 pm, Jian Fang <[email protected]> wrote:
>
> > I see, you want to get cell text for example
>
> > table > tbody > tr > td
>
> > On Thu, Apr 16, 2009 at 10:38 AM, dominicm 
> > <[email protected]>wrote:
>
> > > Tried
>
> > > TextBox(uid:'all',clocator:[:])
>
> > > This works for XPath but no JQuery.
>
> > > Removing the "all" uid also worked for my other troublesome table.
>
> > > On Apr 16, 3:16 pm, John <[email protected]> wrote:
> > > > Thanks Dominicm, please see my replies inline.
>
> > > > On Apr 16, 10:01 am, dominicm <[email protected]> wrote:
>
> > > > > Hi John,
>
> > > > > 1. For the Infinity sign, Selenium does return "?" but when I convert
> > > > > this to a double, it correctly returns Infinity.
> > > > > 2. The above was noticed because of the "position" problem. Here is
> > > > > part of my uiObject
> > > > > ontainer(uid:'runnerSummary',clocator:[tag:'table']){
> > > > >         Selector(uid:'runnerSelect', clocator:[id:'myBetsBetView'])
> > > > >         Div(uid:'totalMatched',clocator:[tag:'span',position:'2'])
> > > > >         Div(uid:'runnerMatched',clocator:[tag:'span',position:'3'])
> > > > >         Div(uid:'lastMatched',clocator:[tag:'span',position:'4'])
> > > > >         Div(uid:'projectedBsp',clocator:[tag:'span',position:'5'])
>
> > > > > }
>
> > > > > For jQuery to work I have to take 1 from all of the position numbers,
> > > > > i.e.
>
> > > > > ontainer(uid:'runnerSummary',clocator:[tag:'table']){
> > > > >         Selector(uid:'runnerSelect', clocator:[id:'myBetsBetView'])
> > > > >         Div(uid:'totalMatched',clocator:[tag:'span',position:'1'])
> > > > >         Div(uid:'runnerMatched',clocator:[tag:'span',position:'2'])
> > > > >         Div(uid:'lastMatched',clocator:[tag:'span',position:'3'])
> > > > >         Div(uid:'projectedBsp',clocator:[tag:'span',position:'4'])
>
> > > > > }
>
> > > > This is a bug in the jQuery builder, I will fix it and you should be
> > > > able to use
> > > > the same UI definition.
>
> > > > > 3. I'm using multiople uiObjects in most of my tests. If I have
> > > > > disableJQuerySelector in one and useJQuerySelector in another, this
> > > > > causes conflicts. Depending upon which is defined first, I get either:
> > > > > jquery selector called without "jquery=" prefix or
> > > > > XPath selector called with "jquery=" prefix.
> > > > > Any uiObjects that do not use either method correctly use XPath
> > > > > selectors.
>
> > > > I will look into this. But you could call useJQuerySelector() from
> > > > your test class and not put in the UI module class.
> > > > I do apologize because I put bad examples there.
>
> > > > The UI module should not be coupling with which locator you use. I
> > > > will
> > > > change the examples.
>
> > > > > 4. I think it is possible to use a wildcard for an id if it is
> > > > > accessed as an attribute rather that using #.
>
> > > > I will look into this.
>
> > > > > 5. I think this problem is due to the fact that XPath selectors use
> > > > > "descendant-or-self", which is not really the same (as I understand
> > > > > it) to " *", which is just "descendant". I've worked around the
> > > > > problem in the following way.
> > > > > Table was defined as follows:
>
> > > > > Table(uid:'marketDepth', clocator:[class:'GlobalTableBorder'],
> > > > > group:'true'){
> > > > >         Button(uid:"row:1, column:1",clocator:[name:'acceptButton'])
> > > > >         TextBox(uid:'all')
>
> > > > > }
>
> > > > Could you try the following?
>
> > > > TextBox(uid:'all', clocator: [:])
>
> > > > > Removing the TextBox element fixed this problem. Not sure how this may
> > > > > affect some of my other tables.- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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