Hi,

yes, the child[n] locator step is unreliable if the child widgets of the 
element found by the previous step change. You could add a (plain 
JavaScript) property to your text fields that identifies them:

var tf = new qx.ui.form.TextField();
tf.seleniumId = "foo";

Then you could replace the child[n] step with [@seleniumId=foo]

Another approach would be to assign HTML IDs to your widgets:

tf.getContainerElement().getDomElement().seleniumId = "foo";

In this case, you could replace the entire locator with just "foo".

If you go with one of these approaches, keep in mind you can use 
qooxdoo's build system to make sure testing-specific code is excluded 
from the production version of your application.


Regards,
Daniel

On 07/01/2011 04:18 PM, vk008 wrote:
> Hi All,
>
> I started GUI automation for my current project using qooxdoo 1.4.
> Currently, I could locate a text field widget with the help of interceptor
> that creates locator in the the child strategy. I wonder it would easily
> break in the future if another widget added in between.
>
> Hence, I would like to use absolute location strategy.
>
> qxh=*/[@classname="qip.ui.forms.addralloc.PoolTabView"]/qx.ui.tabview.TabView/qx.ui.container.Stack/child[0]/[@classname="qip.ui.forms.addralloc.PoolProfileForm"]/qx.ui.container.Scroll/qx.ui.core.scroll.ScrollPane/qx.ui.container.Composite/child[1]
>
> Here, child[1] is qx.ui.form.TextField that is located at 2nd position.
>
> Can I use any other way by which I could easily locate this widget?
>
> Would you guys please respond to this?
>
> --
> View this message in context: 
> http://qooxdoo.678.n2.nabble.com/How-do-I-locate-qx-ui-form-TextField-without-using-child-strategy-tp6537938p6537938.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to