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']";
What puzzles me is, why is the code searching for ExcelApplication.cs? Can you please look into this issue.
Thanks
Kris