Skip to content

Commit

Permalink
Avoid long/int confusion for safari options
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Stewart committed Feb 14, 2018
1 parent d0e1679 commit 418060e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions java/client/src/org/openqa/selenium/safari/SafariOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import org.openqa.selenium.Capabilities;
import org.openqa.selenium.MutableCapabilities;
import org.openqa.selenium.Platform;
import org.openqa.selenium.Proxy;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.remote.CapabilityType;
Expand Down Expand Up @@ -66,10 +65,9 @@ public SafariOptions() {
options.put(Option.PORT, 0);

setUseTechnologyPreview(false);
setUseCleanSession(false);
useCleanSession(false);

setCapability(CapabilityType.BROWSER_NAME, "safari");
setCapability(CapabilityType.PLATFORM, Platform.MAC);
}

public SafariOptions(Capabilities source) {
Expand Down Expand Up @@ -206,7 +204,7 @@ public SafariOptions setProxy(Proxy proxy) {
*/
@Deprecated
public int getPort() {
return (int) options.getOrDefault(Option.PORT, 0);
return ((Number) options.getOrDefault(Option.PORT, 0)).intValue();
}

/**
Expand Down

0 comments on commit 418060e

Please sign in to comment.