LoadRunner Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

How to Initiate Logoff Sequence with RDP Protocol using 11.52

Highlighted
Regular Advisor [Founder]

How to Initiate Logoff Sequence with RDP Protocol using 11.52

Using RDP Protocol with LR 11.52. Script connects OK to a Windows 2008 server. However, using a keyboard sequence to initiate logoff is not working. Anyone know why? Below is the code I am using to initiate the logoff:

 

 

rdp_key("StepDescription=Key Press 4", 
        "Snapshot=snapshot_6.inf", 
        "KeyValue=VK_END", 
        "KeyModifier=CONTROL_KEY,ALT_KEY", 
        RDP_LAST);
    
    lr_think_time(5);
    
    rdp_key("StepDescription=Key Press 5", 
        "Snapshot=snapshot_7.inf", 
        "KeyValue=VK_DOWN", 
        RDP_LAST);
    
    rdp_key("StepDescription=Logoff", 
        "Snapshot=snapshot_logoff.inf", 
        "KeyValue=VK_RETURN", 
        RDP_LAST);

1 REPLY
Regular Visitor

Re: How to Initiate Logoff Sequence with RDP Protocol using 11.52

Can you try to use the following keystrokes to execute the Logoff from remote machine:

 One thing i observed in your code is - there is no wait/think time while using the keyboard strokes for  "KeyValue=VK_LEFT", and   "KeyValue=VK_RETURN". Try to introduce wait/think time between them and it should work.

 

*********************************************************************************************

 

Also, I can suggest from the steps which i am using in scripts for Log-off from remote machine

Use Key Stroke - Control+Escape  - and than navigate to the LogOff tab on Start Menu followed by Enter Key. Also, introduce the function after the above steps - rdp_sync_on_server_disconnect

 

 

Let me know how it goes with you. Share your experience.

 

Thanks

Manasvi Rajan