.Visibility on Keenthemes (Metronic) Modals

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Posts: 39
Joined: Wed Jun 05, 2013 2:15 pm

.Visibility on Keenthemes (Metronic) Modals

Post by brgibb » Fri Oct 11, 2013 11:55 am

I am automating a Web GUI developed using this theme:

http://www.keenthemes.com/preview/index ... onic_admin

One feature that is available is that of a Modal. The attached screenshot shows an example Modal on their website. In this case I clicked on the UI Features menu then the "View Demo" button of the "Basic Example".
What I want to do on the web site I'm automating (the same issue arises on this example site...) is once a Modal button is clicked ("View Demo" in this case), I want to wait for a period of time until it is visible then do stuff on the Modal. There could be a delay as to when it loads so I'm specifying a timeout to wait.

To do this i'm using the .Visible on the rxpath of one of the elements inside the Modal. Once this is visible I know I can safely proceed. This is fine in the main.

However ........it seems that once a Modal has been launched, it will always be detected as "visible" even though it has been closed.

Opening another Modal will clear the situation where any check for the original Modal will return a boolean False... as expected. The 2nd Modal is then the Modal that is "visible" regardless if it then open or closed.

What's more, when the Modals are closed and my code returns the erroneous True the Spytool shows the Modal as being set to False in the Layout detail.

Please try the above scenario on the example URL above. Can you suggest any workarounds to this?


You do not have the required permissions to view the files attached to this post.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA

Re: .Visibility on Keenthemes (Metronic) Modals

Post by Support Team » Tue Oct 15, 2013 5:15 pm


Thank you for the access to your application and the description.
Unfortunately I am not exactly sure what the issue is because if I track a modal (for example: "Full Width Example") the "Visible" property is set to "True". When I close the Modals dialog and reload the data in Ranorex Spy the "Visible" property is set to False.
Please let me know if I understand something wrong.


Posts: 39
Joined: Wed Jun 05, 2013 2:15 pm

Re: .Visibility on Keenthemes (Metronic) Modals

Post by brgibb » Wed Oct 16, 2013 1:58 pm

Hi there,

Thank you for your response.

I perhaps didn't explain the issue I was seeing very well.

Indeed the spy tool in all cases reports the correct result when the Modal was visible or not.

It was my C# code that was behaving oddly......essentially the code below.

Ranorex.WebElement itemToFind = @"/dom[@domain='www.keenthemes.com']/?/?/iframe[@id='iframe']//div[#'basic']/div/div";
if (itemToFind.Visible == true)
Report.Info(itemToFind + " now visible");

Even when the Modal was no longer on screen screen, the Report.Info line was always being executed.

Annoyingly I can no longer recreate this issue though I will keep trying as it was very consistent and witnessed by other team members.

Thanks for you help meantime.