Encountering the org.openqa.selenium.UnsupportedCommandException while attempting to use the mouseMoveTo

Currently, I am working with Selenium 3.5.3 and a standalone selenium box setup. I have been attempting to hover over an element using the code below:

RemoteWebDriver driver = null;
DesiredCapabilities dc = new DesiredCapabilities();
dc.setCapability("browserName", "firefox");
dc.setCapability("version", "55");
dc.setCapability("auth",GlobalProperties.seleniumboxAuthKey());
try {
     driver = new RemoteWebDriver(new 
URL("http://myseleniumboxurl.com/wd/hub"), dc);
}
catch (MalformedURLException e) {
    System.out.println(e);
}
driver.get("https://github.com/SeleniumHQ");
Actions action = new Actions(driver);
WebElement elem = driver.findElement(By.xpath("//a[contains(@href, '/pricing')]"));
action.moveToElement(elem).perform();

Unfortunately, I am encountering the following exception: Caused by: org.openqa.selenium.UnsupportedCommandException: mouseMoveTo

at org.openqa.selenium.remote.http.AbstractHttpCommandCodec.encode(AbstractHttpCommandCodec.java:220)
at org.openqa.selenium.remote.http.AbstractHttpCommandCodec.encode(AbstractHttpCommandCodec.java:118)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:637)
at org.openqa.selenium.remote.RemoteExecuteMethod.execute(RemoteExecuteMethod.java:35)
at org.openqa.selenium.remote.RemoteMouse.mouseMove(RemoteMouse.java:89)
at org.openqa.selenium.support.events.internal.EventFiringMouse.mouseMove(EventFiringMouse.java:58)
at org.openqa.selenium.remote.server.handler.interactions.MouseMoveToLocation.call(MouseMoveToLocation.java:59)
at org.openqa.selenium.remote.server.handler.interactions.MouseMoveToLocation.call(MouseMoveToLocation.java:32)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

If anyone has a workaround or solution to this issue, please share it!

Answer №1

Working with mouse movement in Selenium 3.5.0 may encounter issues. To overcome this, consider utilizing JavaScript libraries and execute a JavaScript command for element manipulation.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Struggling to install Firebug and FirePath even after searching for recommendations

It seems that the default Selenium web browser is Firefox, but my professor specifically requested for me to use Firefox version 43.0.1. I have tested it and unfortunately, it does not work! The problem lies in the fact that even though I installed the l ...

Receiving a blank response instead of the expected text

I have been attempting to scrape only the titles of all the links on a website using the code below. However, I am only receiving empty strings as output. String url = "https://www.linkedin.com/learning/learning-azure-sql-querying-18952522?trk=learnin ...

Struggling to resolve the issue of launching Chrome using Selenium WebDriver

Setting the system property for WebDriver to use the Chrome driver located at "C:\\Program Files (x86)\\Seleniumdriver\\chromedriver.exe"; Creating a new instance of ChromeDriver and assigning it to a WebDriver object. An er ...

Unable to access SVG element in a loop and retrieve all the contents

My goal is to extract job titles from a job-site by scraping the information. I want to navigate to the subsequent pages, extract the data, and continue until no more pages are available. However, when attempting to click on the next page marked as an svg ...

Error encountered: WebDriver session not found while using ChromeDriver with Selenium and Jasmine

Currently, I am working on creating an automated test for my website using a combination of Jasmine and selenium. However, when I run the tests on chrome with chromedriver, I encounter the error below randomly. This issue occurs frequently enough that it ...

Executing Scripts within the Browser: A Guide to Using Selenium

One of my current objectives involves running a script on my Selenium browser that establishes a variable and then using DevTools to access this variable in the console log. Below is the conflicting script that I am encountering issues with: from selenium ...

Navigating and managing newly opened browser windows using JAVA Selenium

Currently, I am in the process of automating a browser-based application using Selenium and Java. However, one challenge I have encountered is that when I enter the URL into the browser, it triggers a new window for authentication. Despite attempting var ...

Ignore the dialogue prompting for your location

I'm currently using Selenium in combination with Chromedriver for automating the testing of a website. One of the features I'm dealing with involves Location Services, which I've already enabled for the Chrome browser that's being used. ...

A guide on utilizing Selenium in Python to extract data from a table

I am trying to extract data from a table located at the following link: https://fr.tradingeconomics.com/country-list/rating Here is the code I have attempted, but unfortunately, I am not receiving any response: from selenium import webdriver from selenium ...

Selenium: Automatically setting the referer Header in Selenium

When using Selenium RC with Chrome, I have encountered an issue where each time Selenium opens a new chrome instance, it automatically sets the HTTP referer Header to a specific value. My web application validates the referer to ensure it contains valid l ...

Ways to troubleshoot Python-Selenium crashing issue when attempting to capture a screenshot

Encountering an error while using selenium 4.0.0 for python selenium.common.exceptions.WebDriverException: Message: unknown error: session deleted due to page crash from unknown error: cannot determine loading status from tab crashed (Session info: headl ...

What are some ways I could utilize Selenium or Appium for automating the Chrome browser on an Android device?

My goal is to automate the Chrome browser on an Android device, specifically the Chrome browser and not just a webview or another browser. I initially followed this link thinking it would help me achieve that: https://sites.google.com/a/chromium.org/chrome ...

The challenge of maintaining focus in Internet Explorer while running Selenium webdriver scripts

Initially, I need to hover over the element to trigger a dropdown and then click on a specific link. This functionality works smoothly in Firefox and Chrome but encounters an issue in Internet Explorer. Below is the snippet of code being used: WebElement ...

Guide on utilizing JavaScript to modify the attribute of a chosen web element with Selenium WebDriver in Java

I am seeking a way to utilize Javascript in order to set attributes for the selected element on a webpage. After some research, I have discovered two methods for achieving this with Javascript: Method 1 WebDriver driver; // Assigned elsewhere Jav ...

Retrieving script data from a webpage

I found a link that I want to extract content from, here is the link: https://www.whatever.com/getDescModuleAjax.htm?productId=32663684002&t=1478698394335 However, when I try to open it using Selenium, it doesn't work. It opens as plain text wit ...

Guide to confirm the page title in Selenium with the utilization of a keyword framework

Can you provide the parameter details needed to verify a page title in Selenium using a keyword framework? ...

I seem to be experiencing difficulty entering data into the input box using Selenium, as I have noticed that there is both a name and an ID specified

I am facing an issue with inputting data into the username and password fields using the findelementId or findelementName in selenium web driver. Despite seeing that there is a name and id inside the script. The website URL is: <input autofocus=" ...

The Robot framework feature of waiting until the webpage does not contain certain elements will wait for a maximum

Even though I am using the Robot Framework function Wait Until Page Does Not Contain, the timeout setting does not seem to work correctly. It always waits for 15 seconds, regardless of what value I input. The same issue occurs with the function Page Should ...

How can an input element be retrieved in Selenium Webdriver following a specific text?

In my situation, I am dealing with some outdated web pages where not all input fields have an id attribute properly set. For example: <div class="form-group"> <label>Amount</label> <input id="unreasonablename" type="text" valu ...

studies on junit selenium webdriver

Currently, I am using Selenium WebDriver with JUnit in Eclipse. Can you please advise me on how to effectively report test results? I have attempted to follow this method: http://testerinyou.blogspot.com/2011/03/how-to-create-reports-using-junit.html?sho ...