moveToObject not working after buttonDown() #1806

poorpaddy opened this Issue Jan 9, 2017 · 4 comments


None yet

2 participants


The problem

I'm trying to drag the handle on a slider and specifically noUIslider (

I am using the following method to replicate a drag.

browser.moveToObject("selector", 0, 0);
browser.moveToObject("selector", 300, 0);

I would believe it would slide, even returned the element coordinates in the console and they do not change. I've attempted this in both Chrome and Firefox.


  • WebdriverIO version: 3.0.1
  • Node.js version: 6.9.1
  • Standalone mode or wdio testrunner: WDIO Testrunner
  • if wdio testrunner, running synchronous or asynchronous tests: asynchronous
  • Additional wdio packages used (if applicable): karma-mocha, karma-chai

Code To Reproduce Issue [ Good To Have ]

it("the user interacts with the slider, the values change",function(){
        if (browser.waitForExist('.noUi-handle')){
            console.log('it exists');
        var oldValue = browser.getText("#seCalcSectionValueExpenses");

        if (browser.moveToObject('.noUi-handle')){
            console.log('handle found');
            var originalLocation = browser.getLocation('.noUi-handle');
        if (browser.buttonDown()){
            console.log('pressing down on slider handle');
        if (browser.moveToObject(".noUi-handle", 200, 0)){
            console.log('moving handle over 200px');
            var newLocation = browser.getLocation('.noUi-handle');
        if (browser.buttonUp()){
            console.log('releasing slider handle');
        var newValue = browser.getText("#seCalcSectionValueExpenses");
        assert.notEqual(oldValue, newValue);

Can't speak for Chrome, but these commands won't work in geckodriver per mozilla/geckodriver#159


@patthiel That's correct. They won't work in either Firefox or Chrome. Well technically they pass in both browsers but the 2nd moveToObject doesn't actually offset by the x/y coordinates. It just says they passed however I've done both a pause so I can see it and as you ca see above I log the coordinates and it doesn't move.


@poorpaddy This isn't expected to work in Firefox per the ticket I linked as well as #1653. This issue is only applicable to Chrome.

Can you provide a reproduceable spec or project? I have a sandbox project here that you could fork and use:


I do but unfortunately my work utilizes a self hosted enterprise version of GH additionally I can't publicly post the project because the feature I'm developing is unreleased as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment