[][src]Module selenium_rs::element

Element enables most of the site interaction, and wraps user interactions such as typing text and clicking on things. Note that each element is tied to the specific session (currently, we can't hold on to the same element across sessions).

Example - Inspecting attributes of an element

    use selenium_rs::webdriver::{Selector, Browser, WebDriver};
    use selenium_rs::element::Element;

    let mut driver = WebDriver::new(Browser::Chrome);
    driver.start_session();
    driver.navigate("http://www.google.com");
    let search_form =  driver.find_element(Selector::CSS, "#searchform").unwrap();

    assert!(search_form.get_css_value("min-width").unwrap() == "980px");

Structs

Element

Element provides an interface from which to inspect and interact with the requested elements on the page. The general flow involves navigating to your webpage in question, and then requesting a specific element through the query API, and then using the returned element to inspect the element on the page