Hi Joba, thanks for the suggestion.
Using the explanation given by Angelo, the problem seems to be that the Runtime bot runs on the Console session of Windows, but when I'm developing it usually happens on a RDP session. If I run the getDisplays command in Studio on a RDP session, it returns the resolution configured in RDP, but it does not guarantee that the Console session will have the same resolution available. For the displays captured by this command to be more accurate, developers probably would have to schedule a test script on the runtime machine even before starting development. Is this the recommended measure?
By the way, I recently discovered that I can get the resolutions available in the Console session even if connected using RDP with the following PowerShell script:
(Get-WmiObject -Class Win32_VideoController).VideoModeDescription;
------------------------------
Vinicius Marques
------------------------------
Original Message:
Sent: Thu July 01, 2021 01:15 PM
From: Joba Diniz
Subject: Set Screen Resolution not working on Runtime
To safeguard your bot script regarding screen resolution set attempts, you could use the getDisplays command.
This command returns a list of the available displays, and each display has the following properties

As you can see, those are the same parameters required by setScreenResolution command.
You can use those values to verify whether the resolution you want is available, and if it isn't, then fail the execution with the proper error.
------------------------------
Joba Diniz
Product Manager
IBM
------------------------------
Original Message:
Sent: Mon June 21, 2021 08:31 AM
From: Vinicius Marques
Subject: Set Screen Resolution not working on Runtime
Hi Angelo,
Thanks for the answer. I am waiting for the infrastructure team to configure the resolution on the machine and we'll try executing again.
------------------------------
Vinicius Marques
Original Message:
Sent: Fri June 18, 2021 08:48 AM
From: Angelo Alves
Subject: Set Screen Resolution not working on Runtime
Hi Vinicius,
Windows has two session types Console and RDP, when you access the VM via RDP, the resolution is set through your machine. The bot always runs in the console session, so it can only use resolutions available in the VM configuration.
So you probably don't have the resolution you want in the VM.
In this case, it is necessary to call the infrastructure sector to find out which resolutions are supported by the VM or access a VM via some other connection tool (VNC, TeamViewer, Anydesk) and look at the monitor configuration.
------------------------------
Angelo Alves