EDIT:
okay, i have checked the code and its rendering out by a jquery widget.
END
I am trying to move the cursor to <a \>
, but the problem is that the element is not rendered until i move mouse pointer physically on selected image.
How can i move to the mouse to hover over <a \>
to select/click?
FF version 20
Selenium WebDriver version: 2.31.2.0
Current code
Actions actions = new Actions(driver);
int locationX = Convert.ToInt32(ratingElementDiv[i].Location.X);
int locationY = ratingElementDiv[i].Location.Y;
actions.MoveToElement(WaitForElement(By.CssSelector(starElement)), locationX, locationY).Click().Perform();
i dont see any action happening... any help?
Action is composed by 3 steps.
Actions builder = new Actions(driver);
Point location ratingElementDiv[i].getLocation();
builder.MoveToElement(WaitForElement(By.CssSelector(starElement)), location.X, location.Y).click();
(i'm not sure about the click)
Action selectLink = builder.build();
selectLink.perform();
try this and tell me if you still have some problem.
This link will help you. It explain both keyboard and mouse event.
http://www.guru99.com/keyboard-mouse-events-files-webdriver.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With