Thanks much Daniel.

I am little worried here to set either seleniumId or html ID as we  have
thousands of widgets used in the application. I guess setting ID would be
better option. But, I am still looking for other options without setting
IDs. 

As I could not directly locate a TextField, Can I locate it using the
associated label?

Ex:Pool Name: TextField

Where "Pool Name:" is the label and  its immediate sibling is the TextField,
say at child[0] and child[1]. 

So Is there a way to locate siblings?



Daniel Wagner wrote:
> 
> 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
> 

Daniel Wagner wrote:
> 
> 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
> 


-----
Regards,
Vinod.
--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/How-do-I-locate-qx-ui-form-TextField-without-using-child-strategy-tp6537938p6547110.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

Reply via email to