selenium.webdriver.remote.webelement

WebElement implementation.

class selenium.webdriver.remote.webelement.LocalFileDetector[source]
classmethod is_local_file(*keys)[source]
class selenium.webdriver.remote.webelement.WebElement(parent, id_)[source]

Represents an HTML element.

Generally, all interesting operations to do with interacting with a page will be performed through this interface.

clear()[source]

Clears the text if it’s a text entry element.

click()[source]

Clicks the element.

find_element(by='id', value=None)[source]
find_element_by_class_name(name)[source]

Finds an element by their class name.

find_element_by_css_selector(css_selector)[source]

Find and return an element by CSS selector.

find_element_by_id(id_)[source]

Finds element by id.

Finds element by link text.

find_element_by_name(name)[source]

Find element by name.

find_element_by_tag_name(name)[source]
find_element_by_xpath(xpath)[source]

Finds element by xpath.

find_elements(by='id', value=None)[source]
find_elements_by_class_name(name)[source]

Finds elements by their class name.

find_elements_by_css_selector(css_selector)[source]

Find and return list of multiple elements by CSS selector.

find_elements_by_id(id_)[source]
find_elements_by_name(name)[source]
find_elements_by_tag_name(name)[source]
find_elements_by_xpath(xpath)[source]

Finds elements within the elements by xpath.

get_attribute(name)[source]

Gets the attribute value.

id[source]
is_displayed()[source]

Whether the element would be visible to a user

is_enabled()[source]

Whether the element is enabled.

is_selected()[source]

Whether the element is selected.

location[source]

Returns the location of the element in the renderable canvas

location_once_scrolled_into_view[source]

CONSIDERED LIABLE TO CHANGE WITHOUT WARNING. Use this to discover where on the screen an element is so that we can click it. This method should cause the element to be scrolled into view.

Returns the top lefthand corner location on the screen, or None if the element is not visible

parent[source]
send_keys(*value)[source]

Simulates typing into the element.

size[source]

Returns the size of the element

submit()[source]

Submits a form.

tag_name[source]

Gets this element’s tagName property.

text[source]

Gets the text of the element.

value_of_css_property(property_name)[source]

Returns the value of a CSS property

Previous topic

selenium.webdriver.remote.webdriver

This Page