The use of Selenium Actions moveToElement is not functioning properly on Google Chrome 75.0.3770.80 running on an Ubuntu system

After selecting an element, I attempted to physically move the mouse cursor over it.

I tried using the Actions class provided with Selenium and the method I used is moveToElement().

Actions actions = new Actions(driver);
actions.moveToElement(element).build().perform();

The version of the driver being used is ChromeDriver 75.0.3770.90.

My expectation was that the physical cursor would move to the location of the element.

Answer №1

Encountered a similar problem following the update to Chrome 75.

Using Actions actions = new Actions(driver);
actions.moveToElement(element).build().perform();
element.click();

This solution effectively resolved the issue in my case.

Answer №2

It appears that the method you are using is correct, but it may be necessary to wait for the next statement to execute properly.

Actions actions = new Actions(driver);
actions.moveToElement(element).build().perform();
try{
     Thread.sleep(6000);
}
catch(Exception ex){

}

Alternatively,

If your element is not yet ready, you will need to add a wait time as shown below:

Actions actions = new Actions(driver);
WebElement myDynamicElement = (new WebDriverWait(driver, 10))
  .until(ExpectedConditions.presenceOfElementLocated(By.id("myDynamicElement")))

actions.moveToElement(element).build().perform();

Answer №3

Encountered a similar issue on Windows with Chrome version 75.0.3770.90 and Chrome driver 75.0.3770.8. Here's a solution to try:

actions.moveToElement(element).release().build().perform();

Implementing this resolved the issue for me.

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

Identify the appearance of a web component being added to the Document Object

After reading this discussion regarding a web-component I created: <my-vue-web-comp [userId]="1" id="my-component"></my-vue-web-comp> The component functions properly in Angular. How can I determine when the web component h ...

Selenium - Issue retrieving the window identifier for the child window

Issue with Selenium: Unable to retrieve the window handle for a child window. Here is the code snippet I am currently using: wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("ADD_NEWLIST_HEAD15105-15079"))); driver.findElement(By.id( ...

Utilizing C# Windows Forms to Engage With a Web Browser

Currently, I have created a Windows Form application using C# that is able to communicate with a phone system. My next goal is to incorporate click-to-dial capabilities into the application. The idea is that when a telephone number is clicked on in a web ...

Achieving a multiline ellipsis (clamp) across various levels of HTML tags, compatible with popular browsers like IE and Firefox

After conducting extensive research, I finally discovered a reliable method for implementing multiple Line Ellipsis (using JS, as plain CSS is not effective). Despite exploring 100 different Google results and Q/As, this is currently the only solution that ...

The .env file is functioning properly for the current keys, but any new ones I include remain undefined

Recently, I took over a Vue application that utilizes axios. Within the dataService.js file, it retrieves URLs from a project's .env file using process.env.FOO_BAR for GET requests. The pre-existing key-value pairs such as VUE_APP_DATA_URL function p ...

The type '{}' cannot be assigned to type '() =>'

Do you have a TypeScript question? I am curious about how to 'specify' a single object in useState using the incoming properties of id, heading, and text with an interface or similar method. Take a look at the code snippet below: import React, ...

"Discovering the Selenium version using the webdriver: A step-by-step

Looking to determine the specific version of Selenium that the webdriver is communicating with. I recall using getEval and Selenium.version in the past, but unable to locate how to do it now. Any suggestions on how to accomplish this? ...

Incorporating additional ES6 modules during the development process

As I build a React component, I find that it relies on an ES6 component that I'm currently developing. Since I created the latter first, what is the typical method to include it during development as I work on the second component? If the dependency w ...

Sending data from Javascript to PHP in the same file:

Looking for help with a PHP file named senttest.php. I am attempting to send a variable from PHP to JavaScript, run it through a sentiment analysis tool, and then post it back to PHP within the same file. Everything is working except for the post back to ...

how to implement a delay in closing a window using JavaScript

I am currently developing a Google Chrome extension and I want to express my gratitude to everyone here for tolerating my sometimes silly questions. The functionality of the extension is quite basic but it works smoothly. However, I am facing an issue wher ...

What is the best way to pass a div element and a variable from a Child component back to a Parent component in Next.js/React?

My goal is to create a webapp that, when an item in the list generated by the child component is clicked, displays the corresponding image in a div within the parent component. After some trial and error, I managed to generate the list in the child compone ...

Is there a way to move or rearrange columns in an HTML table using drag-and

I have a unique situation with my html table where I need to implement drag and drop functionality for columns instead of rows. My project is built using vue.js. While it's straightforward to drag/drop rows by setting draggable="true" on th ...

Python Selenium - Retrieving Attributes

Currently, I am attempting to create an automated web test using Selenium Python. My goal is to extract the xpath of a WebElement and/or the desired method for it (such as send_keys()) from an Excel file. Although my code is functioning properly for most ...

Using Java WebDriver to dynamically change HTML elements

<span data-id="tag-dist-Porto" title="To remove one of the options, double click."></span> This particular element is what I'm attempting to modify with webdriver. Below is the code snippet I am using: WebDriver driver = new HtmlUnitDr ...

Error: Socket.io.js is missing in the (node.js + express + socket.io) setup

I have been browsing through other similar answers like: node.js /socket.io/socket.io.js not found Socket.io not being served by Node.js server socket.io.js not found on client Configuring 'simplest' node.js + socket.IO + Express server Unfortun ...

Display a pop-up alert following the completion of form validation using JavaScript

I am currently learning JavaScript and working on an enrollment form that requires validating a cellphone number with 11 characters. The issue I'm facing is that every time I hit submit, the page refreshes instead of displaying the validation message. ...

Using jQuery or JavaScript to load an iframe via Ajax can cause a significant decrease in the loading

Currently, I am using $.ajax() to load an iframe: $("#iframe_wrapper").each(function(){ $.ajax({ type: "post", url: "http://site.com", data: { action: 'get_the_iframe' }, context: this, success: function(html){ $(this ...

Losing value in Angular service when the view is changed

I am currently working on a project to create a basic Angular application that retrieves data from Instagram. The concept involves the user inputting a hashtag on the main page, which then redirects them to another page where posts related to that hashtag ...

I just made an object in my index.js file, now how can I ensure it is accessible in a router file?

In my project's index.js file, I perform the following tasks: initialize the Express app instance include a router.js file defining a POST endpoint create a Socket.IO object Here is the code snippet: const http = require("http"); const exp ...

Scrolling through UL elements using Jquery

I am struggling to implement jQuery for scrolling a UL list, with two span elements for moving up and down. It works fine for a single li child, but how can it work for a dynamically filled ul? Any help would be greatly appreciated, as I am completely lo ...