I have a website I am automating that has some built-in javascript code. The code is executed similar to links, where it’s essentially on-click. I’ve found the invoke js activity, which from what I can see lets me execute my own javascript code, but how can I just execute javascript that already exists on a webpage? In this example, I don’t need to inject a script.
Here is an example of what I am trying to interact with:
Prior to this, I’ve used ui.vision. In ui.vision I can interact with that javascript by using the execute script function of ui.vision. I’m hoping UiPath has something similar. Below is a sample of how it’d be done with ui.vision.
My goal is to be able to replace the “231231” with a dynamic value via a variable, but otherwise I would just use the existing JS code on the website. Hopefully someone can help point me in the right direction.
Thanks, i did see that video, but that seems to be injecting new code into the page. For my purpose the code is already present, its part of the page, and i am just trying to call an existing function.
Click wont work because the element isnt always visible. Its a multi-page list, and again with my ui.vision example i am able to execute the function on an element that isn’t actually currently visible on the webpage.
So my question is basically, can i call a function thats already on the webpage and simply provide the input?
I was able to get this to execute, but for some reason it’s not fully functioning. I got an error that the function doesn’t exist. I’ll have to figure out another solution it seems. I appreciate the help!
Okay, I found a fix. The issue was that I had to adjust the inject JS Script “Execution World” property to be Page, instead of leaving it blank (which I guess defaults to Isolated).