Im using selenium basic with vba to automate my code to go to google, sign in, sort by last updated and download file to excel now the issue is that the file's ID keeps on changing, is there a code to add to mine to make it click on the download file i need? even though the ID keeps changing?
Dim bot As WebDriver
Set bot = New WebDriver
Dim i As Integer
Dim txt As String, link As String
bot.Start "chrome"
bot.Get "sharepoint link"
bot.FindElementById("UserName").SendKeys "user"
bot.FindElementById("Password").SendKeys "pass"
bot.FindElementById("btnSubmit").Click
bot.FindElementById("lastupdated").Click
bot.FindElementById("lastupdated").Click
bot.FindElementById("downloadExcel").Click (i want the download id here for the changing ID)
Stop
End Sub```