I can not validate the text visibility

Ranorex Spy, Recorder, and Studio.
c_config
Posts: 2
Joined: Mon Jul 22, 2019 3:23 pm

I can not validate the text visibility

Post by c_config » Mon Jul 22, 2019 4:56 pm

Hello all,
I am a new to Renorex Studio and still use evaluation copy to understand how I can employ this product to test WPF Windows application.
Here is the challenge I am facing with.
In the application, there are collapsible menus and I need to navigate through them to ensure that everything works as expected. These menus remember their status (expanded or hidden) and I need to find out their current status first. Then, depending on the status, click on desired menu to expand it and do my testing.
Probably, as the first step, I will need to do the validation. As per attached screenshot, I am trying to validate that header “Date/Time Format” is visible and based on result to decide on clicking the button whether to expand the menu or not.
Collapsible menu.PNG
Collapsible menu.PNG (31.93 KiB) Viewed 143 times
I used Tracker to identify this “Date/Time Format” element and then I build the Validation rule.
So far, I tried to use Exists method and AttributeContains method with Caption of “Date/Time Format”. These two methods always report positive result independently whether “Date/Time Format” is visible or not.
When I use AttributeRegex method with Visible setting of “Date/Time Format” (see other screenshot), it always reports negative result independently whether “Date/Time Format” is visible or not.
Collapsible menu.PNG
Collapsible menu.PNG (31.93 KiB) Viewed 143 times
So, what I am doing wrong? How can I find out the current status of these menus (and past it to the Condition)?
Thank you in advance for your responses.
Attachments
Visible.PNG
Visible.PNG (52.72 KiB) Viewed 143 times

User avatar
Vega
Posts: 166
Joined: Mon Jul 11, 2016 2:15 pm

Re: I can not validate the text visibility

Post by Vega » Tue Jul 23, 2019 8:59 pm

If you are able to provide a Ranorex Snapshot of the control in question, it would be a lot easier to analyze.

In regard to the control always reporting True for exists, this is because they do exist in memory whether they are visible or not. If the same is happening for the visible attribute, then the application may not be setting the visibility attribute when the control is collapsed.

Looking at the snapshot, we will be able to see every attribute the control has to offer. If you are able to provide two snapshots of the control, one collapsed and one not collapsed, that would be best.

Hope this helps

c_config
Posts: 2
Joined: Mon Jul 22, 2019 3:23 pm

Re: I can not validate the text visibility

Post by c_config » Thu Jul 25, 2019 2:12 pm

After many attempts, researches and readings, I've found correct settings to get the required action. See the screenshot for details.
Really, it was not very intuitive. :-(
Attachments
Validate Visible.PNG
Validate Visible.PNG (27.14 KiB) Viewed 95 times