Skip to content

Lupa API Reference / commands/locator / DragToOptions

Interface: DragToOptions

Defined in: src/commands/locator.ts:347

Options for the dragTo action.

Extends

Properties

force?

optional force?: boolean

Defined in: src/commands/locator.ts:176

Whether to bypass the actionability checks. Defaults to false.

Inherited from

ForceOption.force


sourcePosition?

optional sourcePosition?: object

Defined in: src/commands/locator.ts:352

A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element.

x

x: number

X coordinate

y

y: number

Y coordinate


targetPosition?

optional targetPosition?: object

Defined in: src/commands/locator.ts:368

A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element.

x

x: number

X coordinate

y

y: number

Y coordinate


timeout?

optional timeout?: number

Defined in: src/commands/locator.ts:166

Maximum time in milliseconds. Defaults to 0 - no timeout. The default value can be changed via actionTimeout option in the config, or by using the browserContext.setDefaultTimeout(timeout) or page.setDefaultTimeout(timeout) methods.

Inherited from

TimeoutOption.timeout


trial?

optional trial?: boolean

Defined in: src/commands/locator.ts:198

When set, this method only performs the actionability checks and skips the action. Defaults to false. Useful to wait until the element is ready for the action without performing it.

Inherited from

TrialOption.trial