Keeping your remote session active when using Runner

Keeping your remote session active when using Runner

In some cases where a VM is used to run the automation, keeping the remote session active is necessary to avoid problems with the graphical interface, such as the OSError: screen grab failed error. This error is usually thrown when trying to perform an automation that uses computer vision to find elements in an environment where the remote connection has already been closed. This is because when closing the connection, the operating system will make the screen black, preventing bots from capturing the screen and making it impossible to search for graphic elements.

For this, BotCity offers two scripts to run bots that use the graphical interface of the environment without having to be connected to the session. These scripts disconnect the user's current session and redirect it to a terminal session, keeping the session and graphical interface active for BotCity Runner.

These scripts are available within the BotCity Studio SDK folder and can be used in the Runner execution settings. You can choose to execute them by starting the Runner using the startup parameter or before each task that the Runner will perform through the beforeTask parameter.

Available Scripts:

startup.bat: This script is available in the startup folder, and by setting it in the Runner configuration file, it will disconnect the current session and redirect it to a terminal session.
console_session.bat: This script is available in the scripts folder, and by setting it in the Runner configuration file, it will also have the function of disconnecting the current session and redirecting it to a terminal session, but also has the option to define the screen resolution for this new session.

See more details on the use and implementation of these scripts in the Keeping your remote session active documentation.


Important:
After configuration, you must start Runner with administrator privileges for the scripts to run.

    • Related Articles

    • Troubleshooting when using ‘Print Screen’ in BotCity Studio

      In some sporadic cases, when using the 'Print Screen' key to take a screenshot, the captured image is not displayed in Studio. This behavior may be related to several factors, such as other applications intercepting the 'Print Screen' action, ...
    • What to do when Runner seems stuck when executing a new task?

      In sporadic situations, the Runner may seem stuck after pulling a new task for execution. In this situation, the execution is not started, and the Runner status remains as Executing task ... until the Runner is restarted. Overall, the resources used ...
    • Where can I find content to learn more about using BotCity?

      A great alternative to have a first contact with the tools is to access the courses available on BotCity Academy. Additionally, you can also access the tutorials available on the documentation portal: Getting started with BotCity Developing your ...
    • Problems with blocking environments

      If you are trying to use BotCity's tools in a corporate environment, you may encounter some issues related to environment locks. Here are some of the most common issues when using the BotCity Studio SDK in blocking environments: Installation through ...
    • What are the features and limitations of a Community license on BotCity Orchestrator?

      A new account that is created on BotCity Orchestrator has full access to the platform's functionalities (trial) for a period of 30 days. After this 30-day period, access to the platform continues in the same way; the only differences are some ...