Friday, September 4, 2015

Right Click Function With Selenium Webdriver



public void RightClickAndChooseAnOption()
    {
               
        WebElement oWE=driver.findElement(By.linkText("About Google"));
       
        Actions oAction=new Actions(driver);
        oAction.moveToElement(oWE);
        oAction.contextClick(oWE).sendKeys(Keys.ARROW_DOWN).sendKeys(Keys.ENTER).build().perform();
       
    }

No comments:

Post a Comment