From aef5b77d4bbc644d7b67b5ef14992a1db9d6ea1b Mon Sep 17 00:00:00 2001 From: Ivan Maslov Date: Sun, 17 Nov 2019 10:39:19 +0300 Subject: [PATCH] #minorfix --- .../Tools/RobotRDPActive/RDPConnector.py | 25 +++++++++++++++---- .../Tools/RobotRDPActive/__main__.py | 8 +++--- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/Sources/pyOpenRPA/Tools/RobotRDPActive/RDPConnector.py b/Sources/pyOpenRPA/Tools/RobotRDPActive/RDPConnector.py index baa6a3b2..3cf1a18d 100644 --- a/Sources/pyOpenRPA/Tools/RobotRDPActive/RDPConnector.py +++ b/Sources/pyOpenRPA/Tools/RobotRDPActive/RDPConnector.py @@ -24,12 +24,27 @@ def SessionConnect(inRDPSessionConfiguration): #Expand the parameter section UIDesktop.UIOSelector_Get_UIO( [ - {"process": lProcessId,"backend":"uia"}, - {"title": "Пара&метры >>"} - ] + {"process": lProcessId, "backend": "uia"}, + {"class_name": "ToolbarWindow32"}, + {"title": "Показать параметры ", "control_type": "Button"}] ).click() + #Select flag ask login/pass + UIDesktop.UIOSelector_Get_UIO( + [ + {"process": lProcessId, "backend": "win32"}, + {"title":"Общие"}, + {"title":"Учетные данные"}, + {"title":"&Всегда запрашивать учетные данные", "class_name":"Button"}] + ).check() #Set host:port - + lHostPort=inRDPSessionConfiguration['host'] + if 'port' in inRDPSessionConfiguration: + lHostPort=f"{lHostPort}:{inRDPSessionConfiguration['port']}" + UIDesktop.UIOSelector_Get_UIO( + [ + {"process": lProcessId, "backend": "uia"}, + {"title": "Компьютер:"}, + {"title": "Компьютер:", "control_type": "Edit"}] + ).set_text(f"{lHostPort}") #Set user - #Select flag ask login/pass diff --git a/Sources/pyOpenRPA/Tools/RobotRDPActive/__main__.py b/Sources/pyOpenRPA/Tools/RobotRDPActive/__main__.py index 0d9e92fc..2e5729ef 100644 --- a/Sources/pyOpenRPA/Tools/RobotRDPActive/__main__.py +++ b/Sources/pyOpenRPA/Tools/RobotRDPActive/__main__.py @@ -7,10 +7,10 @@ sys.path.insert(0, lFolderPath) ######################################################### from pyOpenRPA.Tools.RobotRDPActive import RDPConnector mConfiguration={ - "Host": "93.159.239.226", #Host address - "Port": "8525", #RDP Port - "Login": "user22", # Login - "Password": "Tak181418Bar", #Password + "Host": "77.77.22.22", #Host address + "Port": "7777", #RDP Port + "Login": "test", # Login + "Password": "test", #Password "Screen": { "Resolution":"FullScreen", #"640x480" or "1680x1050" or "FullScreen". If Resolution not exists set full screen "FlagUseAllMonitors": False, # True or False