1

I am running SAP GUI script automation on a Windows VM. When I am disconnecting from the remote desktop, I am running below command on a batch file, to disconnect and keep a virtual session of the current user.

for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (
%windir%\System32\tscon.exe %%s /dest:console
)

Earlier the resolution was not an issue for the GUI scripts I executed. But this time, when I execute the script while logged into the machine, the SAP login screen and the rest of the SAP windows launched on full-screen mode, to match the screen size of my laptop. But, when I execute the above batch file, the screen area gets small and the script is unable to find the element below the visible area, as it needs to scroll down.

This is a screenshot captured during a timeout.

enter image description here

If I log into this vm while, it is running (in the middle of the virtual session), I get the same window as below.

enter image description here

But, if I run this while logged into the machine, it just gets launched full screen. I am using SAP client 770.

I don't have permission to change to screen resolution. Is there any way I can fix this issue?

udani
  • 1,243
  • 2
  • 11
  • 33
  • You could maximize the sapgui session and see if this helps your issue. – Storax Jun 18 '22 at 14:49
  • Added the maximizing with the session.findById("wnd[0]").resizeWorkingPane 98,8,false (based on values got by recording in the VM), but this is becoming a really small window – udani Jun 20 '22 at 05:19
  • I meant to use maximize like `Session.FindById("wnd[0]").Maximize` – Storax Jun 20 '22 at 16:58
  • Used that option as well. But no luck. Finally, we requested to update the vm display settings to 1024x768 (could get bit more area to visible). Seems we need 1920x1080. – udani Jun 20 '22 at 18:41

0 Answers0