Change arguments in JavaScript code on a web page

Hello, suppose we have a web page and a button which calls a javascript function with parameters.
Here is an example: https://www.w3schools.com/js/tryit.asp?filename=tryjs_function2

When you click on the button it calls a function myFunction('Harry Potter','Wizard')

How can I using uipath call this function without clicking on the button?
How can I call function and insert my own arguments? For instance myFunction('Harry Potter','+Variable.tostring+')

Hi @NotFranmax,

Have you tried the Inject JS Script it executes JavaScript code in the context of the web page corresponding to a UiElement. Let me know if this works for you. :smiley:

Will try and come back

1 Like