diff --git a/dotnet/src/webdriver/ICapabilities.cs b/dotnet/src/webdriver/ICapabilities.cs index 2ea2a757864b8..a731b7e7492f7 100644 --- a/dotnet/src/webdriver/ICapabilities.cs +++ b/dotnet/src/webdriver/ICapabilities.cs @@ -38,11 +38,6 @@ public interface ICapabilities /// string Version { get; } - /// - /// Gets a value indicating whether the browser is JavaScript enabled - /// - bool IsJavaScriptEnabled { get; } - /// /// Gets a value indicating whether the browser has a given capability. /// diff --git a/dotnet/src/webdriver/Remote/DesiredCapabilities.cs b/dotnet/src/webdriver/Remote/DesiredCapabilities.cs index 44d6aa136440a..9dd77a3488979 100644 --- a/dotnet/src/webdriver/Remote/DesiredCapabilities.cs +++ b/dotnet/src/webdriver/Remote/DesiredCapabilities.cs @@ -139,30 +139,6 @@ public string Version } } - /// - /// Gets or sets a value indicating whether the browser is JavaScript enabled - /// - [Obsolete("Capability is not allowed by the W3C specification, and will be removed in a future version of the bindings.")] - public bool IsJavaScriptEnabled - { - get - { - bool javascriptEnabled = false; - object capabilityValue = this.GetCapability(CapabilityType.IsJavaScriptEnabled); - if (capabilityValue != null) - { - javascriptEnabled = (bool)capabilityValue; - } - - return javascriptEnabled; - } - - set - { - this.SetCapability(CapabilityType.IsJavaScriptEnabled, value); - } - } - /// /// Gets or sets a value indicating whether the browser accepts SSL certificates. /// @@ -248,7 +224,7 @@ public static DesiredCapabilities HtmlUnit() public static DesiredCapabilities HtmlUnitWithJavaScript() { DesiredCapabilities dc = new DesiredCapabilities("htmlunit", string.Empty, new Platform(PlatformType.Any)); - dc.IsJavaScriptEnabled = true; + dc.SetCapability(CapabilityType.IsJavaScriptEnabled, true); return dc; } @@ -278,7 +254,6 @@ public static DesiredCapabilities Chrome() { // This is strangely inconsistent. DesiredCapabilities dc = new DesiredCapabilities("chrome", string.Empty, new Platform(PlatformType.Any)); - dc.IsJavaScriptEnabled = true; return dc; } @@ -383,7 +358,6 @@ public override int GetHashCode() result = this.BrowserName != null ? this.BrowserName.GetHashCode() : 0; result = (31 * result) + (this.Version != null ? this.Version.GetHashCode() : 0); result = (31 * result) + (this.Platform != null ? this.Platform.GetHashCode() : 0); - result = (31 * result) + (this.IsJavaScriptEnabled ? 1 : 0); return result; } @@ -393,7 +367,7 @@ public override int GetHashCode() /// String of capabilities being used public override string ToString() { - return string.Format(CultureInfo.InvariantCulture, "Capabilities [BrowserName={0}, IsJavaScriptEnabled={1}, Platform={2}, Version={3}]", this.BrowserName, this.IsJavaScriptEnabled, this.Platform.PlatformType.ToString(), this.Version); + return string.Format(CultureInfo.InvariantCulture, "Capabilities [BrowserName={0}, Platform={1}, Version={2}]", this.BrowserName, this.Platform.PlatformType.ToString(), this.Version); } /// @@ -414,11 +388,6 @@ public override bool Equals(object obj) return false; } - if (this.IsJavaScriptEnabled != other.IsJavaScriptEnabled) - { - return false; - } - if (this.BrowserName != null ? this.BrowserName != other.BrowserName : other.BrowserName != null) { return false;