I have no clue but when I searched in the forum before posting my question here, i bumped into few posts. I couldn't figure out which steps exactly should I implement in my macro hence i posted here. so all along i was under an opinion that it is possible.
@Nige_S Are these posts from the time when it was technically possible?
Yep, you can put the JavaScript that uses the XPath in a Repeat action loop from 1 to 10, and update a KM Variable to be the current loop index, then use that to set the KM Variable that contains the XPath.
You will need to CHANGE the JavaScript in Browser to Insert YOUR CODE that returns a URL plus a new line character ("\n").
Note that the below Macro/Script technically brings the new Chrome Tab to the front very briefly when it adds it. But then it quickly restores the original tab that w…
Use Case
WebScrape a URL in the Background
Demo of Entire Process
Note that the new Tab never appears
The Entire process is run in the Background
If Google Chrome was hidden before the macro was triggered, it would continue to be hidden.
[image]
MACRO: Open & WebScrape Chrome Tab in Background [Example]
UPDATED: 2021-05-30 16:30 GMT-5
Ver 2.1 script was rewritten to ensure the new tab never appears.
Now the entire process is run in the …
I have used JavaScript to create an array of a couple of URL links on a page.
I want to open each one in a new background tab in Safari.
How can I do that?
I understand I probably need to use AppleScript but I’m not sure how to use the array in AppleScript?
I created a macro to check the address of a link and do various things depending on the address. If the link doesn’t meet the conditions, I will like safari to simply open a new tab in the background.
How do I make the new safari tab open in the background and not the foreground?
1 Like