angular / protractor

E2E test framework for Angular apps
http://www.protractortest.org
MIT License
8.75k stars 2.31k forks source link

UnsupportedOperationError: mouseMoveTo in Firefox #4177

Open zinevych opened 7 years ago

zinevych commented 7 years ago

I'm using the latest Protractor, with Firefox 52.0.1 Stack: UnsupportedOperationError: mouseMoveTo Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800' System info: host: 'Oleksandr-Zinevych.local', ip: '192.168.0.102', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.3', java.version: '1.8.0_101' Driver info: driver.version: RemoteWebDriver

Are there any workaround for this?

NickTomlin commented 7 years ago

Can you share an example test that generates this error?

ghost commented 7 years ago

I'm having the same issue, has there been any progress made on this issue?

ghost commented 7 years ago

Pinging @NickTomlin

The code that generated this result, on my machine, is as follows:

.then(function() {
            return browser.actions().mouseMove(element(by.id(passwordID))).click().perform();
})

This throws the following error in the terminal: "UnsupportedOperationError: mouseMoveTo" Seems like chromedriver understands mouseMove getting mapped to mouseMoveTo, but geckodriver doesn't.

larskendall commented 7 years ago

I've been having the exact same problem. It's hindering a lot of my tests in Firefox at the moment.

jatinmakhija commented 7 years ago

I have been facing the same issues with my setup, anyone having any workaround for the same?

I tried firefox 45, 45.0.1 and 46 as well, but all of them are giving the same error.

@juliemr your help would be appreciated.

zinevych commented 7 years ago

Yes, for me just ordinal mouseMove generated this issue to. No workarounds, just switched to Chrome, where everything works OK.

jatinmakhija commented 7 years ago

I tried checking the actions related function in the repository but did not find anything, found a mention related to mouseMove changes but I am not sure what they are..

http://selenium.10932.n7.nabble.com/geckodriver-0-15-0-released-td55613.html

heathkit commented 7 years ago

geckodriver support for mouse actions is still new (see https://github.com/mozilla/geckodriver/issues/159). If you're on the latest geckodriver (0.15) it should work maybe? It looks like 0.16 will have some fixes.

Firefox versions less than 52 will not work with Protractor 5 or higher. Mozilla completely redid their automation for Selenium 3. There's no looking back!

mike123vn commented 7 years ago

Hi, selenium has confirmed that they fixed this issue. I updated to new version of selenium, gecko driver and firefox but i still get - Failed: mouseMoveTo https://github.com/SeleniumHQ/selenium/issues/3693 image

tamilranj commented 7 years ago

Hi,

I tried using the combination of FF version 53, 54 and 55. Geckodriver version 0.15.0, 0.16.1, 0.17.0 and o.18.0, Also selenium server version 3.4.0, 3.3.1, 3.0.1 and 2.53.1.

But still seeing issues on mouseMove. Can someone please help?

Failed: mouseMoveTo Build info: version: '3.4.0', revision: 'unknown', time: 'unknown' os.name: 'Windows 8.1', os.arch: 'x86', os.version: '6.3', java.version: '1.8.0_121' Driver info: driver.version: RemoteWebDriver

joelwatson commented 7 years ago

@tamilranj I'm pretty sure that the mouseMove issue (and other related issues) are still present. The issues have been resolved on the Geckodriver side (from what I understand), but now there is an issue with Selenium Server itself, primarily (if not exclusively) related to the standalone version.

You can learn more by checking out the comments on this issue: https://github.com/SeleniumHQ/selenium/issues/3693

Apparently all will finally be resolved in SS 3.5; but there is no word of when the release will be, other than "soon". :)

tienvx commented 7 years ago

I believe the mouseMove issue is still present in Selenium 3.5.1. I found a work around:

  1. Upgrade selenium to 3.5.1
  2. Upgrade firefox to 55.0.2
  3. In protractor.conf.js set marionette to false
    multiCapabilities: [
    {
      'browserName': 'chrome'
    },
    {
      'browserName': 'firefox',
      'marionette': false
    }
    ]

    I'm surprised because firefox is running test cases faster this way, and no more mouseMove errors.

timbru31 commented 7 years ago

@tienvx I vote against turning Marionette off, since WebDriver (the W3C) version is the future and you should, where possible, not rely on the old JSONWP protocol.

tienvx commented 7 years ago

Thanks for the information @timbru31 . This is just a work around. I'll revert when the real bug is fixed :)

timbru31 commented 7 years ago

Crossref to #4451 - this should hopefully fix this issue by using a more recent version of selenium-webdriver.

bhreinb commented 7 years ago

when will this fix be available? I'm using selenium 3.5.3 & geckodriver v0.19.0 and it still occurs for me.

vsravuri commented 7 years ago

I am also getting this error using Selenium 3.5.3 & Geckodrive v0.19.0 with Firefox 55.

