Well, the easiest way is to use Tellurium directly since Tellurium
will automatically
generate the jQuery selector from your UI module, which is just a
collection of UI elements
defined by their attributes. In this way, you don't even need to hard
code your jQuery
selector. More important thing is that Tellurium can cache jQuery
selector for reuse and it
also does jQuery selector optimization under the hood. For example, if
you have an
id in the jQuery selector such as,

div[class='spinner'] > table > tr > td#myID

Tellurium will use the id directly and ignore everthing before it,
i.e., "#myID".

>From our experience, jQuery should run pretty fast in IE and that is
one of the main
reasons why we add jQuery selector support in Tellurium 0.6.0.
However, I suspect
that your problem may be the style attribute itself. Please take a
look at this wiki page.

http://code.google.com/p/aost/wiki/CustomJQuerySelectorInTellurium#:styles

Thanks,

Jian

On Oct 13, 7:56 pm, Xin <[email protected]> wrote:
> Hi there,
> I am very new to the world of jQuery and tellurium.  As my exploring
> testing, my first step will be just use jQuery selector inside my
> selenium Test Unit.
>
> Can any one give an example how jQuery Selector is used inside the
> selenium Test Unit.  I have seem a lot of examples to use jQuery to
> enhance the javascript inside the user-extensions.js file.   However,
> this seems not the way that will fit into my testing framework built
> based on Selenium RC
>
> What I have done is :
> 1)  I loaded jQuery inside the selenium core,
> 2) after the initialization of selenium instance, I did :
> _selenium.addLocationStrategy("jquery", " var found = $
> (inDocument).find(locator); if(found.length == 1 ){ return found[0]; }
> else if(found.length > 1){ return found.get(); }else{ return null; }
> ");
>
> 3) I have a css locator as : "css=div[class='spinner'][style
> $='display: none;']"; on which I did the action as
> _selenium.isElementPresent("css=div[class='spinner'][style$='display:
> none;']").
>    now I change the locator as "jquery=div[class='spinner'][style
> $='display: none;']", and hoping to be able to do the action as
> _selenium.isElementPresent("jquery=div[class='spinner'][style
> $='display: none;']") with IE as the borwser.  I found out that it
> take extremly long time for selenium framework to execute this code
> with IE.
>
> Can anyone please suggest if I have use the right way of jQuery. and
> give an examle how jQuery selector is supposed to be used inside
> selenium.
>
> Many thanks
>
> Xin
--~--~---------~--~----~------------~-------~--~----~
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