

All processing happens in its own process, instead of hijacking the user's Chrome.Independent from Chrome version or the existence of XModules.The distributable would be heavier than a compiled AutoHotkey, but there are much less moving parts, and thus much more reliable: In all three cases, the automation simulates a user, and the real-life user must not touch the computer while the script is running, or the automation will break.Īlternatively, if your aim is automation without deploying a browser, you may consider making it a command line node.js program, and package it as exe. Name of the image file can be passed as parameter to the command line for AutoHotkey and Sikulix, or stored in a file and read by the script in case of Kantu. The users will need to install the browser extension, and its native extension, but once done everything happens in the browser (more or less).Īll three methods involve simulation of typing the file name, because as far as I know there is no simpler way to automate it in a user-launched (non-headless) Chrome. Kantu + XModules is kind of between the two. Sikulix is more powerful, but is also much harder to distribute just the java runtime is bigger than a browser. Commercial solution exists, but with similar restrictions given your unusual requirements of no headless browser.ĪutoHotkey will be focused on simulating keyboard (Open browser, wait 5 second, press tab 10 times, press enter, wait 2 sec, type file name, press enter, and so on), and can be compiled into a deployable exe. So, if you want to automate file selection, you need to use a native, out-of-browser automation tool, such as Kantu's XModules, AutoHotkey, or SikuliX. Google prefers you to keep things online.)Īs mentioned above, a file selected by file input or dropped into the browser can be read by in-page JavaScript, but I'll keep calling it an "upload" action in tradition.Ĭhrome has some automation extensions, most notably Kantu, but they can't handle file upload because of Chrome's security restriction. (Note that Chrome severely limits static html, including a harsh restriction on web workers. The code itself can be hosted online using Service Worker, or static html + javascript.īoth can be opened and executed offline, once visited or deployed. The processing may even happens in a background thread, keeping the UI responsive, such as a nice progress bar. Your question can be split into two parts: offline processing and upload automation.Īssuming your image processing code is fully in-browser JavaScript (instead of, say, a modularized node program calling native libraries), it is possible to do all the processing in-browser.įile "uploaded" can be read, processed, and downloaded without sending anything to server. Should be technically automate-able, but it is far from straightforward.
