Page 1 of 1

Screenshot a menu

Posted: Fri Aug 07, 2020 3:39 pm
by HansSchl
I am preparing a Ranorex repository for use by others. For their convenience, I add screenshots to all repo items.

I created an "app folder" item for a drop-down menu because that is how Ranorex sees it (MFC seems to create its menus directly on the desktop). The path is:

Code: Select all

/form[@processname='<my-app>' and @title='<menu-name> menu']
(I wrote code that supplies the title property) but writing this expression manually gives me no screenshot. Now when I click "Update screenshot" I get the message "Failed to find an element etc.". Sure, the menu is not on the screen when I click elsewhere. In Spy, I can F12-track an item, but that doesn't put a screenshot into the repository. I tried to hold down F12 when I clicked "Update screenshot" but that makes no difference either.

Is there some hidden feature which would do the trick? Or is there a way to import a screenshot from a png file? Or can I import a screenshot created by a "Report" action?

Thank you
Hans

Re: Screenshot a menu

Posted: Fri Aug 07, 2020 3:43 pm
by Stub
I never bothered adding a screenshot to the menu items for our MFC application because, like you, I found it wasn't an easy process. I didn't attempt to find a workaround so I have nothing to suggest I'm afraid. Just joining in so you know you're not the only one!