2

I'm new to Selenium. Currently, I'm trying to automate the testing process of a React Django-based app using Selenium script recording in Selenium IDE. I'm facing repeated issues with mouse click parts.

After I record the process and run it, it breaks on a mouse click script. My testing software has a create, update and delete function.

Most likely, the error comes in clicking the update and delete buttons. So, right now I'm using the Tab button to reach the update and delete buttons which is a little time-consuming in the recording process.

enter image description here

The above given image is where I get the error.

Below is the log of the error:

enter image description here

Is there any way to overcome this issue or any way to change the script on the error part to make it right?

Also, it would be kind if you suggest to me any other best way to automate testing of my React application other than this way.

Lee Jensen
2,3281 gold badge13 silver badges24 bronze badges
asked Jan 19, 2023 at 5:46

1 Answer 1

1

Solution :

  • The methods Actions class has provided for Mouse Hover action:
moveToElement(WebElement target)
moveToElement(WebElement target, int xOffset, int yOffset)
  • Another alternative is :
Actions actions = new Actions(driver);
WebElement target = driver.findElement(By.Id("Target_id"));
actions.moveToElement(target).perform();
  • Suggestion :
    • When we are trying to perform mouse hover, Try if you could have linkText, partialLinkText or tagName to use
answered Jan 22, 2023 at 18:32

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.