There are a few concepts to understand here
1. Attaching (Not Connected error)
I haven't watched the entirety of the video, but I assume that you are trying to attach to Internet Explorer.
The "Not Connected" error means that Blue Prism isn't attached to the browser yet. BP needs to attach to the browser in order to read the different web elements that are on the screen.
Attach is an action in "Navigate". The "top most element" in the application explorer can be attached to (Application Root in the example image below).
Before you can read, write, navigate, or interact with any elements of an application or browser, you must Attach first. If you find that it sometimes works in the Object Studio, it is probably because you've run attached automatically by "Launching" the application inside the Application Modeler. Launching the browser from Application Modeler will attach for you, but that attach disappears after you close the Object Studio.
In normal cases, you won't actually Launch (which will also attach) from the Application Modeler, so inside your Object or Process diagram, you should explicitly "Attach" using the Navigate stage as shown above.
2. Check if we are already attached
Another concept to understand is that you can't attach to something that is already attached. If you try to attach to something that is already attached, you'll see an error.
So before you attach to anything, you should first check whether it is already attached using a Read stage, the top most application element and the "Is Connected?" action.
So the general flow for attaching would be something like:
- Check to see if I"m already attached, if yes do nothing
- If i'm not attached yet, then attach.
You can use this inside each of your Object's actions, or inside your process steps.
2. Execution speed
In real automations, the execution speed is even faster than the fastest setting inside the Process/Object studio.
The way that we handle these is through the use of Wait Stages. This pauses execution for a user defined amount of seconds, while we wait for certain elements to appear on the screen.
An example is:
- Launch a a browser and visit a webpage
- Wait for the text "Login" to appear on the screen
- After the "Login" text has appeared, continue our flow. If not, then throw an exception.
This way we can run the process at full speed but still wait for slow applications, or slow networks that may cause delays in how fast things are shown on screen.
------------------------------
James Man
Senior Product Consultant
Blue Prism
Asia/Hong_Kong
------------------------------