#Import parent folder to import current / other packages from pyOpenRPA.Robot import UIDesktop #Lib to access RDP window import os #os for process run import time #Connect to RDP session """ { "Host": "", #Host address "Port": "", #RDP Port "Login": "", # Login "Password": "", #Password "Screen": { "Resolution":"FullScreen", #"640x480" or "1680x1050" or "FullScreen". If Resolution not exists set full screen "FlagUseAllMonitors": False, # True or False "DepthBit":"" #"32" or "24" or "16" or "15" } } """ def SessionConnect(inRDPSessionConfiguration): #Run mstsc os.system("mstsc.exe") time.sleep(2) #Expand the parameter section UIDesktop.UIOSelector_Get_UIO( [ {"title":"Подключение к удаленному рабочему столу","backend":"uia"}, {"title":"Пара&метры >>"} ] ).click() #Set host:port #Set user #Select flag ask login/pass