Skip to content

Commit 56f210e

Browse files
committed
Adding new property for geckodriver --jsdebugger commmand line switch
1 parent f77c9e3 commit 56f210e

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

dotnet/src/webdriver/Firefox/FirefoxDriverService.cs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <copyright file="FirefoxDriverService.cs" company="WebDriver Committers">
1+
// <copyright file="FirefoxDriverService.cs" company="WebDriver Committers">
22
// Licensed to the Software Freedom Conservancy (SFC) under one
33
// or more contributor license agreements. See the NOTICE file
44
// distributed with this work for additional information
@@ -33,6 +33,7 @@ public sealed class FirefoxDriverService : DriverService
3333
private static readonly Uri FirefoxDriverDownloadUrl = new Uri("https://github.com/mozilla/geckodriver/releases");
3434

3535
private bool connectToRunningBrowser;
36+
private bool openBrowserToolbox;
3637
private int browserCommunicationPort = -1;
3738
private string browserBinaryPath = string.Empty;
3839
private string host = string.Empty;
@@ -87,6 +88,16 @@ public bool ConnectToRunningBrowser
8788
set { this.connectToRunningBrowser = value; }
8889
}
8990

91+
/// <summary>
92+
/// Gets or sets a value indicating whether to open the Firefox Browser Toolbox
93+
/// when Firefox is launched.
94+
/// </summary>
95+
public bool OpenBrowserToolbox
96+
{
97+
get { return this.openBrowserToolbox; }
98+
set { this.openBrowserToolbox = value; }
99+
}
100+
90101
/// <summary>
91102
/// Gets a value indicating the time to wait for an initial connection before timing out.
92103
/// </summary>
@@ -156,6 +167,11 @@ protected override string CommandLineArguments
156167
argsBuilder.Append(string.Format(CultureInfo.InvariantCulture, " --log {0}", this.loggingLevel.ToString().ToLowerInvariant()));
157168
}
158169

170+
if (this.openBrowserToolbox)
171+
{
172+
argsBuilder.Append(" --jsdebugger");
173+
}
174+
159175
return argsBuilder.ToString().Trim();
160176
}
161177
}

0 commit comments

Comments
 (0)