Setya wrote:
> Hi all,
>
> We test our RAP application using Selenium, is it possible to obtain reference
> to underlying widget using xpath instead of id ?
>
>   

Oh yes, it is. But it's not straight-forward. The issue here is that 
widgets are just a bunch of <div>s on the DOM level (You understand we 
are talking about DOM objects when we talk about a widget, not 
Javascript objects, right?!). Of course you can get at them using Xpath, 
have a look at the Showcase simulation script of the Simulator, which 
uses various Xpaths 
(http://qooxdoo-contrib.svn.sourceforge.net/viewvc/qooxdoo-contrib/trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/showcase/test_showcase.js?view=markup).
But this only gets you so far. If you looked at HTML as rendered by 
qooxdoo you see that you easily wind up with xpaths like 
".../div[2]/div[1]/div[7]/div[3]/..." for widgets that don't have a 
suitable text of image src with them, which is neither very readable nor 
robust if put in a test script. The Simulator project 
(http://qooxdoo.org/documentation/contrib/simulator) tries to overcome 
these limitations by providing a Selenium user extension that provides 
special locators, among other things.

The Simulator homepage has more information about testing qooxdoo with 
Selenium (e.g. 
http://qooxdoo.org/documentation/contrib/simulator/qooxdoo-tests-with-selenium).
 
And you might want to consider using the qooxdoo-specific user extension 
for Selenium.

Does this help?

Thomas


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to