action.sendKeys(body, Keys.CONTROL + “j”) dosen't open the download page

扶醉桌前 提交于 2019-12-04 21:09:51

Try using like Below code, it is working perfectly at my end ...

Actions builder = new Actions(driver);
builder.keyDown(Keys.CONTROL).sendKeys("j").keyUp(Keys.CONTROL).build().perform();

I'd suggest not to go for chrome://downloads as this will not work in IE and FF but CTRL + j will work on all chrome, IE and FF.

Do you need to use the key binding? You could just navigate to the URL chrome://downloads/ ...

Edit: Ofc, this is not the ideal solution for cross-browser compability. But definitely a good workaround for chrome.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!