This question already has an answer here:

Need to check file is generated. For example, If one filter is given it will generate file in minute, if we give more than one filter then it will take more time. How to do that is selenium and junit

marked as duplicate by Alexey R., alecxe Jan 21 at 18:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.