Hi,
I am migrating a project from Ranorex 2.3.4 to 3.0.
First of all, I updated the repository using the new Spy. Then tried to run the code, but program was not able to find elements. I tried inserting the xPath directly into the code - same, not working.
Afterwards I tried to run Studio, record some clicks and try to run it. It was able to select the whole window (never had problems with that) but this is as far as it goes. No other toolbars, tree items or other elements were found.
To try to reproduce the problem, download and install XProtect GO from http://www.milestonesys.com/go. Then run Ranorex Studio and record pressing toolbar buttons and something menu (f.ex. File -> Save).
The tree items probably won't work, but for me - tool bar has problems as well (not finding toolbar buttons and menus).
Running on Win7, VS 2010, .NET 4 (the projects are on 3.5).
I made sure that Ranorex Studio project is running on .NET 3.5.
Any ideas?
Thanks,
Elena
Ranorex not able to run path, recorded in Studio/Spy
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Ranorex not able to run path, recorded in Studio/Spy
Hi Elena,
http://www.ranorex.com/support/user-gui ... uites.html
Regards,
Peter
Ranorex Team
Have your migrated your 2.x project using the following documentation?Elena wrote:I am migrating a project from Ranorex 2.3.4 to 3.0.
First of all, I updated the repository using the new Spy. Then tried to run the code, but program was not able to find elements. I tried inserting the xPath directly into the code - same, not working.
http://www.ranorex.com/support/user-gui ... uites.html
I downloaded the web installer of your application and suddenly a message occurs "Please check you Internet connection". Is this software working on a Virtual PC ?Elena wrote:To try to reproduce the problem, download and install XProtect GO from http://www.milestonesys.com/go. Then run Ranorex Studio and record pressing toolbar buttons and something menu (f.ex. File -> Save).
The tree items probably won't work, but for me - tool bar has problems as well (not finding toolbar buttons and menus).
Regards,
Peter
Ranorex Team
Re: Ranorex not able to run path, recorded in Studio/Spy
Can you post you code and some snippets of surrounding code around the line that is failing?
Does this work on other machines? Since its Win 7 can you try disabling UAC to check if that is causing the issue?
What exception is being thrown when you "can't find elements"? Surround your test code with a try/catch and report on the exception.
Does this work on other machines? Since its Win 7 can you try disabling UAC to check if that is causing the issue?
What exception is being thrown when you "can't find elements"? Surround your test code with a try/catch and report on the exception.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
Re: Ranorex not able to run path, recorded in Studio/Spy
We are not using Ranorex Studio in-house. Instead, we track elements with Spy, generate C# code and then work with repository in MS Visual Studo. I did, however, install Ranorex Studio trial to check what might be wrong.Support Team wrote: Have your migrated your 2.x project using the following documentation?
http://www.ranorex.com/support/user-gui ... uites.html
We are not aware of any issues between MS Virtual PC and XProtect Go. Please try to disable antivirus, firewall. Also make sure you have correctly configured network settings and stable connection and try again.Support Team wrote: I downloaded the web installer of your application and suddenly a message occurs "Please check you Internet connection". Is this software working on a Virtual PC ?
Sorry not to mention. Done already Also, no firewalls and disabled antivirus..Ciege wrote: Since its Win 7 can you try disabling UAC
We have tried doing the same thing on another machine, exactly as mine - same result. The strange thing is, both Spy and Studio are able to correctly trace the UI elements, makes screenshots with the elements highlighted and highlight elements after tracing. But when it comes to playing the recorded actions (no modifications made) or using the items in repository - they simply fail. Also, this is not an issue for other software products (both created by us and external applications, such as Notepad).
The following error is from Ranorex Studio, when trying to play the recording, which contains pressing on toolbar File -> Save: and this is what I get when I'm trying to run a very simple code, which simply selects MenuItem in toolbar:
Code: Select all
Ranorex.ElementNotFoundException was unhandled
Message=Failed to find item 'DriverRepository.MainWindow.MenuItemFile' within the specified timeout of 10s.
Source=Ranorex.Core
StackTrace:
at Ranorex.Core.Repository.RepoItemInfo.Find[T](Boolean findSingle, Boolean throwException)
at Ranorex.Core.Repository.RepoItemInfo.CreateAdapter[T](Boolean throwException)
at MyTestProject.DriverRepositoryFolders.MainWindowAppFolder.get_MenuItemFile() in C:\Users\ebi\Documents\projects\testRanorex\testRanorex\Repository.cs:line 148
at testRanorex.Program.Main(String[] args) in C:\Users\ebi\Documents\projects\testRanorex\testRanorex\Program.cs:line 15
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: Ranorex.ElementNotFoundException
Message=No element found for path 'element[@controlname='MainMenu']/menubar/menuitem[@accessiblename='File']' within 10s.
InnerException:
Open Spy and XProtect Go. Create repository with tracking File button from toolbar. Save repository and export code.
Create VS C# Console project, add repository.cs to it. In Program.cs try selecting the item you traced, by referring to repository object.
I hope this helps. Looking forward to your ideas.
Elena
You do not have the required permissions to view the files attached to this post.
Re: Ranorex not able to run path, recorded in Studio/Spy
Additional information:
If you cannot set up XProtect Go on your system, try installing 30-day trial of XProtect Enterprise: http://www.milestonesys.com/downloads/free.
Note: Please do not use XProtect Corporate, as it has different UI.
Also, currently I have both Ranorex 2.3 and 3.0 on my machine. But since I am able to make it work on other software programs, I assume this should not be an issue.
Looking forward to your ideas.
Elena
If you cannot set up XProtect Go on your system, try installing 30-day trial of XProtect Enterprise: http://www.milestonesys.com/downloads/free.
Note: Please do not use XProtect Corporate, as it has different UI.
Also, currently I have both Ranorex 2.3 and 3.0 on my machine. But since I am able to make it work on other software programs, I assume this should not be an issue.
Looking forward to your ideas.
Elena
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Ranorex not able to run path, recorded in Studio/Spy
Hi Elena,
I installed your software and started the "Management Application". I tracked the file menu and created the repository using Ranorex 3.0 as you wrote it. Then I created a Console Project with VS2008, used this repository item in code and executed it, to check if the code is working. The code was working as expected and Ranorex had no problems to click the "File Menu" on your application.
My VS2008 Project: I read in your exception that Ranorex identifies your element as "element" and not as "menu item".
Get you any Limitation Pop-Up from Ranorex?
Are you starting your application form a network drive/share?
Are you starting both processes, SPY and your Application, as administrator?
Regards,
Peter
Ranorex Team
I installed your software and started the "Management Application". I tracked the file menu and created the repository using Ranorex 3.0 as you wrote it. Then I created a Console Project with VS2008, used this repository item in code and executed it, to check if the code is working. The code was working as expected and Ranorex had no problems to click the "File Menu" on your application.
My VS2008 Project: I read in your exception that Ranorex identifies your element as "element" and not as "menu item".
Get you any Limitation Pop-Up from Ranorex?
Are you starting your application form a network drive/share?
Are you starting both processes, SPY and your Application, as administrator?
Regards,
Peter
Ranorex Team
You do not have the required permissions to view the files attached to this post.
Re: Ranorex not able to run path, recorded in Studio/Spy
I tried running this exact solution (only converted to VS2010) on the same program on my machine - still an exception:Support Team wrote:My VS2008 Project:
Code: Select all
Ranorex.ElementNotFoundException: Failed to find item 'NewRepository.FormXProtect_Enterprise_Mana.MenuItemFile' within the specified timeout of 10s. ---> Ranorex.ElementNotFoundException: No element found for path 'menubar[@controlname='MainMenu']/menuitem[@accessiblename='File']' within 10s.
--- End of inner exception stack trace ---
at Ranorex.Core.Repository.RepoItemInfo.Find[T](Boolean findSingle, Boolean throwException)
at Ranorex.Core.Repository.RepoItemInfo.CreateAdapter[T](Boolean throwException)
at Elena_Milestone.NewRepositoryFolders.FormXProtect_Enterprise_ManaAppFolder.get_MenuItemFile() in C:\Elena_Milestone\Elena_Milestone\NewRepository.Repository.cs:line 116
at Elena_Milestone.Program.Main(String[] args) in C:\Users\ebi\Documents\projects\Elena_Milestone\Elena_Milestone\Program.cs:line 21
I work on account which has administrator rights on this PC. Even so, I tried starting both aplications with "run as administrator" and this is the path for "File" in toolbar that I get:Support Team wrote: I read in your exception that Ranorex identifies your element as "element" and not as "menu item".
Get you any Limitation Pop-Up from Ranorex?
Are you starting your application form a network drive/share?
Are you starting both processes, SPY and your Application, as administrator?
Code: Select all
/form[@controlname='AdministratorForm']/element[@controlname='MainMenu']/menubar/menuitem[@accessiblename='File']
I don't have any limitations on Ranorex, except for that I still have not licensed the 3.0 version, so each time I run the test, a dialog with trial information appears.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Ranorex not able to run path, recorded in Studio/Spy
So if Spy works, but your executable does not, then this has to be either a security or configuration problem. There are a few things you can try:
Regards,
Alex
Ranorex Team
- Be sure to have your project and the executable on a local drive in an unencrypted and uncompressed folder.
- Start the Ranorex executable with administrative rights.
- Change the "Platform Target" (Visual Studio) or "TargetCPU" (Ranorex Studio) option in your test project settings to each available setting and try to run the automation.
Regards,
Alex
Ranorex Team
Re: Ranorex not able to run path, recorded in Studio/Spy
It seems as if having a clean installation of Ranorex 3.0 solves the issue. I have tried installing Ranorex 3.0 on 64bit Windows 7 and the XProtect Enterprise automation worked well.
Also, my college uninstalled Ranorex 2.3.8 and the 3.0 started working as well (meaning - tracing the File button in Toolbox recognised "menuitem" as expected, and not as "element").
Sadly, I still have problems on my machine. The version of Ranorex I had, 2.3.4, did not for some reason have the uninstaller. So I installed 2.3.8, then removed the whole 2.3, together with 3.0 and reinstalled 3.0 in the end. But I am still getting the issue.
What should be done in order to fully remove old version of Ranorex?
Kind regards,
Elena
Also, my college uninstalled Ranorex 2.3.8 and the 3.0 started working as well (meaning - tracing the File button in Toolbox recognised "menuitem" as expected, and not as "element").
Sadly, I still have problems on my machine. The version of Ranorex I had, 2.3.4, did not for some reason have the uninstaller. So I installed 2.3.8, then removed the whole 2.3, together with 3.0 and reinstalled 3.0 in the end. But I am still getting the issue.
What should be done in order to fully remove old version of Ranorex?
Kind regards,
Elena
Re: Ranorex not able to run path, recorded in Studio/Spy
Finally!
With a little struggle, I managed to get everything running.
First, I removed all Ranorex versions with all traces from my machine using "Revo Uninstaller".
Then I set up 2.3.4 (which is the version I had originally). The xpaths for the XProtect Enterprise were working perfectly on this version. But since I am upgrading, I used "Revo Uninstaller" to remove Ranorex with all traces.
Afterwards, I set up 2.3.8, which is another version I had on my machine. And removed the same way.
Finally, I installed 3.0 version. And here it started working!
Conclusions:
Apparently when I tried uninstalling Ranorex just by using the default uninstaller, it still had some leftovers (at least for version 2.3.4). So if anyone has similar issue and reads this forum - just keep that in mind.
Otherwise, installing 3.0 on Ranorex-free machine should not make the problem discussed here.
Anyways, thanks for help
Kind regards,
Elena
With a little struggle, I managed to get everything running.
First, I removed all Ranorex versions with all traces from my machine using "Revo Uninstaller".
Then I set up 2.3.4 (which is the version I had originally). The xpaths for the XProtect Enterprise were working perfectly on this version. But since I am upgrading, I used "Revo Uninstaller" to remove Ranorex with all traces.
Afterwards, I set up 2.3.8, which is another version I had on my machine. And removed the same way.
Finally, I installed 3.0 version. And here it started working!
Conclusions:
Apparently when I tried uninstalling Ranorex just by using the default uninstaller, it still had some leftovers (at least for version 2.3.4). So if anyone has similar issue and reads this forum - just keep that in mind.
Otherwise, installing 3.0 on Ranorex-free machine should not make the problem discussed here.
Anyways, thanks for help
Kind regards,
Elena
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Ranorex not able to run path, recorded in Studio/Spy
Hmmm, it should not be able to install two different 2.X versions at the same time, interesting...
Anyway, I'm glad you could get your Ranorex installations cleaned up and working now
Regards,
Alex
Ranorex Team
Anyway, I'm glad you could get your Ranorex installations cleaned up and working now
Regards,
Alex
Ranorex Team
- artur_gadomski
- Posts: 207
- Joined: Mon Jul 19, 2010 6:55 am
- Location: Copenhagen, Denmark
- Contact:
Re: Ranorex not able to run path, recorded in Studio/Spy
It seems like installing Ranorex 2.3.X and Ranorex 3.0 at the same machine causes some problems. Did anybody else experience these problems?