WebDriver 2.44.0, IE11: double click does not work (Java)

207 views
Skip to first unread message

my selenium

unread,
Nov 11, 2014, 6:32:58 AM11/11/14
to seleniu...@googlegroups.com
Hi all,

I have tried, but none of the following works on IE11 IEDriver downloaded from with http://selenium-release.storage.googleapis.com/2.44/IEDriverServer_Win32_2.44.0.zip.

Can someone teach me how to do it ?

Thanks,
MYN,

================================

// Not working
    public static void doubleClickByJs(WebElement element)
    {
        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);
    }

// Not working

public static void doubleClickByAction(WebElement element)
    {
        final Actions a = new Actions(TestContext.get().getDriver());
        a.moveToElement(element).doubleClick(element).build().perform();
    }
================================

my selenium

unread,
Nov 11, 2014, 6:41:42 AM11/11/14
to seleniu...@googlegroups.com
I am on Win 7, 64-bit, but I have to use the IEDriverServer 32bit, because the 64bit http://selenium-release.storage.googleapis.com/2.44/IEDriverServer_x64_2.44.0.zip makes entering into text field using WebElement.sendKeys() EXTREMLY SLOOOOOWWWW.

Thanks,

Jim Evans

unread,
Nov 11, 2014, 7:28:43 AM11/11/14
to seleniu...@googlegroups.com
Double-click is not globally broken for all websites with the IE driver, as proven by the Selenium project integration tests which run in a CI environment on every commit to the project. If you are unwilling[1] to provide an HTML page that demonstrates the issue, it's unlikely anyone will be able to give more guidance.

Oh, and as for the 32-bit vs. 64-bit IE driver, the sendKeys issue has been discussed over and over and over again. It's been logged in the issue tracker[2]. There have been blog posts written about it[3]. I've given public talks that discuss the issue in depth. Can we at least now stop expressing surprise and ill-informed disappointment about the issue?

[1] http://jimevansmusic.blogspot.com/2012/12/not-providing-html-page-is-bogus.html
[2] https://code.google.com/p/selenium/issues/detail?id=5116
[3] http://jimevansmusic.blogspot.com/2014/09/screenshots-sendkeys-and-sixty-four.html

my selenium

unread,
Nov 11, 2014, 7:53:01 AM11/11/14
to seleniu...@googlegroups.com
Hi Jim Evans,

I'm lucky to receive your help.

[1] The HTML page: http://172.24.40.193:8080/ac-web-package/#sla--id=oQAinuycRlzqmpzfZ1fJfU, when prompted for credentials, please enter: username = "dm0eo5sfrnp2", password = "od53zinx9dobpgjxb72" (without double quotes).

The items to be expected with double click failure has the name "PleaseDoubleClickHere_1" and "PleaseDoubleClickHere_2"

For [2] and [3] I understand your frustration when being asked repeatedly like that. Thanks for the URLs
Regards,
MYN,



--
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/d6adef9d-1406-47f1-b6f1-1c75a4ec064f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

my selenium

unread,
Nov 12, 2014, 2:59:10 AM11/12/14
to seleniu...@googlegroups.com
Hi Jim Evans and others,

For the HTML page, I copy here also the HTML snippet where I want to have a Java WebDriver 2.44.0 double click

<table class="x-grid-item x-grid-item-selected" id="gridview-1033-record-128" style="width: 100%;" cellspacing="0" cellpadding="0" data-recordindex="6" data-recordid="128" data-boundview="gridview-1033"><tbody><tr class="  x-grid-row"><td tabindex="-1" class="x-grid-cell x-grid-td x-grid-cell-gridcolumn-1031 ac-warning x-grid-cell-first x-unselectable" style="width: 187px;" data-columnid="gridcolumn-1031"><div class="x-grid-cell-inner " style="text-align: left;" unselectable="on">PleaseDoubleClickHere_1</div></td><td tabindex="-1" class="x-grid-cell x-grid-td x-grid-cell-gridcolumn-1032 x-grid-cell-last x-unselectable" style="width: 186px;" data-columnid="gridcolumn-1032"><div class="x-grid-cell-inner " style="text-align: left;" unselectable="on"><span>00:00&nbsp;<span class="label-note">UTC</span><span></span></span></div></td></tr></tbody></table>

Thanks for your time,
MYN,

CH!NN@ K

unread,
Nov 12, 2014, 3:03:42 AM11/12/14
to seleniu...@googlegroups.com
hi..  
Verify this link for Double click in selenium linux/windows32&
64bithttp://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.

my selenium

unread,
Nov 12, 2014, 4:21:18 AM11/12/14
to seleniu...@googlegroups.com
Hi CH!NN,
Did you read that this does not work, or you just want to promote your site ?
MYN,

// does not work
public static void doubleClickByAction(WebElement element)
    {
        final Actions a = new Actions(driver);
        a.moveToElement(element).doubleClick(element).build().perform();
    }

CH!NN@ K

unread,
Nov 12, 2014, 4:57:37 AM11/12/14
to seleniu...@googlegroups.com
hi my selenium, 
Actually iam using linux machine@office(debian64 bit) .. It is working fine..same code/script working good at my laptop windows7 (32-bit)..thats why iam posting in that site..not promote my site..okay check it once and double click on this  link( http://techlearn.in/content/double-click )and you will get (DOUBLE CLICK ME) button(red color). Click on Double click on that button it is working. Iam attaching one image for double click,check it once.

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

Selection_105.png

my selenium

unread,
Nov 12, 2014, 7:48:42 AM11/12/14
to seleniu...@googlegroups.com
Hi CH!NN,
Appologies for my previous email.
It confirms what Jim Evans says: double click would work on IE 11 depending on the HTML structure.

Both the JavaScript way, and the Actions way work for your button, but not for my button. Time to change my HTML.
Thanks

==== Good button that is double-clickable on IE11 ====
<div class="field-item even" property="content:encoded">
<button type="button">Double-Click Me!</button>
<script>
$(document).ready(function(){
  $("button").dblclick(function(){
   alert("The Button was double-clicked.");
  });
});
</script>
</div>

==== Bad button that is NOT double-clickable on IE11 ====
<table class="x-grid-item x-grid-item-selected" id="gridview-1033-record-128" style="width: 100%;" cellspacing="0" cellpadding="0" data-recordindex="6" data-recordid="128" data-boundview="gridview-1033"><tbody><tr class="  x-grid-row"><td tabindex="-1" class="x-grid-cell x-grid-td x-grid-cell-gridcolumn-1031 ac-warning x-grid-cell-first x-unselectable" style="width: 187px;" data-columnid="gridcolumn-1031"><div class="x-grid-cell-inner " style="text-align: left;" unselectable="on">PleaseDoubleClickHere_1</div></td><td tabindex="-1" class="x-grid-cell x-grid-td x-grid-cell-gridcolumn-1032 x-grid-cell-last x-unselectable" style="width: 186px;" data-columnid="gridcolumn-1032"><div class="x-grid-cell-inner " style="text-align: left;" unselectable="on"><span>00:00&nbsp;<span class="label-note">UTC</span><span></span></span></div></td></tr></tbody></table>
Reply all
Reply to author
Forward
0 new messages