Fixing RemoteWebElement.Equals to use remote call only if not W3C compliant
@@ -937,6 +937,10 @@ public override bool Equals(object obj)
return true;
}
+ if (!driver.IsSpecificationCompliant)
+ {
+ try
+ {
Dictionary<string, object> parameters = new Dictionary<string, object>();
parameters.Add("id", this.Id);
parameters.Add("other", otherAsElement.Id);
@@ -945,6 +949,13 @@ public override bool Equals(object obj)
object value = response.Value;
return value != null && value is bool && (bool)value;
}
+ catch (NotImplementedException)
+ {
+ }
+ }
+
+ return false;
+ }
/// <summary>
/// Converts an object into an object that represents an element for the wire protocol.
