Error on action comment | Selenium Forum
M
Posted on 13/01/2017
Hi
I am getting below error while mouse movement

***********Code*****************

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;

public class Golf {

public static void main(String[] args) {
System.setProperty("webdriver.gecko.driver", "C:\\Gecko Driver\\geckodriver.exe");
WebDriver driver= new FirefoxDriver();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(20,TimeUnit.SECONDS);
driver.get("http://www.americangolf.co.uk");


WebElement golfclubs=driver.findElement(By.xpath("//*[@id='navigation']/nav/ul/li[1]/a"));
Actions act =new Actions(driver);
act.moveToElement(golfclubs).build().perform();
driver.findElement(By.xpath("//*[@id='CLUBS_1']/div[1]/ul[1]/li/ul/li[2]/ul/li[5]/a")).click();


**********Error*********************
1484373810663 geckodriver INFO Listening on 127.0.0.1:36691
Jan 13, 2017 11:03:31 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end
1484373811357 mozprofile::profile INFO Using profile path C:\Users\Sneha\AppData\Local\Temp\rust_mozprofile.oJT2c3wS46Gk
1484373811359 geckodriver::marionette INFO Starting browser C:\Program Files (x86)\Mozilla Firefox\firefox.exe
1484373811368 geckodriver::marionette INFO Connecting to Marionette on localhost:49829
1484373812672 Marionette INFO Listening on port 49829
Jan 13, 2017 11:03:35 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
Exception in thread "main" org.openqa.selenium.UnsupportedCommandException: POST /session/01461c91-7595-4245-87a6-a3b659a65bb0/moveto did not match a known command
Build info: version: 'unknown', revision: '1969d75', time: '2016-10-18 09:43:45 -0700'
System info: host: 'Sneha-HP', ip: '192.168.0.10', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_111'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{rotatable=false, raisesAccessibilityExceptions=false, marionette=true, firefoxOptions={args=[], prefs={}}, appBuildId=20161208153507, version=, platform=XP, proxy={}, command_id=1, specificationLevel=0, acceptSslCerts=false, processId=4792, browserVersion=50.1.0, platformVersion=6.1, XULappId={ec8030f7-c20a-464f-9b0e-13a3a9e97384}, browserName=firefox, takesScreenshot=true, takesElementScreenshot=true, platformName=windows_nt}]
Session ID: 01461c91-7595-4245-87a6-a3b659a65bb0
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:127)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:93)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:42)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:163)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at org.openqa.selenium.remote.RemoteExecuteMethod.execute(RemoteExecuteMethod.java:35)
at org.openqa.selenium.remote.RemoteMouse.mouseMove(RemoteMouse.java:89)
at org.openqa.selenium.interactions.MoveMouseAction.perform(MoveMouseAction.java:39)
at org.openqa.selenium.interactions.CompositeAction.perform(CompositeAction.java:50)
at Golf.main(Golf.java:21)







}

}

M
Replied on 14/01/2017

take a look at example 2 in this blog. try that on americanglof.co.uk

https://www.seleniumeasy.com/selenium-tutorials/how-to-perform-mouseover-action-in-selenium-webdriver


M
Replied on 14/01/2017

Still issue persist
here is error it look like same error

1484430065130 geckodriver INFO Listening on 127.0.0.1:47375
Jan 14, 2017 2:41:05 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end
1484430065892 mozprofile::profile INFO Using profile path C:\Users\Sneha\AppData\Local\Temp\rust_mozprofile.CXcXJPeHD7OI
1484430065894 geckodriver::marionette INFO Starting browser C:\Program Files (x86)\Mozilla Firefox\firefox.exe
1484430065904 geckodriver::marionette INFO Connecting to Marionette on localhost:55412
1484430067132 Marionette INFO Listening on port 55412
Jan 14, 2017 2:41:09 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
Exception in thread "main" org.openqa.selenium.UnsupportedCommandException: POST /session/916f6442-ae5e-40ad-9b80-35080d93bf15/moveto did not match a known command
Build info: version: 'unknown', revision: '1969d75', time: '2016-10-18 09:43:45 -0700'
System info: host: 'Sneha-HP', ip: '192.168.0.10', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_111'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{rotatable=false, raisesAccessibilityExceptions=false, marionette=true, firefoxOptions={args=[], prefs={}}, appBuildId=20161208153507, version=, platform=XP, proxy={}, command_id=1, specificationLevel=0, acceptSslCerts=false, processId=15716, browserVersion=50.1.0, platformVersion=6.1, XULappId={ec8030f7-c20a-464f-9b0e-13a3a9e97384}, browserName=firefox, takesScreenshot=true, takesElementScreenshot=true, platformName=windows_nt}]
Session ID: 916f6442-ae5e-40ad-9b80-35080d93bf15
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:127)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:93)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:42)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:163)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at org.openqa.selenium.remote.RemoteExecuteMethod.execute(RemoteExecuteMethod.java:35)
at org.openqa.selenium.remote.RemoteMouse.mouseMove(RemoteMouse.java:89)
at org.openqa.selenium.interactions.MoveMouseAction.perform(MoveMouseAction.java:39)
at org.openqa.selenium.interactions.CompositeAction.perform(CompositeAction.java:50)
at Golf.main(Golf.java:21)