I am having issues finding a WPF textbox when I repeat a test case in the same test suite run. Basically I have a simple data table and I set values of WPF textbox using that data table. Textboxes I am filling are mandatory and they are checked in real time. Test goes like this;
- Press a button to open a form in a new window.
- Validate the textbox is there.
- Ensure the textbox is visible.
- Focus on the textbox.
- Set the textbox text.
- Press a save button in the same window to save the data and close the window.
This test always succeeds if I run it once but it fails to find the textbox second time. Keeps searching and times out.
If I open the same form window again from a different button in the same test case, it focuses to the first textbox instead of focusing on to the one I want it to focus. I did try focusing on a different textbox and it failed for that as well.
I tried using a different WPF form window and I had the same issue, it doesn't work properly when you open the same window for the second time in a test case.
I am trying figure out it this is an issue with ranorex when using wpf elements or there might be something wrong going on in the background. I am not sure how to debug this issue, so any advice on that might be helpful. From what I can see in the report log it either doesn't find the textbox or it thinks it is doing everything correctly.
Issues finding an element in the second iteration.
Re: Issues finding an element in the second iteration.
Hi,
Try to set the "Use Cache" property of failing element (its parent folder) to False, as described here:
http://www.ranorex.com/forum/can-t-iden ... tml#p41572
Try to set the "Use Cache" property of failing element (its parent folder) to False, as described here:
http://www.ranorex.com/forum/can-t-iden ... tml#p41572
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: Issues finding an element in the second iteration.
Perfect! Many thanks.odklizec wrote:Hi,
Try to set the "Use Cache" property of failing element (its parent folder) to False, as described here: