Invisible window not found
Posted: Thu Apr 06, 2023 9:40 am
Hi,
I recently upgraded Ranorex from 10.1.3 to 10.5.4. Since then, a number of tests started to fail. One of the symptoms of failure is that Ranorex doesn't find invisible windows. Let me explain what I mean.
The AUT is a non-managed C++ application, using MFC. Its GUI is flexible and is sometimes modified during runtime. Some automatic tests verify which GUI elements are displayed and which aren't. Elements can be removed from the screen (effectively calling the API function DestroyWindow), or they can be hidden by calling ShowWindow(SW_HIDE) which leaves the window object in place but eoved the WS_VISIBLE flag, so that the window is no longer displayed on the screen. This question is about the latter scenario. I have verified this, using the "Spy++" tool from Microsoft.
The test does an "AttributeEqual" validation step, comparing the "Visible" attribute against the value "False". This worked before the Ranorex upgrade, and now fails with "No element found for path ... at step 'element[@windowtext='VU Meter']" when in fact I can see this invisible control in Spy++.
I believe this is a bug in the latest version of Ranorex. Comments welcome.
Best regards
Hans
I recently upgraded Ranorex from 10.1.3 to 10.5.4. Since then, a number of tests started to fail. One of the symptoms of failure is that Ranorex doesn't find invisible windows. Let me explain what I mean.
The AUT is a non-managed C++ application, using MFC. Its GUI is flexible and is sometimes modified during runtime. Some automatic tests verify which GUI elements are displayed and which aren't. Elements can be removed from the screen (effectively calling the API function DestroyWindow), or they can be hidden by calling ShowWindow(SW_HIDE) which leaves the window object in place but eoved the WS_VISIBLE flag, so that the window is no longer displayed on the screen. This question is about the latter scenario. I have verified this, using the "Spy++" tool from Microsoft.
The test does an "AttributeEqual" validation step, comparing the "Visible" attribute against the value "False". This worked before the Ranorex upgrade, and now fails with "No element found for path ... at step 'element[@windowtext='VU Meter']" when in fact I can see this invisible control in Spy++.
I believe this is a bug in the latest version of Ranorex. Comments welcome.
Best regards
Hans