Forum Discussion
Hi,
thank you for your reply, but no, it doesn't speed up things. I ended up with a workaround. I created an C# extension method, that inserts that .NET framework call before it calls TrayFind().
public static class TestLeftExtensions { public static IProcess TryFindProcess(this IDriver driver, string processName) { if (System.Diagnostics.Process.GetProcessesByName(processName).Length == 0) { return null; } return Instances.Driver.Find<IProcess>(new ProcessPattern() { ProcessName = processName }); } }
It can be used like this:
var process = this.Driver.TryFindProcess("NonExistingProcess");
I would not consider this behaviour a "bug", but for me it's a "major inconvenience".
I think this fix could be easily integrated into TestLeft directly.
Hi,
While it is good to know that you have (quite a pretty, from my point of view) a workaround for the problem, the problem itself sounds strange for me and I would really recommend to contact Support via the link mentioned earlier and listen for what they will reply. (You may reference this thread if you like and update it with Support's response for the benefit of others.)
Related Content
- 11 months ago
- 3 years ago
Recent Discussions
- 2 months ago
- 7 months ago