Rename start file in orchestrator, fix in ServerSettings for Linux

dev-linux
Ivan Maslov 2 years ago
parent a9bd02f12a
commit d5f165f882

@ -8,7 +8,7 @@ if CrossOS.IS_WINDOWS_BOOL: #CrossOS
getDisplayRects, saveScreenToBmp, saveRectToBmp, getScreenAsImage,
getRectAsImage, getDisplaysAsImages)
if CrossOS.IS_LINUX_BOOL: pass
if CrossOS.IS_LINUX_BOOL: import pyscreeze
from http import cookies
import uuid # generate UUID4
@ -197,9 +197,9 @@ def pyOpenRPA_Screenshot(inRequest,inGlobalDict):
# Get Screenshot
def SaveScreenshot(inFilePath):
# grab fullscreen
# Save the entire virtual screen as a PNG
# Save the entire virtual screen as a PNsG
lScreenshot = getScreenAsImage()
lScreenshot.save('screenshot.png', format='png')
lScreenshot.save('Screenshot.png', format='png')
# lScreenshot = ScreenshotSecondScreen.grab_screen()
# save image file
# lScreenshot.save('screenshot.png')
@ -211,7 +211,13 @@ def pyOpenRPA_Screenshot(inRequest,inGlobalDict):
inRequest.OpenRPAResponseDict["Body"] = lFileObject.read()
# Закрыть файловый объект
lFileObject.close()
else: lFileObject = b''
else:
pyscreeze._screenshot_linux(imageFilename='Screenshot.png')
lFileObject = open("Screenshot.png", "rb")
# Write content as utf-8 data
inRequest.OpenRPAResponseDict["Body"] = lFileObject.read()
# Закрыть файловый объект
lFileObject.close()
# Add activity item or activity list to the processor queue
# Body is Activity item or Activity List
@ -494,4 +500,4 @@ def SettingsUpdate(inGlobalConfiguration):
]
Usage.Process(inComponentStr="Orchestrator")
inGlobalConfiguration["ServerDict"]["URLList"]=inGlobalConfiguration["ServerDict"]["URLList"]+lURLList
return inGlobalConfiguration
return inGlobalConfiguration

@ -23,7 +23,7 @@ def BrowserChromeStart(inDriverExePathStr:str = None, inChromeExePathStr:str = N
from pyOpenRPA.Robot import UIWeb
UIWeb.BrowserChromeStart()
UIWeb.BrowserClose()
:param inDriverExePathStr: Путь до компонента webdriver.exe, по умолчанию None (путь до webdriver.exe, который расположен в репозитории pyOpenRPA)
:type inDriverExePathStr: str, опционально
:param inChromeExePathStr:Путь до компонента chrome.exe, по умолчанию None (путь до chrome.exe, который расположен в репозитории pyOpenRPA)

Loading…
Cancel
Save