(node:13790) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): UnsupportedOperationError: mouseMoveTo

(node:13790) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

jatinmakhija commented 6 years ago

any luck here?

We are still stuck on old version of selenium due to this mouseMoveTo error.

Smolations commented 6 years ago

This issue resolved for me with the following:

Selenium 3.8.1 geckodriver 0.19.1 Firefox 57

alexandergallen commented 6 years ago

@Smolations I am using protractor 5.2.2 and webdriver-manager (12.0.6) Protractor has dependency on selenium-webdriver 3.6.0, otherwise I have exact same versions as you and I am still getting this issue..

sandeepjain1987 commented 6 years ago

Issue still exists on Selenium 2.6.0, ...., 3.8.1 geckodriver 0.19.1 Firefox 57, 58 FYI: I am executing mouseMoveTo functionality using Selenium grid and not standalone.

Which file (Selenium jar or geckodriver exe) has got the Action class implementation ? Is it working for anybody else ?

MikePopov commented 6 years ago

Maybe issue fixed on Selenium 4.0.0-alpha.1... can I use this version in a protractor?

apodznoev commented 6 years ago

You can try it with resolutions, which you can add to "package.json" like this:

 "resolutions": {
    "selenium-webdriver": "4.0.0-alpha.1"
  }

but you'll need to have a node version 8 or 9, I think. So if you are still with NodeJS version 6, no chance until they adapt this changes in Protractor itself.

IgorSasovets commented 6 years ago

Hi! I had the same issues with mouseMove, mouseDown, and dragAndDrop Actions class functions. My solution is protractor-firefox-support. Please take a look at https://github.com/angular/protractor/issues/4687 for issue description.

sandeepjain1987 commented 6 years ago

Am glad that it's working using protractor. Is there any solution for csharp /java platforms or am i missing something?

alexandergallen commented 6 years ago

@apodznoev afaik this requires yarn.. And there isn't any way to mimic this behaviour using npm. This is currently working for us using selenium-standalone but not using directConnect. Protractor 5.3.0 Firefox 58.0 - headless Geckodriver 0.20.0

Would selenium-webdriver version have an effect on the outcome when using directConnect or does it only use geckodriver when directConnect is set to true?

shanlashari commented 6 years ago

please do something for this issue.

sandeepjain1987 commented 6 years ago

Is there ant fix available for mouseMoveTo for selenium remote grid and not standalone? My testing has been hampered since FF 52 because of this functionality. Any help will be highly appreciated.

idanielsteven commented 6 years ago

This is a critical issue that needs fixed. Any updates on this? Any work-arounds?

shanlashari commented 6 years ago

Yes, due to some reasons I also need to switch to Firefox and this issue is blocking our team. Please proceed with its resolution. We will keep looking at authentic way arounds but we really look forward for its fix.

jmurphy87 commented 6 years ago

Any update with this ticket? Only occurs for me when using selenium-grid with firefox-node, standalone works fine

sbrez commented 5 years ago

Any update with this ticket? Issue still exists on

Selenium 3.141.59
geckodriver 0.23.0
Firefox 63
nosgnoh commented 5 years ago

Any update with this ticket? Issue still exists on "geckodriver": "^1.12.2", "selenium-webdriver": "4.0.0-alpha.1", Firefox 63.0.3

andrewchan-clover commented 5 years ago

Hi! I had the same issues with mouseMove, mouseDown, and dragAndDrop Actions class functions. My solution is protractor-firefox-support. Please take a look at #4687 for issue description.

Thanks for the contribution on a workaround for this years-long-unsolved issue. However I couldn't get protractor-firefox-support working on FF 64.0.2 with selenium-server 3.4.0 and Protractor 5.4.1.

IgorSasovets commented 5 years ago

@andrewchan-clover , could you please provide your config file and test example?

EoinGriffin-AI commented 5 years ago

For anyone who's currently struggling with this issue, I've just learned that the problem can be worked around by using selenium webdriver as an intermediary between protractor and Firefox. Running protractor against Firefox directly won't work, even if you use protractor-firefox-support

IgorSasovets commented 5 years ago

@EoinGriffin-AI , I use protractor-firefox-support since last year with latest versions of both Firefox and Chrome browsers and it works as expected. I don't use any intermediaries. Yes, there are cases that can't be handled by protractor-firefox-support. Last week I had issue with RMB click because element didn't have right click event handler. But I created one more function for contextmenu event and it works perfectly. So, protractor-firefox-support is not a universal solution for this but for me it still better than just skip tests and wait for some updates to the issue.

EoinGriffin-AI commented 5 years ago

@IgorSasovets That's great that it works for you. I tried it yesterday with the latest protractor-firefox-support and the latest Firefox and it didn't help with the mouseMove() problem I was running into. What I'm suggesting is that others don't have to skip tests or wait for an update, the can use a selenium webdriver intermediary and get all the same functionality working.