cancel
Showing results for 
Search instead for 
Did you mean: 

JavaScript to Access DOM with RPA

AndrewMiller
Level 2
Hi,

I have just a general question concerning using JS to access some DOM elements with injecting JS as opposed to spying them.

The reason I am wondering about the Pros and Cons to this technique is because we are having speed issues accessing a system that uses nested Iframes.
I have seen some other techniques on forms that seemed to be trying to get the DOM path and updating the path attribute within BP. I am wondering why not just inject JS to access the DOM Element and using something like the JS MouseEvent API to click the element.  Specifically, use a combination of the below technique to locate the IFrame and then manipulate the item. I know this is not ideal and spying would be best, but just brainstorming on situations where spying may not be the best way. Any thoughts would be helpful. 

16877.png
16878.png


------------------------------
Andrew Miller
------------------------------
1 REPLY 1

AndreyKudinov
Level 10
I would say there is no real reason why you shouldn't do it, especially if that makes it much faster, except that now you need to maintain both blueprism "code" and javascript.
If you have people in team with js skills to fix it when something breaks and you are on vacation etc - go for it.

I'm in a quite similar situation, except I have to use one complex code stage instead of proper blueprism VPL, because 100k rows collections crash blueprism or it just grinds to a halt, but works just fine if data is processed in code.

------------------------------
Andrey Kudinov
Project Manager
MobileTelesystems PJSC
Europe/Moscow
------------------------------