I need to have selenium automation download a file using firefox.
The automation successfully clicks the download, but a MIME opens to ask what to do. I need selenium to ignore this and just download the file.
Everything I have read days I should be able to use a function like this
const firefoxOption = new firefox.Options().set_preference(
'browser.helperApps.neverAsk.saveToDisk',
'application/zip,text/csv,text/txt',
);
But when I run this, it fails before it ever gets to clicking the download because this piece throws an error.
TypeError: (intermediate value).set_preference is not a function
what am I doing wrong??
ALL answers listed on SO show this exact code snippet and it is not working.
question from:
https://stackoverflow.com/questions/66052803/selenium-js-set-preference 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…