In case of row-changes in an Xceed-table, the update of the Element-structure isn't reliable. If i disable the caching, it works (most likely)
Ranorex 1.5.3 used with .Net 1.1
Anyone an Idea ?
best regards jörg
Enabled caching prevents reliable update of gui-changes
-
- Posts: 55
- Joined: Thu Aug 23, 2007 12:00 pm
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Enabled caching prevents reliable update of gui-changes
Could you explain that issue a little more in detail? What is the current behavior of Ranorex if the GUI changes and what would you expect? If the GUI changes, Element instances could get invalid (e.g. if the control implementing MSAA constructs new MSAA objects on change) and you might need to search for the element again.jabelshauser wrote:the update of the Element-structure isn't reliable
In Ranorex 1.5 Element.EnableCaching does not actually perform a caching algorithm (it's a badly chosen name, maintained solely for backwards compatibility). When you set it to true, every Element instance will keep its association with the underlying MSAA object (usually a good and expected thing). If you set the property to False, everytime you access the Element instance, Ranorex internally searches again for the corresponding MSAA object inside the associated window.
Regards,
Alex
Ranorex Team
-
- Posts: 55
- Joined: Thu Aug 23, 2007 12:00 pm
Re: Enabled caching prevents reliable update of gui-changes
if a row was added or removed to the table by example, sometimes(!) the element-structure is not enhanced, so the new row-element isn't avl. It is right, that i have to search for the element again, but how can i do that ? start from the initial point (= SUT-Gui) isn't a good idea, because it takes a very long time each time. An "update"-command isn't available. What is the prefered procedure in this case ?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Enabled caching prevents reliable update of gui-changes
I still don't really understand what you mean by "the element-structure is not enhanced". Could you give a detailed example? How do you access the rows? Do you search using Element.FindChildren?
When you search for rows e.g. using the Element.FindChildren method, you get the elements corresponding to the currently present rows. If you then add or delete rows, the returned Element array won't change unless you do a new search.
Usually, it should be enough to start searching from the table element again. E.g. when you add a new row, you then need to start searching for that row from the table control/element. When you still have Element instances corresponding to a deleted row, those elements will most likely return invalid results.
Ranorex 2.X facilitates getting new elements for changed UIs by means of RanoreXPath and the Ranorex repository. RanoreXPath makes it easier to search for elements and the repository provides mechanisms to automatically search for elements again that got invalid.
Regards,
Alex
Ranorex Team
When you search for rows e.g. using the Element.FindChildren method, you get the elements corresponding to the currently present rows. If you then add or delete rows, the returned Element array won't change unless you do a new search.
Usually, it should be enough to start searching from the table element again. E.g. when you add a new row, you then need to start searching for that row from the table control/element. When you still have Element instances corresponding to a deleted row, those elements will most likely return invalid results.
Ranorex 2.X facilitates getting new elements for changed UIs by means of RanoreXPath and the Ranorex repository. RanoreXPath makes it easier to search for elements and the repository provides mechanisms to automatically search for elements again that got invalid.
Regards,
Alex
Ranorex Team