I have been searching since last week and i have run out of ideas to enter into the google.
How do you get a remote agent to work with Directory.GetCurrentDirectory() or any similar command. I have tried multiple commands and nothing ever seems to run as coded. This is on a csharp class file in the project which does exist. I can even see the file i am referencing move over to the test machine. When i run the testsuite through the ranorex remote agent, the agent complains that it cant find a file in a path. The path is the exact path on my local machine. This path is on my computer and will NEVER exist on any of the remote ones. It shouldn't be this hard.
I have tried about every variation i test for:
string filePath = Directory.GetCurrentDirectory();
string filePath = System.IO.Path.GetDirectoryName(System.AppDomain.CurrentDomain.BaseDirectory);
string filePath = TestSuite.WorkingDirectory.ToString();
string filePath = Directory.GetParent(filePath).FullName;
string filePath = Ranorex.Core.Testing.TestSuite.WorkingDirectory.ToString();
string filePath = System.IO.Directory.GetCurrentDirectory().ToString();
Works fine locally, fails on ALL remotes.
Ask general questions here.
2 posts • Page 1 of 1
Now that i complained i found some of the answer. my data source was set to an absolute path. I was able to clear out the absolute parts of that and now i can find the correct csv file for the data source. still having issues with some classes being searched for on the wrong path but will try to duplicate my efforts.