|
1 |
| -// <copyright file="FirefoxDriverService.cs" company="WebDriver Committers"> |
| 1 | +// <copyright file="FirefoxDriverService.cs" company="WebDriver Committers"> |
2 | 2 | // Licensed to the Software Freedom Conservancy (SFC) under one
|
3 | 3 | // or more contributor license agreements. See the NOTICE file
|
4 | 4 | // distributed with this work for additional information
|
@@ -33,6 +33,7 @@ public sealed class FirefoxDriverService : DriverService
|
33 | 33 | private static readonly Uri FirefoxDriverDownloadUrl = new Uri("https://github.com/mozilla/geckodriver/releases");
|
34 | 34 |
|
35 | 35 | private bool connectToRunningBrowser;
|
| 36 | + private bool openBrowserToolbox; |
36 | 37 | private int browserCommunicationPort = -1;
|
37 | 38 | private string browserBinaryPath = string.Empty;
|
38 | 39 | private string host = string.Empty;
|
@@ -87,6 +88,16 @@ public bool ConnectToRunningBrowser
|
87 | 88 | set { this.connectToRunningBrowser = value; }
|
88 | 89 | }
|
89 | 90 |
|
| 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 | + |
90 | 101 | /// <summary>
|
91 | 102 | /// Gets a value indicating the time to wait for an initial connection before timing out.
|
92 | 103 | /// </summary>
|
@@ -156,6 +167,11 @@ protected override string CommandLineArguments
|
156 | 167 | argsBuilder.Append(string.Format(CultureInfo.InvariantCulture, " --log {0}", this.loggingLevel.ToString().ToLowerInvariant()));
|
157 | 168 | }
|
158 | 169 |
|
| 170 | + if (this.openBrowserToolbox) |
| 171 | + { |
| 172 | + argsBuilder.Append(" --jsdebugger"); |
| 173 | + } |
| 174 | + |
159 | 175 | return argsBuilder.ToString().Trim();
|
160 | 176 | }
|
161 | 177 | }
|
|
0 commit comments