I'm trying to see if when a link is clicked a report is generated on the page using Selenium WebDriver with Java.
What happens is there are a bunch of links on a page, most of them when clicked go to another page where I have automated filling in the details and submitting the form to check the report is generated.
However, there are three reports that when clicked cause some JS to run and after a few seconds, a new link is displayed on the same page to download the report.
How can I click this link?
I then try calling the click method on that element in the list, allLinks.get(i).click();
This is the same thing I do for the other reports and it works fine but on these 3 I get an error "Element is not currently visible and so may not be interacted with"
Using firebug if I inspect the link that starts the JS running it says:
Can anyone suggest a way to click the link?
The page contains lots of links that say CSV so I can't just use the link text.
<strong>UPDATE:</strong> I've just had a thought about this which might help. When I first come to the page with the report links it will say "Order reports" I need to click the heading which then calls a JS function to expand that section and display the links.
The reports that work because when I come to this page I just read all the hrefs of the page source and do driver.get(reportList.get(i); so I'm not actually clicking on the link.
If yes - then something wrong with iterator
For anchor tags that contain