[Solved]-Not able to click/Mouse over an element using selenium webdriver-Java

if you want to click on the fifth star should it be srating5.click()

or if there is an issue with your code try using:

locatable hoveritem = (locatable) driver.findelement(srating1);

mouse mouse = ((hasinputdevices) driver).getmouse();

mouse.mousemove(hoveritem.getcoordinates());

to do the hover for the first star then repeat.

the for the last item you should be able to do what you are doing or try

locatable clickitem = (locatable)driver.findelement(srating3).getlocation();
clickitem.getcordinates(clickitem).click(); 

Read more here: Source link