How to dynamically click browser buttons

Hi there,

I’m wondering if somebody could help…

Basically, I need to download PDF documents from various different web pages. An example of how the download buttons can look:

I’ve played around with the selectors and ended up with this:

" html title= ‘"+ WindowTitle+"’ webctrl css-selector=‘html’ tag=‘HTML’ webctrl css-selector=‘html>body’ tag=‘BODY’ webctrl aaname=’* PDF*’ tag=‘A’ /"

However, this only works sometimes. Any suggestions or better ideas would be greatly appreciated.

Try to use attach to live element option.

Seems like you’re limiting the different options the buttons can have. The buttons where it doesn’t work probably have a different tag than ‘A’. Remove the tag attributes, and possibly css-selector to have a selector that’s as minimal as possible. I think that’s your best shot at getting the most possible buttons, but it might result in clicking wrong butons. I’m curious to hear if the following selector works :slight_smile:

“html title= ‘”+ WindowTitle+"’ webctrl css-selector=‘html’ tag=‘HTML’ webctrl aaname=’* PDF*’ /"

Hi evangemert, thanks for your input! I have tried that selector and similar minimalistic variations and unfortunately it doesn’t work…

Here’s another example of a button that needs to be clicked:
image

Is there a fixed amount of different buttons you have to click? In that case you could try and use a Case Switch activity, based on the button you find on the page, and then have the appropriate click activity inside each of the cases.

Always you can do this in this way -> click text