Double Click

Double-clicks a webpage element.

t.doubleClick( selector [, options] )
Parameter Type Description
selector Function | String | Selector | Snapshot | Promise Identifies the webpage element being double-clicked. See Selecting Target Elements.
options (optional) Object A set of options that provide additional parameters for the action. See Click Action Options.

The following example shows how to use the t.doubleClick action to invoke a dialog.

import { Selector } from 'testcafe';

const dialog = Selector('#dialog');

fixture `My fixture`
    .page ``;

test('Invoke Image Options Dialog', async t => {
    await t

The t.doubleClick action will not invoke integrated browser actions such as text selection. Use it to perform double clicks that are processed by webpage elements, not the browser. To select text, use the t.selectText action or emulate a key shortcut with t.pressKey('ctrl+a').