1

I am automating a web application and facing few difficulties. Right click is not working in IE but is working in Chrome.

WebElement elem = driver.findElement(By.id(conf.getPropertyValues("RIGHTCLICKTOMODIFY")));
    Actions action= new Actions(driver);
    action.contextClick(elem).sendKeys(Keys.ARROW_DOWN).sendKeys(Keys.ARROW_DOWN).sendKeys(Keys.ENTER).build().perform();
    Thread.sleep(3000);
    WebElement button = driver.findElement(By.id(conf.getPropertyValues("RIGHTCLICK_MODIFY_LINK")));
Anusha
  • 19
  • 1

1 Answers1

0

Apparently this is an open issue that was not closed yet. You can try two possible work-arounds to solve this issue:

  • Execute a script via driver.executeScript(/* Do something */) to simulate a right-click.

  • Modify the capabilities of Internet Explorer by using setCapability("nativeEvents",false), since it is possible that a browser does not support one or more webdriver feature. Have a look here for more insights on the subject.

I hope that my answer helps you.

Community
  • 1
  • 1
d_z90
  • 1,213
  • 2
  • 19
  • 48