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

Method SimpleDirection

dotnet/src/webdriver/RelativeBy.cs:316–334  ·  view source on GitHub ↗
(string direction, object locator)

Source from the content-addressed store, hash-verified

314 }
315
316 private RelativeBy SimpleDirection(string direction, object locator)
317 {
318 if (string.IsNullOrEmpty(direction))
319 {
320 throw new ArgumentNullException(nameof(direction), "Direction cannot be null or the empty string");
321 }
322
323 if (locator == null)
324 {
325 throw new ArgumentNullException(nameof(locator), "Element locator to cannot be null");
326 }
327
328 Dictionary<string, object> filter = new Dictionary<string, object>();
329 filter["kind"] = direction;
330 filter["args"] = new List<object>() { GetSerializableObject(locator) };
331 this.filters.Add(filter);
332
333 return new RelativeBy(this.root, this.filters);
334 }
335
336 private static object GetSerializableRoot(object root)
337 {

Callers

nothing calls this directly

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected