Execute Java Script in Uipath

Can you pls let me know a way to execute Java Script program inside UiPath. I could see “Inject JS Script” activity. But it didn’t work. It asks to indicate a target (Ideally a browser)


Ideally a js needs an ide…so you can just open a browser and use inject js in that attach


I want to execute the JS program in the Windows command prompt. How could I achieve it?


UiPath doesn’t have ability to run JavaScript in itself.
Can you try InjectJSScript and it runs JavaScript code in Browser JavaScript engine.
Or can you share whant you want to achieve?


Sure @Yoichi ,
I have a Java script program built and it gets executed in the Windows Command prompt. I need to automate it where the bot should execute the program (JS program) in the command prompt and capture the result of the execution. But I don’t find an activity to either directly execute JS program or access command prompt to execute it. I don’t want to go for Ui Automation since it is unreliable.


If we can set allow access to File URLs in extension setting, we can open local simple file and use it stability.(because there is no network access)

Can you try the following sample?

Sample20230626-6L.zip (5.5 KB)


Use Deno to run your JS without a browser.

Use Application/Browser to open CMD.exe

Type Into to enter the command that runs the JS app

Keyboard Shortcuts activity to send Enter to run the command

Get Text to get the resulting text from the screen