To select the item from the contextual menu, you have to just move your mouse positions with the use of Key down event like this:-
Actions action= new Actions(driver);
action.contextClick(productLink).sendKeys(Keys.ARROW_DOWN).sendKeys(Keys.ARROW_DOWN).sendKeys(Keys.RETURN).build().perform();
hope this will works for you.
Have a great day 🙂
More Related Contents:
- Selenium webdriver: Modifying navigator.webdriver flag to prevent selenium detection
- How to resolve ElementNotInteractableException: Element is not visible in Selenium webdriver?
- How many ways to click on webElement In WebDriver?
- Selenium WebDriver throws Exception in thread “main” org.openqa.selenium.ElementNotInteractableException
- How to switch to the new browser window, which opens after click on the button?
- WebDriver – wait for element using Java
- Do we have any generic function to check if page has completely loaded in Selenium
- Exception in thread “main” java.lang.NoClassDefFoundError: org/openqa/selenium/WebDriver
- How to handle windows file upload using Selenium WebDriver?
- Load Chrome Profile using Selenium WebDriver using java
- Unable to import org.openqa.selenium.WebDriver using Selenium and Java 11
- Cannot resolve constructor FirefoxDriver(org.openqa.selenium.firefox.FirefoxProfile)
- Selenium IE WebDriver only works while debugging
- How to automate drag & drop functionality using Selenium WebDriver Java
- How to auto-download through Firefox browser using FirefoxProfile?
- ChromeDriver and WebDriver for Selenium through TestNG results in 4 errors
- How to perform Mouse Wheel scrolling over HTML5 Canvas in Selenium?
- What is the best way to avoid NoSuchElementException in Selenium?
- How to automate Google Home Page auto suggestion?
- How to open Chrome Developer console in Selenium WebDriver using JAVA
- Take full page screenshot in Chrome with Selenium
- Does Selenium v3.141 support Java 13?
- org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection Selenium ChromeDriver and Chrome v111
- How to find the coordinates of the buttons on a canvas, and click on them after using Java and Selenium?
- Is there a proved mouseOver workaround for FirefoxDriver in Selenium2?
- How to resolve, Stale element exception? if element is no longer attached to the DOM?
- Error executing testng.xml through CLI : Could not find or load main class org.testng.TestNG
- How to scroll a specific DIV using Selenium WebDriver with Java?
- How do you use a firefox plugin within a selenium webdriver program written in java?
- How to wait for an alert in Selenium webdriver ? [duplicate]