Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double Click not working #773

Closed
rscwcd opened this issue Jun 7, 2017 · 11 comments
Closed

Double Click not working #773

rscwcd opened this issue Jun 7, 2017 · 11 comments

Comments

@rscwcd
Copy link

rscwcd commented Jun 7, 2017

Hi,

We upgraded our system to use Gecko Driver(Version geckodriver-v0.16.1-win64) along with Selenium Web Driver(3.4.0) and FF 53.0. A feature called "Double Click" in our project is not working. We tried many different techniques but till now there is no success in hand. Also, we are not getting any error out of that. Below are the code that we are using to do so :

protected T double_click(By locator) {
WebElement clickable = findElement(ExpectedConditions.elementToBeClickable(locator));
new Actions(driver).moveToElement(clickable).doubleClick(clickable).perform();
return me();
}

The above method is 👎

  1. Able to find the element
  2. Able to click on the element
  3. Not able to generate double click event.
  4. Rest other tests gets fail

The failure is not specific to any event or project but to all. Please advise.

@andreastt
Copy link
Contributor

Duplicate of #661.

@rscwcd
Copy link
Author

rscwcd commented Jun 7, 2017

@andreastt : Hi, yes,this issue is duplicate of many others issues in the forum but I did't find any appropriate solution for this over there. Request you to let us know the exact actions that can be taken to get out of this.

@andreastt
Copy link
Contributor

@rscwcd I haven’t had time to look into it yet.

@rscwcd
Copy link
Author

rscwcd commented Jun 7, 2017

Okay. Please look into it whenever you get time, but i saw this issue has already been closed by you.

@rscwcd
Copy link
Author

rscwcd commented Jun 8, 2017

@andreastt : Hi, did you get time to look for this issue ? This is show stopper for our project.

@andreastt
Copy link
Contributor

@rscwcd I haven’t had time to look into #661 yet.

@vinhtc2000
Copy link

@rscwcd I have met the same issue like you. You can use javascript to work around. Below are the Python script that I did:

executeScript = "var event = new MouseEvent('dblclick', {'view': window,'bubbles': true,'cancelable': true});document.evaluate("" + XPATH_VARIABLE + "", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.dispatchEvent(event);"

driver.execute_script(executeScript)

====
XPATH_VARIABLE <= the element's xpath

Hope this helps!

@CDJojn
Copy link

CDJojn commented Jun 13, 2017

@vinhtc2000 are you sure that code is working? I have tried very similar code with different kind of MouseEvent - "mouseover", "mouseenter" and "mousemove" and it is not working, because this dispatched event has set isTrusted set as false. In this case a lot of JS functionality on web doesn't work. Do you have any solution how to start Firefox without checking of isTrusted flag?

@vinhtc2000
Copy link

@CDJojn I had not meet the same with your issue. My script works fine until now. I'm using:

  • Firefox 53.0.3 (32 bit)
  • Selenium 3.3.x
  • Python 2.7.3

@BeschtaBrandon
Copy link

I believe the double click issue is still occuring

@whimboo
Copy link
Collaborator

whimboo commented Jun 19, 2017

In case there is any helpful information please add it to issue #661. It's not helpful to have to maintain two issues which handle the same topic.

To prevent more me too comments, I will lock down this one now. Thanks.

@mozilla mozilla locked and limited conversation to collaborators Jun 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants