Performs a modifier key Does not release the modifier key - subsequent interactions may assume it's kept pressed. keyDown(modifier_key) Parameters: modifier_key any of the modifier keys (Keys.ALT, – Keys.SHIFT, or Keys.CONTROL) Performs a key release. Parameters: keyUp(modifier _key) modifier_key any of the modifier keys (Keys.ALT, – or Keys.CONTROL) Moves the mouse from its current position (or 0,0) by the given offset. Parameters: moveByOffset(x-offset, y-offset) x-offset- horizontal offset. A negative value means moving the mouse left. y-offset- vertical offset. A negative value means moving the mouse up. the mouse to the middle of the element. Parameters: moveToElement(toElement) toElement- element to move to. Releases the depressed left mouse button at the current release() mouse location a series of keystrokes onto the element. Parameters: onElement - element that will receive the keystrokes, sendKeys(onElement, charsequence) usually a text field charsequence any string value representing the sequence – of keystrokes to be sent In the following example, we shall use the moveToElement() method to mouse-over on one Mercury Tours’ table rows. See the example below.
keyDown(modifier_key) Performs a modifier key Does not release the modifier key - subsequent interactions may assume it's kept pressed. Parameters: modifier_key – any of the modifier keys (Keys.ALT, Keys.SHIFT, or Keys.CONTROL) keyUp(modifier _key) Performs a key release. Parameters: modifier_key – any of the modifier keys (Keys.ALT, or Keys.CONTROL) moveByOffset(x-offset, y-offset) Moves the mouse from its current position (or 0,0) by the given offset. Parameters: x-offset- horizontal offset. A negative value means moving the mouse left. y-offset- vertical offset. A negative value means moving the mouse up. moveToElement(toElement) the mouse to the middle of the element. Parameters: toElement- element to move to. release() Releases the depressed left mouse button at the current mouse location sendKeys(onElement, charsequence) a series of keystrokes onto the element. Parameters: onElement - element that will receive the keystrokes, usually a text field charsequence – any string value representing the sequence of keystrokes to be sent In the following example, we shall use the moveToElement() method to mouse-over on one Mercury Tours’ table rows. See the example below.
Selenium-Notes.docx