You are on page 1of 3

Working With Web Elements

Methods of Web Elements

 is_selected() – this method is used to check if the current element is selected or not.
Returns Boolean.
 is_displayed() - this method is used to check if the current element is displayed or not.
Returns Boolean.
 is_enabled() - this method is used to check if the current element is enabled or not. Returns
Boolean.
 get_attribute() - this method is used to get attribute value of an element.
 send_keys() – this method is used to type characters in text box elements.
 click() – this method is used to click on an element.
 clear() – this method is used to clear the contents of an element.
 tag_name() – this method returns the tag name of that particular element.
 text() – this method returns the text value of an element.
Operations on Elements

 Clicking Links / Buttons / Selecting radio buttons / checkboxes


 Setting values of text boxes
 Setting value from a drop down element – Visible text, value and index
 Getting text values
 Clearing text values.

You might also like