Issue 5891 in selenium: Action builder not moving mouse

346 views
Skip to first unread message

sele...@googlecode.com

unread,
Jul 5, 2013, 11:50:26 AM7/5/13
to selenium-develope...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Status-Untriaged

New issue 5891 by lqqk...@gmail.com: Action builder not moving mouse
http://code.google.com/p/selenium/issues/detail?id=5891

Action builder not moving mouse. Worked in 2.29.1
MoveToElement and Movebyoffset

Windows 7
Firefox 22 (Same code works fine with IE & Chrome drivers)
Webdriver 2.33.0

What steps will reproduce the problem?
1. Create new action builder
2. Move to an object
3. Move using offset

What is the expected output? What do you see instead?
Moves to the object and then moves with offset.
Does not move at all.

Selenium version:
OS: Win 7
Browser: Firefox
Browser version: 22


Please provide any additional information below. A sample reduced test
case, or a public URL that demonstrates the problem will intrigue our merry
band of Open Source developers far more than nothing at all: they'll be far
more likely to look at your problem if you make it easy for them!

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

sele...@googlecode.com

unread,
Jul 10, 2013, 7:14:47 PM7/10/13
to selenium-develope...@googlegroups.com
Updates:
Status: NeedsClarification
Labels: Browser-Firefox Component-WebDriver

Comment #1 on issue 5891 by a.u.savchuk: Action builder not moving mouse
http://code.google.com/p/selenium/issues/detail?id=5891

Hi!

Are native or synthetic events used ?

Could you provide minimal test scenario which reproduces this problem?

At this point it looks as duplicate of #3578.

sele...@googlecode.com

unread,
Jul 11, 2013, 3:55:37 PM7/11/13
to selenium-develope...@googlegroups.com

Comment #2 on issue 5891 by lqqk...@gmail.com: Action builder not moving
mouse
http://code.google.com/p/selenium/issues/detail?id=5891

Doing Geospatial(Map) stuff, here is some code I put together (vb.net):


Dim TheDriver As New Chrome.ChromeDriver
Dim Objweb As IWebElement

TheDriver.Manage.Window.Maximize()

Objweb = TheDriver.FindElement(By.TagName("body"))
Objweb.SendKeys("^0")

TheDriver.Navigate().GoToUrl("http://www.mapquest.com")
Wait(2)

Dim TheBuilder = New Actions(TheDriver)
Objweb = TheDriver.FindElement(By.Id("map"))

TheBuilder.MoveToElement(Objweb).Build.Perform()

For Y = 1 To 10
For X = 0 To 50
TheBuilder.MoveByOffset(1, 0).Build.Perform()
TheBuilder.MoveByOffset(0, 1).Build.Perform()
Next

TheBuilder.ClickAndHold(Objweb).Build.Perform()

For X = 0 To 50
TheBuilder.MoveByOffset(-1, 0).Build.Perform()
TheBuilder.MoveByOffset(0, -1).Build.Perform()
Next

TheBuilder.Release.Build.Perform()
Wait(1)

Application.DoEvents()
Next

End


If you need it in Java, let me know...

-JCT

sele...@googlecode.com

unread,
Jul 11, 2013, 3:59:58 PM7/11/13
to selenium-develope...@googlegroups.com

Comment #3 on issue 5891 by lqqk...@gmail.com: Action builder not moving
mouse
http://code.google.com/p/selenium/issues/detail?id=5891

If you change the driver to Firefox, it don't work

sele...@googlecode.com

unread,
Jul 20, 2013, 9:35:14 AM7/20/13
to selenium-develope...@googlegroups.com

Comment #4 on issue 5891 by hww...@gmail.com: Action builder not moving
mouse
http://code.google.com/p/selenium/issues/detail?id=5891

I have the same problem.

OS: Win7
Selenium: 2.33.0
Firefox: 22.0
Python: 2.7.4


I want to move the mouse to the element "input", but can't do it.

#!/usr/bin/env python
# -*- coding: utf-8 -*-

from selenium.webdriver.common.by import By

import selenium.webdriver as webdriver
import time


firefox = webdriver.Firefox()

firefox.get("http://www.baidu.com")


input = firefox.find_element_by_id("kw")

action = webdriver.ActionChains(firefox)
action.send_keys_to_element(input, "testvalue")
action.perform()

#This step (move mouse over "input" element) NOT work! :(
action = webdriver.ActionChains(firefox)
action.move_to_element(input)
action.perform()


time.sleep(3)
firefox.quit()

sele...@googlecode.com

unread,
Jul 20, 2013, 10:00:37 AM7/20/13
to selenium-develope...@googlegroups.com

Comment #5 on issue 5891 by hww...@gmail.com: Action builder not moving

