Hi dominicm,

Did you run in IE?

Thanks,

Jian

On Apr 15, 12:01 pm, dominicm <[email protected]> wrote:
> Hi All,
>
> I've conducted some very basic relative timings for JQuery vs XPath
> selectors in Selenium, using the same rather old and difficult
> frontend code as I used when baselining css selectors.
>
> Code is as follows:
>
> Use faster XPath library
> sel.useXpathLibrary("javascript");
> sel.isElementPresent("//descendant-or-self::*/descendant-"+
>         "or-self::tab...@id='MVContentPredictionsTable']/tbody/tr[child::td]
> [8]/td[5]/des"+
>         "cendant-or-self::*");
>
> sel.getText("//descendant-or-self::*/descendant-"+
>         "or-self::tab...@id='MVContentPredictionsTable']/tbody/tr[child::td]
> [8]/td[5]/des"+
>         "cendant-or-self::*");
>
> sel.isElementPresent("jquery=* table#MVContentPredictionsTable > tbody> 
> tr:has(td):eq(8) > td:eq(5)");
>
> sel.getText("jquery=* table#MVContentPredictionsTable > tbody > tr:has
> (td):eq(8) > td:eq(5)");
>
> Performance for the above for both JQuery and css was appalling,
> taking over 2 minutes in total, compared to 20secs for XPath.
>
> The only way I could get JQ to respond in a decent time (4secs) was to
> modify the selector to
> "jquery=*#MVContentPredictionsTable > tbody > tr:has(td):eq(8) > td:eq
> (5)"
> but this did not find the correct element
--~--~---------~--~----~------------~-------~--~----~
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