MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / GetMergeResult

Method GetMergeResult

dotnet/src/webdriver/DriverOptions.cs:230–278  ·  view source on GitHub ↗

Compares this object with another to see if there are merge conflicts between them. The object to compare with. A object containing the status of the attempted merge. If is

(DriverOptions other)

Source from the content-addressed store, hash-verified

228 /// <returns>A <see cref="DriverOptionsMergeResult"/> object containing the status of the attempted merge.</returns>
229 /// <exception cref="ArgumentNullException">If <paramref name="other"/> is <see langword="null"/>.</exception>
230 public virtual DriverOptionsMergeResult GetMergeResult(DriverOptions other)
231 {
232 ArgumentNullException.ThrowIfNull(other);
233
234 DriverOptionsMergeResult result = new DriverOptionsMergeResult();
235 if (this.BrowserName != null && other.BrowserName != null)
236 {
237 result.IsMergeConflict = true;
238 result.MergeConflictOptionName = "BrowserName";
239 return result;
240 }
241
242 if (this.BrowserVersion != null && other.BrowserVersion != null)
243 {
244 result.IsMergeConflict = true;
245 result.MergeConflictOptionName = "BrowserVersion";
246 return result;
247 }
248
249 if (this.PlatformName != null && other.PlatformName != null)
250 {
251 result.IsMergeConflict = true;
252 result.MergeConflictOptionName = "PlatformName";
253 return result;
254 }
255
256 if (this.Proxy != null && other.Proxy != null)
257 {
258 result.IsMergeConflict = true;
259 result.MergeConflictOptionName = "Proxy";
260 return result;
261 }
262
263 if (this.UnhandledPromptBehavior != other.UnhandledPromptBehavior)
264 {
265 result.IsMergeConflict = true;
266 result.MergeConflictOptionName = "UnhandledPromptBehavior";
267 return result;
268 }
269
270 if (this.PageLoadStrategy != PageLoadStrategy.Default && other.PageLoadStrategy != PageLoadStrategy.Default)
271 {
272 result.IsMergeConflict = true;
273 result.MergeConflictOptionName = "PageLoadStrategy";
274 return result;
275 }
276
277 return result;
278 }
279
280 /// <summary>
281 /// Sets the logging preferences for this driver.

Callers 2

Calls 1

ThrowIfNullMethod · 0.80

Tested by

no test coverage detected