Wait while page loads to click save button
I am working on automating a BI report. When I click the view report button the page loads with a javascript loading image and the save file button is not enabled until the file finishes loading. What is the proper way to wait until the file is loaded before clicking the save button? I have tried setting a loop to look every 5 seconds for when the property is enabled, this works for small load times but for some reason it is not working when the page takes longer to load. I had to manipulate the for loop to get it to work for a faster loading report. The report can take up to 10 minutes or longer sometimes before the save button is available to click. Any suggestions?