Step1: Store the path of web-element to be right clicked and web-element to be selected from context menu.
Step2: Use Action class
Step3: Click on the element from the Context menu of the web element.
WebElement rightClickelement = driver.findElement(by.---( ));
WebElement contextMenuelement = driver.findElement(by.---( ));
Step2: Use Action class
Actions actions = new Actions(driver);
Action action = actions.contextclick(rightClickelement).build( );
action.perform( );
Step3: Click on the element from the Context menu of the web element.
contextMenuelement.click( );
No comments:
Post a Comment