The performance improvement is really impressive. It opens the door to convert the UI module directly to CSS statements. (I would not recommend to convert from XPath to CSS). Actually, we thought of this a long time ago, please see issue 8,
http://code.google.com/p/aost/issues/detail?id=8 But never had a chance to work on it. Dominicm, thanks for bringing this up and provide us the first hand data about performance in IE. Another idea might be to use JQuery to do the job. JQuery syntax is similar to the CSS statement. Right now, we have UI module | XPath ( or CSS) | ---------------------------------------------------- Tellurium Core | ---------------------------------------------------- Selenium Server | DOM node manipulation In the future, we may have UI module | Locator Query Language | ---------------------------------------------------- Tellurium Core | ---------------------------------------------------- Selenium Server | and/or Tellurium Engine JQuery | DOM node manipulation That is to say, we will use the Locator Query Language as a standard way to access a DOM node. This may take some time to implement. It would be interesting if someone could use JQuery to run the similar statement to see how fast it is in IE using JQuery. Thanks, Jian On Mar 6, 1:44 pm, dominicm <[email protected]> wrote: > Hi All, > > I've been looking at the possibility of using css selectors instead of > XPath to cure the IE performance problems. > > To do this I copied some Tellurium generated xpath expressions into a > Selenium test, then translated these into css syntax as follows: > > XPath syntax > sel.isElementPresent("//descendant-or-self::*/descendant-"+ > "or-self::tab...@id='MVContentPredictionsTable']/tbody/tr[child::td] > [8]/td[7]/des"+ > "cendant-or-self::*"); > > sel.getText("//descendant-or-self::*/descendant-"+ > "or-self::tab...@id='MVContentPredictionsTable']/tbody/tr[child::td] > [8]/td[7]/des"+ > "cendant-or-self::*"); > > css syntax > sel.isElementPresent("css=#MVContentPredictionsTable > tbody > tr:nth- > child(8) > td:nth-child(7)"); > > sel.getText("css=#MVContentPredictionsTable > tbody > tr:nth-child(8) > > > td:nth-child(7)"); > > When run in IE7 the selenium server output was as follows: > > 16:56:39.644 INFO - Command request: isElementPresent[//descendant-or- > self::*/de > scendant-or-self::tab...@id='MVContentPredictionsTable']/tbody/tr > [child::td][8]/ > td[7]/descendant-or-self::*, ] on session > 8e11e0ad889c472ca23475694039ec58 > 16:56:48.861 INFO - Got result: OK,true on session > 8e11e0ad889c472ca23475694039ec58 > 16:56:48.861 INFO - Command request: getText[//descendant-or-self::*/ > descendant- > or-self::tab...@id='MVContentPredictionsTable']/tbody/tr[child::td][8]/ > td[7]/des > cendant-or-self::*, ] on session 8e11e0ad889c472ca23475694039ec58 > 16:56:58.700 INFO - Got result: OK,2 on session > 8e11e0ad889c472ca23475694039ec58 > > 16:56:58.700 INFO - Command request: isElementPresent > [css=#MVContentPredictionsT > able > tbody > tr:nth-child(8) > td:nth-child(7), ] on session > 8e11e0ad889c472ca > 23475694039ec58 > 16:57:00.954 INFO - Got result: OK,true on session > 8e11e0ad889c472ca23475694039e > c58 > 16:57:00.954 INFO - Command request: getText > [css=#MVContentPredictionsTable > tb > ody > tr:nth-child(8) > td:nth-child(7), ] on session > 8e11e0ad889c472ca234756940 > 39ec58 > 16:57:02.803 INFO - Got result: OK,2 on session > 8e11e0ad889c472ca23475694039ec58 > > So the XPath statements took a total of 19 seconds to execute, while > the css statements took 4 seconds. > The css syntax probably won't work in IE6, but are fine in IE7 and FF3 > and Safari. > > From this it would appear that it is not too difficult to directly > translate XPath statements into css, and therefore it should be > possible to use the same Tellurium UI object definitions for css or > XPath. > > Comments anyone? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
