Running by Command Line in Chrome headless mode in MacOs

Hello y’all.

I’m trying to do scrapping in headless mode, to save processing power that I don’t have :sweat_smile:, but something is going wrong.

I already tested my script on Chrome “full” mode (with GUI) and it’s working perfectly, and also tested the autostart HTML, with all parameters set and everything works fine.

I’ve followed the procedures on documentation of using osascript -e on Terminal but didn’t work at all, so I found somewhere this solution that worked pretty good without the –headless switch:

alias chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"

chrome --dump-dom “file:///Users/t/Desktop/test/uivision.html?direct=1&macro=test&savelog=demotestlog.txt”

The problem is when I run the command into Terminal with –headless switch, I’m getting the following error:

alert('Error #203: It seems you need to turn on *Allow access to file URLs* for Kantu in your browser extension settings.')

I already allowed this into extension properties and if I ran without the switch, no problem at all.

Can someone tell me if the problem is the extension in itself is not loaded using headless mode?
And, if its the case, there is something, anything that can I do to run the scripts in a headless mode?

Thank you so much!
(It’s my first post ever in this forum, I’m sorry if I’m doing something wrong)

Yeah, the issue is that the RPA software does not run in headless mode. But if you only use Selenium IDE compatible commands then you can run the browser in background.

If you use UI testing commands, then the browser (or the desktop app that you are automating) needs to stay in the foreground and the machine unlocked. This is a limiation for all UI automation tools.