const downFileArray = document.getElementsByClassName("class-name")
let index = 0
let timer = setInterval(()=>{
if(index < downFileArray.length){
let link = downFileArray[index]
link.click()
link +=1
}else{
clearInterval(timer)
}
},2000)