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

Method SendKeys

dotnet/src/webdriver/Alert.cs:71–82  ·  view source on GitHub ↗

Sends keys to the alert. The keystrokes to send. If is .

(string keysToSend)

Source from the content-addressed store, hash-verified

69 /// <param name="keysToSend">The keystrokes to send.</param>
70 /// <exception cref="ArgumentNullException">If <paramref name="keysToSend" /> is <see langword="null"/>.</exception>
71 public void SendKeys(string keysToSend)
72 {
73 if (keysToSend is null)
74 {
75 throw new ArgumentNullException(nameof(keysToSend), "Keys to send must not be null.");
76 }
77
78 Dictionary<string, object?> parameters = new Dictionary<string, object?>();
79 parameters.Add("text", keysToSend);
80
81 this.driver.Execute(DriverCommand.SetAlertValue, parameters);
82 }
83}

Callers

nothing calls this directly

Calls 2

AddMethod · 0.45
ExecuteMethod · 0.45

Tested by

no test coverage detected