Returns a ElementRect for this element. x and y represent the top left coordinates of the WebElement relative to top left corner of the document. height and the width will contain the height and the width of this element.
Indicates whether this element is enabled. More specifically, if a WebElement has a disabled attribute, or a form control is disabled, this method will return false.
Returns
a boolean value that indicates whether this element is enabled or not
Determines whether or not this element is selected. This operation only applies to input elements such as checkboxes, options in a select list, and radio buttons.
Returns
True if the element is selected and false otherwise.
Simulates a user pressing both printable and non-printable keys
Parameters
A
list of String and/or Keys. The example below would send the abc string, and then 3 backspace keystrokes, resulting in a blank inputfield (assuming it was blank before): someElement.sendKeys(new Object[] { "abc", Keys.BACK_SPACE, Keys.BACK_SPACE, keys.BACK_SPACE });
WebElement is a class that represents an HTML element. This class provides a set of methods that allow you to interact with a page.
For example, below is a sample code which locates an input element (Save button) and use WebElement.click method to click the button:
Returns the current value of a given attribute of the element. This method returns the value of the given attribute, unless that attribute nor the value is present, in which case null is returned.
Returns
the attribute/property's current value or null if the value is not set
Determines whether this element is selected or not. This operation only applies to input elements such as checkboxes, options in a select and radio buttons.
Returns
a boolean that indicates whether this element is selected or not