OS: Windows 7
Selenium Version: 3.3.1
Browser: Firefox
Browser Version:
E.g. move to one element -> click -> move to second element -> click
org.openqa.selenium.InvalidArgumentException: Expected 'id' default mouse to be mapped to InputState whose subtype is undefined, got: pointerMove
Build info: version: '3.3.1', revision: '5234b325d5', time: '2017-03-10 09:10:29 +0000'
System info: host: 'DL-R90G0MZM', ip: '172.19.200.157', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_112'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=C:\Users\LEONTI~1\AppData\Local\Temp\rust_mozprofile.cVOK88ksjN54, rotatable=false, timeouts={implicit=0, page load=300000, script=30000}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=52.0, platformVersion=6.1, moz:processID=17900, browserName=firefox, platformName=windows_nt}]
Session ID: ec191088-0eed-4e83-a734-54f253949de6
Sample WebPage:
<!DOCTYPE html>
<html>
<body>
<a href="http://www.w3schools.com/html/">Visit our HTML tutorial</a>
<p>
<a href="https://www.google.com/?hl=en&gws_rd=ssl">Google Search</a>
</body>
</html>
code:
//element1 - 1st link
new Actions(driver).moveToElement(element1).perform();
// do some action
//element2 - 2nd link
new Actions(driver).moveToElement(element2).perform();
Additional info:
I use Java 1.8 and 'selenium-java' as maven dependency
hi, i experienced this also in my end.
im using firefox v52, gecko driver 0.15 and selenium driver 3.3.1
03/14/2017 07:46 PM | Failed | InvalidArgumentException : Expected 'id' default mouse to be mapped to InputState whose subtype is undefined, got: pointerMove
Build info: version: '3.3.1', revision: '5234b325d5', time: '2017-03-10 09:10:29 +0000'
I am also seeing the same issue with Action Builders with 3.3.x I did not experience this issue with 3.1.x
I am using Firefox ESR 45.6, the legacy implementation, and selenium driver 3.3.0
Exceptions are being thrown that element is no longer in my cache on non-click / non-sendkeys actions randomly. The drag and drop functionality is also not working as intended.
我也遇到了这个问题,不知道怎么解决
I have solved this (maybe it's just a temp. workaround?) by resetting the action chain in my loop:
actions.perform()
actions.reset_actions()
Getting this too. rglas solution works but not reliably.
@rglas, I don't have method reset_actions() in Actions class.
@SankySyS which Language are you using? The work around I have found for C# was to re-declare the action builder.
// Action builder set when constructing the driver
Actions action = new Actions(Driver);
// Action builder re-declared when it is needed
action = new Actions(Driver);
This has fixed the issues I have encountered with the action builder failing.
I see the same issue in selenium 3.3.1 and gecko 15 and using java but for me the first perform fails with the error. This worked on much older selenium/firefox and works fine with this newest level of selenium/gecko on chrome.
I'm getting the same issue using firefox 52.0.1 (32-Bit), gecko driver 0.15 and selenium driver 3.3.1 (java).
For me it fails when the test executes this code (first execution):
/**
* Click at the given web element position. Please use that method instead
* of the {@link Actions#click()} method.
* */
public void mouseClick(WebDriver driver, WebElement element) {
if (element != null) {
new Actions(driver).moveToElement(element).perform();
}
new Actions(driver).click().release().perform();
}
It's likely this is due to a geckodriver issue, being tracked here: https://bugzilla.mozilla.org/show_bug.cgi?id=1345653
I also recently ran into this using the latest C# webdriver. When I look into the dotnet changes in the Actions class I think it is caused by this change:
https://github.com/SeleniumHQ/selenium/commit/467143295197dcf67cae44b64a32daf119342416#diff-4528b98264080722cda11b4776d6b377
Previously the Build/Perform method would initiate a new empty CompositeAction object
/// <summary>
/// Builds the sequence of actions.
/// </summary>
/// <returns>A composite <see cref="IAction"/> which can be used to perform the actions.</returns>
public IAction Build()
{
CompositeAction toReturn = this.action;
this.action = new CompositeAction();
return toReturn;
}
/// <summary>
/// Performs the currently built action.
/// </summary>
public void Perform()
{
this.Build().Perform();
}
But that part of the code is removed.
/// <summary>
/// Builds the sequence of actions.
/// </summary>
/// <returns>A composite <see cref="IAction"/> which can be used to perform the actions.</returns>
public IAction Build()
{
return this;
}
/// <summary>
/// Performs the currently built action.
/// </summary>
public void Perform()
{
IActionExecutor actionExecutor = this.driver as IActionExecutor;
if (actionExecutor.IsActionExecutor)
{
actionExecutor.PerformActions(this.actionBuilder.ToActionSequenceList());
}
else
{
this.action.Perform();
}
}
@jvleeuwe There are two different bugs here. This issue does not refer to the one you're discussing.
It seems like Firefox 53.0b9 doesn't have this issue.
EDIT: Just realized after posting, this bug on https://bugzilla.mozilla.org/show_bug.cgi?id=1345653 has been marked as resolve for Firefox 53 and forward.
Closing this issue as it's been resolved in geckodriver and Firefox. Anyone encountering any future issues similar to this one should open a new issue with a full reproduction case.
I'm facing the same issue again. I don't get any error message, but no action takes place. I'm using the Action to hover on the navigation menu dropdown. It works for the first time, but it does nothing from the second time onwards. Its working fine for Chrome. The issue is only with firefox. I'm using latest version firefox 66.0.2, latest gecko driver 24 and latest selenium version - 3.141.59.
Any help will be appreciated.