sele...@googlecode.com

unread,
Aug 5, 2013, 1:04:59 PM8/5/13
to selenium-develope...@googlegroups.com

Comment #6 on issue 5891 by lqqk...@gmail.com: Action builder not moving
mouse
http://code.google.com/p/selenium/issues/detail?id=5891

Doing Geospatial(Map) stuff, here is some code I put together (vb.net):


Dim TheDriver As New Chrome.ChromeDriver
<https://code.google.com/p/selenium/wiki/ChromeDriver?can=4&colspec=ID%20Stars%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&sort=-id>
Dim Objweb As IWebElement

TheDriver.Manage.Window.Maximize()

Objweb = TheDriver.FindElement(By.TagName("body"))
Objweb.SendKeys("^0")

TheDriver.Navigate().GoToUrl("http://www.mapquest.com"
Wait(2)

Dim TheBuilder = New Actions(TheDriver)
Objweb = TheDriver.FindElement(By.Id("map"))

TheBuilder.MoveToElement(Objweb).Build.Perform()

For Y = 1 To 10
For X = 0 To 50
TheBuilder.MoveByOffset(1, 0).Build.Perform()
TheBuilder.MoveByOffset(0, 1).Build.Perform()
Next

TheBuilder.ClickAndHold(Objweb).Build.Perform()

For X = 0 To 50
TheBuilder.MoveByOffset(-1, 0).Build.Perform()
TheBuilder.MoveByOffset(0, -1).Build.Perform()
Next

TheBuilder.Release.Build.Perform()
Wait(1)

Application.DoEvents()
Next

End


If you change the driver to firefox, it don't work.

If you need it in Java, let me know...

-JCT

sele...@googlecode.com

unread,
Sep 10, 2013, 6:52:02 AM9/10/13
to selenium-develope...@googlegroups.com

Comment #7 on issue 5891 by a.u.savchuk: Action builder not moving mouse
http://code.google.com/p/selenium/issues/detail?id=5891

Hi!

Could you provide example in Java, please? And please recheck it with
latest Selenium.

I create test in python - it doesn't work at my Win7, FF23, Selenium 2.35
when native events is on and small mouse movement offsets are used +1,+1
and -1,-1.

With +50,+50 and -50,-50 both native events and synthetic events works good.

Another issue may be that mouse state is not saved b/w calls of different
actions.

P.S.: be note that usually ClickAndHold(Objweb) performs inside mouse move
to center of passed in element so
previous mouse moves are thrown.

Attachments:
t10.py 1.1 KB

sele...@googlecode.com

unread,
Apr 3, 2014, 3:18:18 AM4/3/14
to selenium-develope...@googlegroups.com

Comment #8 on issue 5891 by Janis.Da...@gmail.com: Action builder not
moving mouse
http://code.google.com/p/selenium/issues/detail?id=5891

OS: Win 8.1 X64
Selenium driver 2.41.0 or 2.39.0
Firefox wedbriver won't move mouse to specific element and perform click
there, same code works for Chrome, is this known issue?

My code:
return driver.actions()
.mouseMove(driver.findElement(mapping.xpath.spaceSpace),
position)
.click(mapping.key.mouseRightButton)
.perform()

Click is always performed on top left corner on FF, not on actual position
defined in test.

sele...@googlecode.com

unread,
May 14, 2014, 7:57:52 AM5/14/14
to selenium-develope...@googlegroups.com
Updates:
Status: Duplicate
Labels: -Status-Untriaged
Mergedinto: 7287

Comment #11 on issue 5891 by barancev: Action builder not moving mouse
http://code.google.com/p/selenium/issues/detail?id=5891

Closed by revision 7638bbbbedee
Should be available in version 2.42

sele...@googlecode.com

unread,
Jul 7, 2014, 10:09:58 AM7/7/14
to selenium-develope...@googlegroups.com

Comment #12 on issue 5891 by daniel.k...@ecabo.de: Action builder not
moving mouse
http://code.google.com/p/selenium/issues/detail?id=5891

It still happens on Selenium current version 2.42.2
It's very frustrating, I wish this could be fixed.

sele...@googlecode.com

unread,
Aug 5, 2014, 2:09:50 PM8/5/14
to selenium-develope...@googlegroups.com

Comment #13 on issue 5891 by morgan.g...@gmail.com: Action builder not
moving mouse
http://code.google.com/p/selenium/issues/detail?id=5891

I'm seeing this issue as well with FF28 and Selenium 2.42.2. I'm getting
the usual error when the FF and Selenium versions are mismatched
of: "Cannot perform native interaction: Could not load native events
component."
Reply all
Reply to author
Forward
0 new messages