View Source Improve this doc

doubleClick

Double-click on an element based on given selector.

Usage

1
browser.doubleClick(selector);

Parameters

Param Type Details
selector String element to double click on. If it matches with more than one DOM-element it automatically clicks on the first element

Example

example.html
1
2
<button id="myButton" ondblclick="document.getElementById('someText').innerHTML='I was dblclicked'">Click me</button>
<div id="someText">I was not clicked</div>
doubleClick.js
1
2
3
4
5
6
7
8
9
it('should demonstrate the doubleClick command', function () {
var myButton = $('#myButton')
myButton.doubleClick()
// or
browser.doubleClick('#myButton')

var value = browser.getText('#someText')
assert(value === 'I was dblclicked') // true
})

Uses