Class for defining sequences of complex user interactions. Each sequence will not be executed until {@link #perform} is called.
Example:
new webdriver.ActionSequence(driver).
keyDown(webdriver.Key.SHIFT).
click(element1).
click(element2).
dragAndDrop(element3, element4).
keyUp(webdriver.Key.SHIFT).
perform();
The driver instance to use.
Clicks a mouse button.
If an element is provided, the mouse will first be moved to the center of that element. This is equivalent to:
sequence.mouseMove(element).click()
Either the element to interact with or the button to click with. Defaults to {@link webdriver.Button.LEFT} if neither an element nor button is specified.
The button to use. Defaults to {@link webdriver.Button.LEFT}. Ignored if a button is provided as the first argument.
A self reference.
Double-clicks a mouse button.
If an element is provided, the mouse will first be moved to the center of that element. This is equivalent to:
sequence.mouseMove(element).doubleClick()
Warning: this method currently only supports the left mouse button. See http://code.google.com/p/selenium/issues/detail?id=4047
Either the element to interact with or the button to click with. Defaults to {@link webdriver.Button.LEFT} if neither an element nor button is specified.
The button to use. Defaults to {@link webdriver.Button.LEFT}. Ignored if a button is provided as the first argument.
A self reference.
Convenience function for performing a "drag and drop" manuever. The target element may be moved to the location of another element, or by an offset (in pixels).
The element to drag.
A self reference.
Performs a modifier key press. The modifier key is not released until {@link #keyUp} or {@link #sendKeys} is called. The key press will be targetted at the currently focused element.
The modifier key to push. Must be one of {ALT, CONTROL, SHIFT, COMMAND, META}.
A self reference.
Performs a modifier key release. The release is targetted at the currently focused element.
The modifier key to release. Must be one of {ALT, CONTROL, SHIFT, COMMAND, META}.
A self reference.
Presses a mouse button. The mouse button will not be released until {@link #mouseUp} is called, regardless of whether that call is made in this sequence or another. The behavior for out-of-order events (e.g. mouseDown, click) is undefined.
If an element is provided, the mouse will first be moved to the center of that element. This is equivalent to:
sequence.mouseMove(element).mouseDown()
Warning: this method currently only supports the left mouse button. See http://code.google.com/p/selenium/issues/detail?id=4047
Either the element to interact with or the button to click with. Defaults to {@link webdriver.Button.LEFT} if neither an element nor button is specified.
The button to use. Defaults to {@link webdriver.Button.LEFT}. Ignored if a button is provided as the first argument.
A self reference.
Moves the mouse. The location to move to may be specified in terms of the mouse's current location, an offset relative to the top-left corner of an element, or an element (in which case the middle of the element is used).
A self reference.
Releases a mouse button. Behavior is undefined for calling this function without a previous call to {@link #mouseDown}.
If an element is provided, the mouse will first be moved to the center of that element. This is equivalent to:
sequence.mouseMove(element).mouseUp()
Warning: this method currently only supports the left mouse button. See http://code.google.com/p/selenium/issues/detail?id=4047
Either the element to interact with or the button to click with. Defaults to {@link webdriver.Button.LEFT} if neither an element nor button is specified.
The button to use. Defaults to {@link webdriver.Button.LEFT}. Ignored if a button is provided as the first argument.
A self reference.
Executes this action sequence.
A promise that will be resolved once this sequence has completed.
Simulates typing multiple keys. Each modifier key encountered in the sequence will not be released until it is encountered again. All key events will be targetted at the currently focused element.
The keys to type.
A self reference.