Skip to content

Commit 3b42a89

Browse files
authored
[dotnet] Align binary location property for FirefoxOptions with other options (#13901)
1 parent cf5234d commit 3b42a89

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

dotnet/src/webdriver/Firefox/FirefoxOptions.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class FirefoxOptions : DriverOptions
6161
private const string FirefoxEnableDevToolsProtocolCapability = "moz:debuggerAddress";
6262

6363
private bool enableDevToolsProtocol;
64-
private string browserBinaryLocation;
64+
private string binaryLocation;
6565
private FirefoxDriverLogLevel logLevel = FirefoxDriverLogLevel.Default;
6666
private FirefoxProfile profile;
6767
private List<string> firefoxArguments = new List<string>();
@@ -104,17 +104,18 @@ public FirefoxProfile Profile
104104
/// </summary>
105105
public override string BinaryLocation
106106
{
107-
get { return this.browserBinaryLocation; }
108-
set { this.browserBinaryLocation = value; }
107+
get { return this.binaryLocation; }
108+
set { this.binaryLocation = value; }
109109
}
110110

111111
/// <summary>
112112
/// Gets or sets the path and file name of the Firefox browser executable.
113113
/// </summary>
114+
[Obsolete("Use BinaryLocation property instead of BrowserExecutableLocation. This one will be removed soon.")]
114115
public string BrowserExecutableLocation
115116
{
116-
get { return this.browserBinaryLocation; }
117-
set { this.browserBinaryLocation = value; }
117+
get { return this.binaryLocation; }
118+
set { this.binaryLocation = value; }
118119
}
119120

120121
/// <summary>
@@ -302,9 +303,9 @@ private Dictionary<string, object> GenerateFirefoxOptionsDictionary()
302303
firefoxOptions[FirefoxProfileCapability] = this.profile.ToBase64String();
303304
}
304305

305-
if (!string.IsNullOrEmpty(this.browserBinaryLocation))
306+
if (!string.IsNullOrEmpty(this.binaryLocation))
306307
{
307-
firefoxOptions[FirefoxBinaryCapability] = this.browserBinaryLocation;
308+
firefoxOptions[FirefoxBinaryCapability] = this.binaryLocation;
308309
}
309310

310311
if (this.logLevel != FirefoxDriverLogLevel.Default)

dotnet/test/common/Environment/DriverFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public IWebDriver CreateDriverWithOptions(Type driverType, DriverOptions driverO
117117
service = CreateService<FirefoxDriverService>();
118118
if (!string.IsNullOrEmpty(this.browserBinaryLocation))
119119
{
120-
((FirefoxOptions)options).BrowserExecutableLocation = this.browserBinaryLocation;
120+
((FirefoxOptions)options).BinaryLocation = this.browserBinaryLocation;
121121
}
122122
if (enableLogging)
123123
{

0 commit comments

Comments
 (0)