I've seen this thread here and when I try to use sendKeys(Keys.ARROW_DOWN)
instead of moving down the context menu the page scrolls down very quickly. How can I avoid this? I'm not sure how to wait for a context menu to appear, though I can wait for an element to be present.
Here's the function:
public static void rightClickCopyImageLink(WebElement image){
Actions copying = new Actions(driver);
copying.contextClick(image).sendKeys(Keys.ARROW_DOWN).sendKeys(Keys.ARROW_DOWN).
sendKeys(Keys.ARROW_DOWN).sendKeys(Keys.ARROW_DOWN).sendKeys(Keys.ARROW_DOWN).
sendKeys(Keys.RETURN).build().perform();
}