Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:DevExpress Testcafe ActionOptions TypeDefs

From Leeroopedia
Revision as of 11:11, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/DevExpress_Testcafe_ActionOptions_TypeDefs.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains Type_Definitions, Testing
Last Updated 2026-02-12 12:00 GMT

Overview

Concrete TypeScript type declarations for all action option interfaces used by TestCafe's test controller action methods.

Description

This file defines TypeScript interfaces for options passed to TestCafe action methods: ActionOptions (base with speed), ClickActionOptions (with offsetX/Y, modifiers, caretPos), TypeActionOptions (with replace, paste, confidential), DragToElementOptions (with destination offsets), TakeScreenshotOptions (with path, fullPage), ResizeToFitDeviceOptions (with portraitOrientation), PressActionOptions (with confidential), CookieOptions (with name, value, domain, path, expires), and ScrollOptions (with scrollTarget).

Usage

These types are automatically available in TypeScript test files for providing options to actions like t.click(), t.typeText(), t.drag(), t.takeScreenshot(), etc.

Code Reference

Source Location

Signature

interface ActionOptions { speed?: number; }
interface ClickActionOptions extends ActionOptions {
    offsetX?: number; offsetY?: number;
    caretPos?: number;
    modifiers?: { ctrl?: boolean; alt?: boolean; shift?: boolean; meta?: boolean; };
}
interface TypeActionOptions extends ClickActionOptions {
    replace?: boolean; paste?: boolean; confidential?: boolean;
}
interface DragToElementOptions extends ActionOptions {
    destinationOffsetX?: number; destinationOffsetY?: number;
}
interface TakeScreenshotOptions { path?: string; fullPage?: boolean; }
interface ResizeToFitDeviceOptions { portraitOrientation?: boolean; }
interface PressActionOptions extends ActionOptions { confidential?: boolean; }
interface CookieOptions {
    name?: string; value?: string; domain?: string; path?: string;
    expires?: Date; maxAge?: number; secure?: boolean; httpOnly?: boolean;
    sameSite?: string;
}

Import

// Automatically available in TestCafe TypeScript test files

I/O Contract

Inputs

Name Type Required Description
speed number (0.01-1) No Action execution speed multiplier
offsetX/Y number No Click offset from element center
modifiers object No Keyboard modifiers (ctrl, alt, shift, meta)
replace boolean No Whether to replace existing text in typeText

Outputs

Name Type Description
Type interfaces TypeScript types Used for type checking in test code

Usage Examples

import { Selector } from 'testcafe';

fixture('Action Options').page('https://example.com');

test('Using action options', async (t: TestController) => {
    // Click with offset and modifiers
    await t.click('#element', {
        offsetX: 10,
        offsetY: 20,
        modifiers: { ctrl: true },
        speed: 0.5,
    });

    // Type with replace and paste
    await t.typeText('#input', 'new text', {
        replace: true,
        paste: true,
        confidential: true,
    });

    // Screenshot with options
    await t.takeScreenshot({
        path: 'screenshots/test.png',
        fullPage: true,
    });
});

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment