I need to disable 'show all' download bar of chrome in selenium.

Because the download bar is showing, UI elements in the lower portion of my page that need to be clicked are not visible. I'm looking for something like the way we disable notification bars with

ChromeOptions options = new ChromeOptions(); 

Is there a way to disable the download bar like this, and where can I find the information?

  • Hey @sreelakshmi, you might want to expand on this question before it gets closed off. Can you provide more information?
    – trashpanda
    Mar 13 '17 at 10:37
  • I want to know how to disable 'download' bar in chrome browser throrugh code.. like we disable notification bars like ChromeOptions options = new ChromeOptions(); options.addArguments("disable-infobars"); is there anyway to disable download bar like this Mar 13 '17 at 11:05
  • Have you tried installing the add-on for Chrome? chrome.google.com/webstore/detail/disable-download-bar/…
    – trashpanda
    Mar 13 '17 at 11:16
  • Yes.. but when automation is running those add-ons are not in active.... automation starts running in new window. Mar 13 '17 at 11:54
  • any updates regarding this issue... Mar 16 '17 at 9:58

Best Approach would be to Use Actions class in this case. The Element you need to interact with after the download bar is visible will be accessible with Actions class methods such as moveToElement().

This will save you the hassle of switching tabs and is a more neat approach.

  • 1
    Please add demonstrable code to this answer.
    – Brian
    Sep 10 '19 at 17:03
  • 1
    To add a demonstrable code , I will need the HTML of the element with which we are interacting and is hidden below the download bar. You can refer to selenium action class docs for details. Sep 11 '19 at 5:17

One way to solve this would be to set up a custom chrome profile in which you disable the download prompt, save it to a specific location inside your project, then use to pass as an argument to ChromeOptions.

var options = new ChromeOptions();
options.AddArgument("--user-data-dir=C:/Users/YourUserName/AppData/Local/Google/Chrome/User Data");

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.