goofansu Posted October 18, 2022 Share Posted October 18, 2022 (edited) One step in my workflow is using the Automation Task "Run JavaScript in Chromium Browser Tab" to fetch specified text as page title. It works correctly in Google Chrome, but fails in the Arc browser. The problem is the output of the Automation Task is always an empty string, regardless of the JavaScript it executes. For example, the JavaScript is document.getElementById('productTitle').innerText to get the product title on an amazon product page. In Google Chrome, the output is the title returned by the code, but in Arc browser it is an empty string. Automation Task Debug information For the product page: https://www.amazon.com/How-Take-Smart-Notes-Technique-ebook/dp/B09V5M8FR5 Arc browser [00:10:05.828] Markdown[Automation Task] Running task 'Run JavaScript in Chromium Browser Tab' with no arguments [00:10:05.992] Markdown[Automation Task] Processing complete [00:10:05.994] Markdown[Automation Task] Passing output '' to Arg and Vars [00:10:05.997] Markdown[Arg and Vars] Processing complete [00:10:05.998] Markdown[Arg and Vars] Passing output '' to Copy to Clipboard I also tested the with alert(document.getElementById('productTitle').innerText), it runs and alert the title, so the title is there, but seems cannot set to output. Google Chrome [00:13:05.706] Markdown[Automation Task] Running task 'Run JavaScript in Chromium Browser Tab' with no arguments [00:13:05.916] Markdown[Automation Task] Processing complete [00:13:05.917] Markdown[Automation Task] Passing output 'How to Take Smart Notes: One Simple Technique to Boost Writing, Learning and Thinking ' to Arg and Vars [00:13:05.918] Markdown[Arg and Vars] Processing complete [00:13:05.918] Markdown[Arg and Vars] Passing output 'How to Take Smart Notes: One Simple Technique to Boost Writing, Learning and Thinking ' to Copy to Clipboard Tell me if you need more information, thanks. ==== update 2023-01-13 ==== The automation works correctly in Arc Browser. Edited January 13, 2023 by goofansu Update state Link to comment
vitor Posted October 18, 2022 Share Posted October 18, 2022 The Arc browser does not implement the necessary AppleScript support. That is something which needs to be addressed from their side. It should be possible, seeing as they’re a Chromium-based browser. Once (if) they make it available (and assuming they don’t change the dictionary) it will work automatically. Link to comment
goofansu Posted October 19, 2022 Author Share Posted October 19, 2022 3 hours ago, vitor said: The Arc browser does not implement the necessary AppleScript support. That is something which needs to be addressed from their side. It should be possible, seeing as they’re a Chromium-based browser. Once (if) they make it available (and assuming they don’t change the dictionary) it will work automatically. Thank you for the advice. I'll just skip the automation task and just use the page title at the moment. Link to comment
christianmagill Posted January 12, 2023 Share Posted January 12, 2023 I saw this come across in the most recent Arc update Quote We've updated our AppleScript API, which allows native apps to better integrate with Arc! You can now query for spaces and tabs, and create new tabs and windows. Chris Messina 1 Link to comment
goofansu Posted January 13, 2023 Author Share Posted January 13, 2023 Hi @christianmagill, thank you for the reminder, just run the workflow and it works correctly now. christianmagill 1 Link to comment
Chris Messina Posted January 13, 2023 Share Posted January 13, 2023 On 10/18/2022 at 4:31 PM, vitor said: The Arc browser does not implement the necessary AppleScript support. That is something which needs to be addressed from their side. It should be possible, seeing as they’re a Chromium-based browser. Once (if) they make it available (and assuming they don’t change the dictionary) it will work automatically. There is richer AppleScript support as of Arc v0.85 — so now additional Alfred⬌ Arc integration can be explored! Link to comment
vitor Posted January 14, 2023 Share Posted January 14, 2023 @Chris Messina As @goofansu alluded, you can do that today. All you need to do is use the Custom… option and define Arc as the browser. Assuming it behaves like other Chromium browsers (looks like it does), it’ll just work. But yes, after verifying proper support it’ll be added with the other pre-configured options. Link to comment
christianmagill Posted January 15, 2023 Share Posted January 15, 2023 On 1/13/2023 at 5:50 PM, Chris Messina said: There is richer AppleScript support as of Arc v0.85 — so now additional Alfred⬌ Arc integration can be explored! Yes, I've been trying to modify Emmanuel Pilande's Browser Tabs workflow, but haven't quite figured how to activate a tab based on a window and tab index. There's the select method, but every configuration I've tried doesn't work. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now