Yep, this desired capability is unnecessary. Just a typo mistake.
To apply with Firefox, you should use these capabilities:
"browser.helperApps.neverAsk.saveToDisk": "application/vnd.ms-excel, application/pdf",
"browser.download.dir": "Your download folder",
I also updated my repo with the Firefox desired capabilities. You can pull the code and run the sample test.
Also, could you please let us know when did you get the info on which capabilities should be used and what those capabilities mean? I’ve spent a lot of time trying to find the right capabilities but whatever I found wasn’t working.
Chrome and Firefox provide their desired capabilities at their website, you should read these documents first:
Next step, you need to search in the Selenium communities about this issue and realize the problem here. Eg:
- When clicking on a normal file (not pdf), Chrome and Firefox will ask to download the file. You need to find the desired capability to tell the browser don’t ask about to download.
- When clicking on a pdf file, Chrome and Firefox will display the file using the pdf viewer. You need to find the desired capability to tell the browser to treat the pdf as a normal file.
During the test, you should open Chrome settings and Firefox about:config to check that all desired capabilities have been recognised by the browser.