I have this website open in Chrome. There is always a table there with several rows (there can be several hundred rows).
The text under "Tour No." (for example 20210430-0950) is a hyperlink to the detail view of each row.
I want an automation to open each row/link, print it and close it again and then continue with the next one until there are no more links.
(or: first open all links in new tabs and then print all tabs).
OK, I believe I have a solution for you.
This macro first extracts all links from the main web page with the table.
It then displays an Alert for you to confirm you want to print all of then Links:
A new Tab is opened, then each link is opened in it and prints it.
A standard Notification is sent as each link is printed.
The tab is closed when the macro is finished.
Below is just an example written in response to your request. You will need to use as an example and/or change to meet your workflow automation needs.
Please test with an main web page the contains only a few links in the table, something like 3-5 links.
If that works well, then you can use with larger tables.
Please let me know if you have any issues, or need to tweak the macro in any way.
Please let us know if it meets your needs.
MACRO: Print All Links on Web Page Table [Example]
-~~~ VER: 1.0 2021-05-03 ~~~
Requires: KM 8.2.4+ macOS 10.11 (El Capitan)+
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave)) DOWNLOAD Macro File:
Print All Links on Web Page Table [Example].kmmacros
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.
Please Note these changes
Convert all KM Select Menu Actions to use local language.
Convert all Pause Until Button Actions to use local language.
Macro now runs on
Print All Links on Web Page Table
Extract the URL from each Link in Designated Table (using querySelector)
Then Open and Print each URL
HOW TO USE
First, make sure you have followed instructions in the
Macro Setup below. See the below "How to Use" Comment Action
This macro is just an example written in response to your request. You will need to use as an example and/or change to meet your workflow automation needs.
Carefully review the Release Notes and the Macro Actions
Make sure you understand what the Macro will do.
You are responsible for running the Macro, not me. ??
Make These Changes to this Macro
Assign a Trigger to this Macro .
Move this macro to a Macro Group that is only Active when you need this Macro.
ENABLE this Macro, and the Macro Group it is in.
For more info, see KM Wiki article on Macro Activation
KM 9.0+ (may work in KM 8.2+ in some cases)
macOS 10.12.6 (Sierra)+
USE AT YOUR OWN RISK
While I have given this a modest amount of testing, and to the best of my knowledge will do no harm, I cannot guarantee it.
If you have any doubts or questions:
Ask first Turn on the KM Macro Debugger from the KM Status Menu, and step through the macro, making sure you understand what it is doing with each Action.