diff --git a/java/client/src/org/openqa/selenium/chrome/ChromeOptions.java b/java/client/src/org/openqa/selenium/chrome/ChromeOptions.java index c93873fd20c9f..322ca9fe15f6d 100644 --- a/java/client/src/org/openqa/selenium/chrome/ChromeOptions.java +++ b/java/client/src/org/openqa/selenium/chrome/ChromeOptions.java @@ -20,6 +20,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; +import com.google.common.base.Objects; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.common.collect.Maps; @@ -200,4 +201,21 @@ DesiredCapabilities toCapabilities() { return capabilities; } + + @Override + public boolean equals(Object other) { + if (!(other instanceof ChromeOptions)) { + return false; + } + ChromeOptions that = (ChromeOptions) other; + return Objects.equal(this.binary, that.binary) + && Objects.equal(this.args, that.args) + && Objects.equal(this.extensionFiles, that.extensionFiles) + && Objects.equal(this.experimentalOptions, that.experimentalOptions); + } + + @Override + public int hashCode() { + return Objects.hashCode(this.binary, this.args, this.extensionFiles, this.experimentalOptions); + } }