Skip to content
This repository was archived by the owner on Nov 29, 2018. It is now read-only.
This repository was archived by the owner on Nov 29, 2018. It is now read-only.

Double click is not working - IE, FF - Java implementation #1722

@lukeis

Description

@lukeis

Originally reported on Google Code with ID 1722

What steps will reproduce the problem?
1. new Actions(webDriver).doubleClick(webDriver.findElement(...)).build().perform();
has no effect
2. DoubleClick actions consists from 2 actions - moveToLocation 0 this is working correctly
because I can see applying hover styles over the element but mouse.doubleClick(location)
does not working

What is the expected output? What do you see instead?
DoubleClick should work :-)

What version of the product are you using? On what operating system?
Trunk version of the selenium - revision 12243
Firefox 4 and IE 8
Windows 7
Java client

Please provide any additional information below.

I did and workaround (custom DoubleClickAction):
if (...firefox...) {
    ((JavascriptExecutor) webDriver).executeScript("var evt = document.createEvent('MouseEvents');
evt.initMouseEvent('dblclick',true, true, window, 0, 0, 0, 0, 0, false, false, false,
false, 0,null); arguments[0].dispatchEvent(evt);", webElement);
} else if (...ie...) {
    ((JavascriptExecutor) webDriver).executeScript("arguments[0].fireEvent('ondblclick');",
webElement); 
}

this "implementation" is working for me.
(Whole file is located here: http://acris.googlecode.com/svn/sesam/branches/1.1.0/sesam-selenium-support/src/main/java/sk/seges/sesam/core/test/webdriver/action/DoubleClickAction.java)

Hopefully this helps to someone.

Reported by nejakyusername on 2011-05-27 11:21:16

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions