Skip to content

Commit 6f97b8d

Browse files
committed
[dotnet] Fix driver service path determination when starting it directly
1 parent cee7f6b commit 6f97b8d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

dotnet/src/webdriver/DriverService.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,17 @@ public void Start()
262262
return;
263263
}
264264

265-
if (this.driverServicePath == null)
265+
this.driverServiceProcess = new Process();
266+
267+
if (this.driverServicePath != null)
266268
{
267-
DriverFinder.FullPath(this.GetDefaultDriverOptions());
269+
this.driverServiceProcess.StartInfo.FileName = Path.Combine(this.driverServicePath, this.driverServiceExecutableName);
270+
}
271+
else
272+
{
273+
this.driverServiceProcess.StartInfo.FileName = DriverFinder.FullPath(this.GetDefaultDriverOptions());
268274
}
269275

270-
this.driverServiceProcess = new Process();
271-
this.driverServiceProcess.StartInfo.FileName = Path.Combine(this.driverServicePath, this.driverServiceExecutableName);
272276
this.driverServiceProcess.StartInfo.Arguments = this.CommandLineArguments;
273277
this.driverServiceProcess.StartInfo.UseShellExecute = false;
274278
this.driverServiceProcess.StartInfo.CreateNoWindow = this.hideCommandPromptWindow;

0 commit comments

Comments
 (0)