Below is HTML :
I have 3 type="file" , Is that causing an issue .
1)<input id="file" type="file" class="upload" accept="image/*,.doc, .docx,.txt,.pdf,.xls,.xlsx,.ppt,.pptx">
2)<input _ngcontent-c54="" accept=".csv" class="sr-only" type="file">
3)<input _ngcontent-c54="" accept=".csv" class="sr-only" type="file">
I was able to resolve the issue by using xpath //input[@class='sr-only' and @type='file']