FindChildren method
FindChildren method
I am using the FindChildren method to return the contents of a datagrid (datapresenter). When applying filters to the grid, the FindChildren method still returns the same contents. I'm assuming this is because the filter is simply hiding from view the contents that don't apply. Is there a way to use the FindChildren method to return only the visible contents of a datagrid (datapresenter)? Or is there another method used for this?
Re: FindChildren method
Hi,
Please upload a Ranorex snapshot of the datagrid in question and xpath you are using. Without these, it's pretty hard to suggest something reliable.
Basically, I would suggest to add @visible='true' attribute to the searched xpath. But without seeing the datagrid snapshot (preferable both with and without filtered data), it's impossible to tell if it will work or not.
Please upload a Ranorex snapshot of the datagrid in question and xpath you are using. Without these, it's pretty hard to suggest something reliable.
Basically, I would suggest to add @visible='true' attribute to the searched xpath. But without seeing the datagrid snapshot (preferable both with and without filtered data), it's impossible to tell if it will work or not.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: FindChildren method
submitted via email.
I stumbled across this, but it says obsolete and not sure if it works anymore:
http://www.ranorex.com/Documentation/Ra ... n__1_1.htm
I stumbled across this, but it says obsolete and not sure if it works anymore:
http://www.ranorex.com/Documentation/Ra ... n__1_1.htm
Re: FindChildren method
Yeah, Find<>() is the appropriate method for this type of thing. FindChildren(), etc. are all deprecated and should not be used.
Find() uses the calling repo item's base path as the search point, appending the given path value and searching until the timeout. It will return a collection of all elements that it found within the timeout that match the XPath.
Find() uses the calling repo item's base path as the search point, appending the given path value and searching until the timeout. It will return a collection of all elements that it found within the timeout that match the XPath.
Shortcuts usually aren't...
Re: FindChildren method
FYI I think I have figured out a solution.
I switched from FindChildren method to Find method, passing in the Xpath with @visible='True' attribute and it seems to be working.
I switched from FindChildren method to Find method, passing in the Xpath with @visible='True' attribute and it seems to be working.