Hey Everyone,
This is my first post.
I just started learning RPA, I did already automated some actions, but for the love of god I can’t figure out how to click a dynamically generated link.
In few words, in this intranet like website, I have a section where I can query for specific reports, when i click on query, a link gets generated.
When I do inspect this link i get this:
I have tried all sorts of combinations, what I do not get is why a simple click link href:“…/Queries/Qry123411.csv” does not work and returns link not found.
I usually recommend to anyone new to test automation to learn how to construct xpaths, this is a skill that you’ll find useful as this standard selection method is used by many test automation tools not just Robot Framework. A good starting point is this XPath Tutorial
In your case, you just need to identify what parts of the link remains constant so you can use that to identify the link.
Hey, thank you both for your answers!
I saw the tutorial, thank you for that, I now understand the logic behind xpath.
Unfortunately, none of your suggestions works, I suppose this link gets generated in a wierd way.
I say that because on other elements on the webpage, using dev tools I can exctract a working xpath but if I do the same on that particular element all I get is this:
Guessing “link not found” is what click link returns
Something worth checking, but you are prefixing the locator if your using an xpath that was suggested above? Click Link xpath://a…
I believe if you don’t provide it from how it reads it will check against those stated in the documentation with xpath isn’t one unless you tell it: https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Link
Oh also something worth a try if you haven’t after the above, you may need to set a wait until if this link is dynamically generated.