Jump to content

[Answered] "Run JavaScript in Chromium Browser Tab" returns empty output in Arc browser


Recommended Posts

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

image.png

 

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 by goofansu
Update state
Link to comment
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
  • goofansu changed the title to [Answered] "Run JavaScript in Chromium Browser Tab" returns empty output in Arc browser
  • 2 months later...
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! 

2119098886_2023-01-12(18_29.51)ScriptEditor@2x.thumb.png.e8712ec87ef891830b3d8f60650a7288.png

Link to comment
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...