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.

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

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.