ericmckean / chromedriver

Automatically exported from code.google.com/p/chromedriver
0 stars 0 forks source link

Actions.moveByOffset / moveToElement not working - Chrome #917

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Please see code below. Have tried Actions.moveByOffset, Actions.moveToElement, 
also dragAndDrop methods, none of them work.
Issue not specific to the test web page shown in code - I can't get it to work 
on any page.

            WebDriver driver = new ChromeDriver();
            driver.navigate().to(new URL("http://www.impallari.com/testing/"));            
            WebElement el = driver.findElement(By.linkText("Text"));

            //This works...
            Actions builder = new Actions(driver);
            builder.click(el).build().perform();

            // This does nothing...
            builder = new Actions(driver);
            builder.clickAndHold(el).moveByOffset(200, 400).build().perform();

            //This does nothing...
            builder = new Actions(driver);
            builder.dragAndDropBy(el, 200, 400).build().perform();

Selenium version: 2.43.1
ChromeDriver version: 2.10
OS: Windows 8
Browser: Chrome
Browser version: 37.0.2062.124 m

Original issue reported on code.google.com by danJhoc...@gmail.com on 2 Oct 2014 at 11:30

GoogleCodeExporter commented 9 years ago
..the code above should of course have a release() in - it still doesn't work:

// This does nothing...
builder = new Actions(driver);
builder.clickAndHold(el).moveByOffset(200, 400).release().build().perform();

I've tested the mouse click/release on this site and they seem to work 
correctly, so I'm assuming it is a problem with moving to the specified 
location?

Original comment by danJhoc...@gmail.com on 3 Oct 2014 at 9:46

GoogleCodeExporter commented 9 years ago
^^^Tested mouse click/release on http://unixpapa.com/js/testmouse.html

Original comment by danJhoc...@gmail.com on 3 Oct 2014 at 9:47

GoogleCodeExporter commented 9 years ago
Further testing - moveToElement/moveByOffset do work, as does clickAndHold, but 
in combination they don't:

builder.clickAndHold(el).moveByOffset(200, 400).release().build().perform();

Original comment by danJhoc...@gmail.com on 3 Oct 2014 at 10:39

GoogleCodeExporter commented 9 years ago
I think this issue is potentially related to issue 841:

https://code.google.com/p/chromedriver/issues/detail?id=841&q=label%3APriority-M
edium&colspec=ID%20Status%20Pri%20Owner%20Summary

Original comment by jonstewa...@gmail.com on 24 Nov 2014 at 11:42

GoogleCodeExporter commented 9 years ago

Original comment by samu...@chromium.org on 21 Feb 2015 at 12:18

GoogleCodeExporter commented 9 years ago
Issue is reproducible with chrome: 41.0.2272.76 and chromedriver:2.14

WebDriver driver = new ChromeDriver();
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
driver.navigate().to(new URL("http://www.impallari.com/testing/"));            
WebElement el = driver.findElement(By.linkText("Text"));

Actions builder = new Actions(driver);
builder.click(el).build().perform();

builder = new Actions(driver);
builder.clickAndHold(el).moveByOffset(200, 400).release().build().perform();

builder = new Actions(driver);
builder.dragAndDropBy(el, 200, 400).build().perform();

Original comment by ssudunag...@chromium.org on 12 Mar 2015 at 4:52