exit menu not found in sample vip app

Bug reports.
GregC
Posts: 4
Joined: Mon Mar 05, 2012 11:08 pm

exit menu not found in sample vip app

Post by GregC » Mon Mar 05, 2012 11:19 pm

I'm using an evaluation copy, running through the samples. When I attempted to play back a recording the scripted failed when it tried to exit the application:

Failed to find item 'MyFirstTestProjectRepository.ContextMenuVipApplication.MenuItemIdExit'. The folder 'MyFirstTestProjectRepository.ContextMenuVipApplication' was not found. No element found for path '/contextmenu[@processname='VipApplication']' within 30s.
Show/Hide Stacktrace

Also the first recording I made didn't even pick up my click on the File|Exit menu. So the application stays open at the end of the recording.

Version 3.2.2.16425
Win7 64bit.
Attachments
GregCMyFirstTestProject.zip
(426.03 KiB) Downloaded 158 times

GregC
Posts: 4
Joined: Mon Mar 05, 2012 11:08 pm

Re: exit menu not found in sample vip app

Post by GregC » Mon Mar 05, 2012 11:30 pm

I also tried another application (the app I really want to test, 32bit .net app) and while I was able to record it, playback failed with the sample problem:

Code: Select all

Failed to find item 'TouchstoneTestRepository.ContextMenuTouchstone.MenuItemExit'. The folder 'TouchstoneTestRepository.ContextMenuTouchstone' was not found. No element found for path '/contextmenu[@processname='Touchstone']' within 30s. 
Show/Hide Stacktrace
at Ranorex.Core.Repository.RepoItemInfo.Find[T](Boolean findSingle, Boolean throwException) at Ranorex.Core.Repository.RepoItemInfo.CreateAdapter[T](Boolean throwException) at TouchstoneTest.TouchstoneTestRepositoryFolders.ContextMenuTouchstoneAppFolder.get_MenuItemExit() in c:\Users\Greg\Documents\Ranorex\RanorexStudio Projects\TouchstoneTest\TouchstoneTest\TouchstoneTestRepository.cs:line 287 at TouchstoneTest.Recording1.Ranorex.Core.Testing.ITestModule.Run() in c:\Users\Greg\Documents\Ranorex\RanorexStudio Projects\TouchstoneTest\TouchstoneTest\Recording1.cs:line 113 at Ranorex.Core.Testing.TestSuiteModule.RunInternal(DataContext parentDataContext)


GregC
Posts: 4
Joined: Mon Mar 05, 2012 11:08 pm

Re: exit menu not found in sample vip app

Post by GregC » Tue Mar 06, 2012 2:44 pm

I went back over:
http://www.ranorex.com/support/user-gui ... arted.html
and noticed that the instructions said to click the exit button (the X at the top right). When I recorded a test case that did this instead of using the File|Exit menu the test case play back completed without error.

So there seems to be a bug in finding the exit menu. The project I attached to the original message above should reproduce this for you.

Can you post here if you have reproduced this bug?
Thanks

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: exit menu not found in sample vip app

Post by Support Team » Tue Mar 06, 2012 3:38 pm

Hi,

Thanks for the file!
As you can see in your project the last click in your recording performs a click on a body element of the ranorex.com website and not a click on the "/contextmenu[@processname='VipApplication']/menuitem[@accessiblename='IdExit']" Exit menu item, so that is the reason why you can't close the application this way.
If you want to track the Exit element to get the RxPath you have to use the Instant Tracking functionality of Spy as described in the following link.
If you are getting such an element not found error message, it is always a good idea to check the used RxPath, just take a look at the used repository element and check with the Spy tool if the RxPath of the specific element is the same as the used RxPath of your repository item.

Regards,
Markus
Ranorex Support Team
.
Image

GregC
Posts: 4
Joined: Mon Mar 05, 2012 11:08 pm

Re: exit menu not found in sample vip app

Post by GregC » Thu Mar 08, 2012 2:37 pm

I read the link but I'm not sure I follow you. As the screen shot in the final step clearly shows the exit menu of the application being selected.
Mouse_b6b5ea41-25d1-4759-a26a-2f6e36485279.jpg
Mouse_b6b5ea41-25d1-4759-a26a-2f6e36485279.jpg (12.19 KiB) Viewed 1205 times
Yet that's not what it does on playback.

Also I tried to do another recording of my application. During play it back it picks the wrong file on a file open dialog. Again the screen shot taken during recording clearly shows the correct file being selected, yet when played back it picks the first file in the file open dialog, not the file it is supposed to. And again on exit (using File|Exit menu) the wrong action is required, the screen shot is correct but the recorded action is a click on the application that was "under" the recorded application.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: exit menu not found in sample vip app

Post by Support Team » Fri Mar 09, 2012 2:23 pm

Hi,

When you take a look at the last recorded action you will see that the click was performed on one of the Firefox elements.
So please try to create a new Ranorex Project and record all steps again, but this time without opened Browser in the background. I am sure that Ranorex will record these steps without any troubles.

Regards,
Markus
Ranorex Support Team
.
Image