seleniumselenium-webdriverdownloadcapability

What's the difference between browser 'preferences' and 'desired capabilities'?


What's the difference between setting 'preferences' and 'desired capabilities' in the browser using Selenium?

I see people/blogs mentioning "browser.helperApps.neverAsk.saveToDisk" as preference. But how do you distinguish between them?


Solution

  • By using desired capabilities you are configuring the session as to what features should the session use. Here is the link to show what all features a session can have by using desired capabilities.

    Browser preferences are the features that a browser use. For ex you may want to run your test with Firefox having certain startup page, language or want to do something with ssl certificate. Here and here are links to show how to change browser prefrences using a profile.