Double click action not working in Internet Explorer and Chrome browser using selenium webdriver

508 views
Skip to first unread message

Neil Anderssion

unread,
May 2, 2014, 9:38:17 AM5/2/14
to seleniu...@googlegroups.com

Using Selenium WebDriver , java build  I am not able to perform double click action in Internet Explorer and Chrome browser  but the same code is working in Firefox ,

The code for double click which is working fine in Firefox is given below

 builder.moveToElement(e).doubleClick().build().perform();


I am using selenium java built and IEDriver version 40 and ChromeDriver 2.9 ,
i also tried with 41 version as well ,
can any one tell me what changes are required in the code to perform double click in IE / Chrome

my selenium

unread,
Nov 11, 2014, 6:35:55 AM11/11/14
to seleniu...@googlegroups.com
On Chrome, I use (for ChromeDriver 2.10, 2.11, 2.12). It works

        JavascriptExecutor executor = (JavascriptExecutor) TestContext.get().getDriver();
        executor.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);", element);


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/330dd30e-4089-4cdd-99cf-b4eecd9a88f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

CH!NN@ K

unread,
Nov 11, 2014, 8:04:02 AM11/11/14
to seleniu...@googlegroups.com
hi.. It is working in chrome browser and not sure about internet explorer ..please verify this link : http://techlearn.in/content/how-double-click-buttontext-webelements-selenium-webdriver

---
Thanks & Regards,
Purushotham Karimbedu,
Web Developer and QA Engineer,
Personal Website : http://techlearn.in
Phone no :9000109120.

Reply all
Reply to author
Forward
0 new messages