/// Send the specified keys to the active alert.
///
/// # Example:
/// You can specify anything that implements `Into<TypingData>`. This
/// includes &str and String.
/// ```rust
/// # use thirtyfour::error::WebDriverResult;
/// # use thirtyfour::{By, DesiredCapabilities, WebDriver};
/// # use tokio;
/// #
/// # #[tokio::main]
/// # async fn main() -> WebDriverResult<()> {
/// #     let caps = DesiredCapabilities::chrome();
/// #     let driver = WebDriver::new("http://localhost:4444/wd/hub", &caps).await?;
/// #     driver.get("http://localhost:8000").await?;
/// #     driver.find_element(By::Id("alertbutton3")).await?.click().await?;
/// let alert = driver.switch_to().alert();
/// alert.send_keys("selenium").await?;
/// alert.accept().await?;
/// #     let elem = driver.find_element(By::Id("alert-result")).await?;
/// #     assert_eq!(elem.text().await?, "selenium");
/// #     Ok(())
/// # }
/// ```
///
/// You can also send special key combinations like this:
/// ```rust
/// # use thirtyfour::error::WebDriverResult;
/// # use thirtyfour::{By, DesiredCapabilities, Keys, WebDriver};
/// # use tokio;
/// #
/// # #[tokio::main]
/// # async fn main() -> WebDriverResult<()> {
/// #     let caps = DesiredCapabilities::chrome();
/// #     let driver = WebDriver::new("http://localhost:4444/wd/hub", &caps).await?;
/// #     driver.get("http://localhost:8000").await?;
/// #     driver.find_element(By::Id("alertbutton3")).await?.click().await?;
/// let alert = driver.switch_to().alert();
/// alert.send_keys("selenium").await?;
/// alert.send_keys(Keys::Control + "a").await?;
/// alert.send_keys("thirtyfour").await?;
/// #     alert.accept().await?;
/// #     let elem = driver.find_element(By::Id("alert-result")).await?;
/// #     assert_eq!(elem.text().await?, "thirtyfour");
/// #     Ok(())
/// # }
/// ```
Send the specified keys to the active alert.
Send the specified keys to the active alert .
pub async fn send_keys<S>(&self, keys: S) -> WebDriverResult<()>
    where
        S: Into<TypingData>,
    {
        self.conn
            .execute(Command::SendAlertText(&self.session_id, keys.into()))
            .await
            .map(|_| ())
    }
pub async fn send_keys < S > ( & self , keys : S ) -> WebDriverResult < ( ) > where S : Into < TypingData > , { self . conn . execute ( Command :: SendAlertText ( & self . session_id , keys . into ( ) ) ) . await . map ( | _ | ( ) ) }
Send the specified keys to the active alert.
Send the specified keys to the active alert .
&self
keys
S
example:
You can specify anything that implements `Into`. This
includes &str and String.
You can specify anything that implements ` Into ` . This includes &str and String .
use thirtyfour::error::webdriverresult;
None
use thirtyfour::{by, desiredcapabilities, webdriver};
None
use tokio;
None
#[tokio::main]
None
async fn main() -> webdriverresult<()> {
None
let caps = desiredcapabilities::chrome();
None
let driver = webdriver::new("http://localhost:4444/wd/hub", &caps).await?;
None
driver.get("http://localhost:8000").await?;
None
driver.find_element(by::id("alertbutton3")).await?.click().await?;
None
let elem = driver.find_element(by::id("alert-result")).await?;
None
assert_eq!(elem.text().await?, "selenium");
None
ok(())
None
}


You can also send special key combinations like this:
```rust
You can also send special key combinations like this : ` ` ` rust
use thirtyfour::error::webdriverresult;
None
use thirtyfour::{by, desiredcapabilities, keys, webdriver};
None
use tokio;
None
#[tokio::main]
None
async fn main() -> webdriverresult<()> {
None
let caps = desiredcapabilities::chrome();
None
let driver = webdriver::new("http://localhost:4444/wd/hub", &caps).await?;
None
driver.get("http://localhost:8000").await?;
None
driver.find_element(by::id("alertbutton3")).await?.click().await?;
None
alert.accept().await?;
None
let elem = driver.find_element(by::id("alert-result")).await?;
None
assert_eq!(elem.text().await?, "thirtyfour");
None
ok(())
None
}
None