How to scrap data from a desktop application closed in the background

Hello Team
I am extracting data from a desktop application. Whenever I close the VDI I am getting ‘can not bring target application in the foreground because of windows session is locked’ . Please help me to to resolve this error

@Venu_V

Ideally you should not be closing/disconnecting it…instead logout and let the automation/robot login so that you dont get this issue

Cheers

which is the best input method when i am extracting data from desktop application to avoid above error

@Venu_V

window messages

cheers