Skip to content

Commit c2ece25

Browse files
committed
Make SafariOptions easier to chain
1 parent 1f2eb7f commit c2ece25

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

java/client/src/org/openqa/selenium/safari/SafariOptions.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,9 @@ public static SafariOptions fromCapabilities(Capabilities capabilities)
108108
* @param port The port the {@link SafariDriverService} should be started on,
109109
* or 0 if the server should select a free port.
110110
*/
111-
public void setPort(int port) {
111+
SafariOptions setPort(int port) {
112112
this.port = port;
113+
return this;
113114
}
114115

115116
/**
@@ -122,8 +123,9 @@ public void setPort(int port) {
122123
*
123124
* @param useCleanSession If true, the SafariDriver will erase all existing session data.
124125
*/
125-
public void setUseCleanSession(boolean useCleanSession) {
126+
public SafariOptions setUseCleanSession(boolean useCleanSession) {
126127
this.useCleanSession = useCleanSession;
128+
return this;
127129
}
128130

129131
/**
@@ -133,8 +135,9 @@ public void setUseCleanSession(boolean useCleanSession) {
133135
* @param useTechnologyPreview If true, the SafariDriver will use the Safari Technology Preview,
134136
* otherwise will use the release version of Safari.
135137
*/
136-
public void setUseTechnologyPreview(boolean useTechnologyPreview) {
138+
public SafariOptions setUseTechnologyPreview(boolean useTechnologyPreview) {
137139
this.useTechnologyPreview = useTechnologyPreview;
140+
return this;
138141
}
139142

140143
// Getters

0 commit comments

Comments
 (0)