Error while trying to do a save operation

Bug reports.
kris123pra
Posts: 16
Joined: Fri Sep 17, 2010 8:13 am
Location: India

Error while trying to do a save operation

Post by kris123pra » Mon Oct 11, 2010 7:17 am

Hi

Please find the details below of the error when I try to do a save operation. I had this same code working on my machine. I am not sure why this is happening. I found that the folder Plugins was not getting created at all which was causing an error.




Ranorex version: 2.3.3.8879
OS: XP Professional, Version 2002, SP 3
.Net version : 3.5 SP1

Error: Can't load file ExcelApplicationRule.cs under C:\temp\Plugins\OffilePlugin\Rules. Check the file permission and the existance of that file.

System.ArgumentException: The directory name C:\temp\Plugins\OffilePlugin\Rules is invalid.
at System.IO.FileSYstemWatcher.set_Path(String value)
at ICSharpCode.SharpDevelop.FileChangeWatcher.SetWatcher()
at ICSharpCode.SharpDevelop.FileChangeWatcher..ctor(OpenedFile file)
at ICSharpCode.SharpDevelop.FileServiceOpenedFile...ctor(String fileName)
at ICSharpCode.SharpDevelop.FileService.GetOrCreateOpenedFile(String fileName)
at ICSharpCode.SharpDevelop.FileService.LoadFileWrapper.Invoke(String fileName)
at ICSharpCode.Core.FileUtility.<>c__DisplayClass1.<ObservedLoad>b__0()
at ICSharpCode.Core.FileUtility.ObservedLoad(FileOperationDelegate loadFile, String fileName, String message, FileErrorPolicy policy)

Code: Select all

public void saveAsImage(string newName, bool overRide)
		{
			
			Ranorex.Button buttonSave_As = "/form[@controlname='FormMain']/element[@controlname='_Form1_Toolbars_Dock_Area_Top']/container/toolbar[@accessiblename='Quick Access Toolbar']/button[@accessiblename='Save As']";
			if (buttonSave_As.Enabled== true )
			{
				buttonSave_As.Click();
				Keyboard.Press(Keys.Clear);
				Ranorex.Button buttonSave = "/form[@title='Save As']/button[@text='&Save']"; 

Ranorex gives the above message as soon as the code enters this method. It happens only when the code is in debug mode. When we try to run, there is no error, but it cannot click on Save button.

What puzzles me is, why is the code searching for ExcelApplication.cs? Can you please look into this issue.

Thanks
Kris

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

Re: Error while trying to do a save operation

Post by Support Team » Mon Oct 11, 2010 9:29 am

Hi,

Please delete the pdb file "Ranorex.Plugin.Office.pdb" from the Plug-Ins folder. You can find the file under following location “C:\Documents and Settings\All Users\Application Data\Ranorex2\Plugins” (for Windows XP) or “C:\ProgramData\Ranorex2\Plugins” (for Vista, 7)”. We forgot to delete the pdb file and it seems to cause the error.

Regards,
Peter
Ranorex Team
.
Image

kris123pra
Posts: 16
Joined: Fri Sep 17, 2010 8:13 am
Location: India

Re: Error while trying to do a save operation

Post by kris123pra » Tue Oct 12, 2010 9:43 am

Thanks Peter. It works! :)
Regards
Kris