Class InputBuilder
- Namespace
- WebDriverBiDi.Input
- Assembly
- WebDriverBiDi.Extensions.dll
Helper class to build a sequence of inputs suitable for use as payload to the input.PerformActions command in the WebDriver BiDi protocol.
public class InputBuilder
- Inheritance
-
InputBuilder
- Inherited Members
- Extension Methods
Constructors
InputBuilder()
public InputBuilder()
Properties
DefaultKeyInputSource
Gets the default key input source, which is created the first time it is used.
public KeyInputSource DefaultKeyInputSource { get; }
Property Value
DefaultPointerInputSource
Gets the default pointer input source, a mouse, which is created the first time it is used. Pointer sources created with CreatePointerInputSource(PointerType) never become the default.
public PointerInputSource DefaultPointerInputSource { get; }
Property Value
DefaultWheelInputSource
Gets the default wheel input source, which is created the first time it is used.
public WheelInputSource DefaultWheelInputSource { get; }
Property Value
Methods
AddAction(InputAction)
Adds an action as a tick of its own, in which every other input source pauses.
public InputBuilder AddAction(InputAction actionToAdd)
Parameters
actionToAddInputActionThe action.
Returns
- InputBuilder
This builder, for chaining.
Exceptions
- ArgumentException
Thrown when the action's input source was not created by this builder.
AddActions(params InputAction[])
Adds actions performed together, as one tick, in which every input source without an action pauses.
public InputBuilder AddActions(params InputAction[] actionsToAdd)
Parameters
actionsToAddInputAction[]The actions, at most one for each input source.
Returns
- InputBuilder
This builder, for chaining.
Exceptions
- ArgumentException
Thrown when an action's input source was not created by this builder, or two actions share one.
Build()
Builds the action sequences of every input source, for Actions.
public List<SourceActions> Build()
Returns
- List<SourceActions>
The action sequences.
Clear()
Removes every input source and action, including the default input sources.
public void Clear()
CreateKeyInputSource()
Creates a key input source.
public KeyInputSource CreateKeyInputSource()
Returns
- KeyInputSource
The input source.
CreateNoneInputSource()
Creates an input source that performs only pauses, for timing the other sources' actions.
public NoneInputSource CreateNoneInputSource()
Returns
- NoneInputSource
The input source.
CreatePointerInputSource(PointerType)
Creates a pointer input source.
public PointerInputSource CreatePointerInputSource(PointerType pointerType)
Parameters
pointerTypePointerTypeThe kind of pointer: a mouse, a pen, or a touch.
Returns
- PointerInputSource
The input source.
CreateWheelInputSource()
Creates a wheel input source.
public WheelInputSource CreateWheelInputSource()
Returns
- WheelInputSource
The input source.