I am trying to perform a mousehover and then click on a submenu that wasn't present
This is my code:
private By RMenu = By.LinkText("Reports");
public HomePage SetMenu(string menu)
{
Actions Rmouseover = new Actions(_driver);
Rmouseover.MoveToElement(RMenu).Perform();
return this;
}
And I am getting this error at (RMenu) Rmouseover.MoveToElement(RMenu).Perform():
cannot convert from 'openqa.selenium.by' to 'openqa.selenium.iwebelement'
I have tried Rmouseover.MoveToElement(RMenu).Build().Perform() and I still get the same error. What am I doing wrong or what am I not doing?