From 4115f461f9ed517b96dd798986ae4745ec9a1619 Mon Sep 17 00:00:00 2001 From: robo-bo Date: Thu, 8 Sep 2022 18:41:46 +0300 Subject: [PATCH] orc demo in progress --- Orchestrator/ControlPanel/CP_Test.py | 57 ------------- Orchestrator/ControlPanel/CP_VersionCheck.py | 55 ------------ Orchestrator/ControlPanel/test.html | 1 - Orchestrator/ControlPanel/test.js | 1 - Orchestrator/Demo/HELLO/config.py | 28 ++++++ Orchestrator/Demo/HELLO/html_jinja2.xhtml | 52 ++++++++++++ Orchestrator/Demo/HELLO/js.js | 4 + Orchestrator/Demo/HR_01/HR_officer01.css | 2 +- Orchestrator/Demo/HR_01/config.py | 18 ++-- Orchestrator/Demo/HR_01/index.html | 16 ++-- Orchestrator/Demo/JUPYTER_01/config.py | 31 +++++++ .../Demo/JUPYTER_01/html_jinja2.xhtml | 33 +++++++ Orchestrator/Demo/JUPYTER_01/js.js | 4 + Orchestrator/Demo/OPER_01/config.py | 23 +++++ Orchestrator/Demo/OPER_01/html_jinja2.xhtml | 85 +++++++++++++++++++ Orchestrator/Demo/TREASURER_01/config.py | 22 +++-- Orchestrator/Demo/TREASURER_01/index.html | 18 ++-- .../Orchestrator/__Orchestrator__.py | 4 +- .../pyOpenRPA/Resources/Web/orpa/orc.xhtml | 5 +- Sources/pyOpenRPA/Robot/UIWeb.py | 30 +++---- 20 files changed, 320 insertions(+), 169 deletions(-) delete mode 100755 Orchestrator/ControlPanel/CP_Test.py delete mode 100755 Orchestrator/ControlPanel/CP_VersionCheck.py delete mode 100644 Orchestrator/ControlPanel/test.html delete mode 100644 Orchestrator/ControlPanel/test.js create mode 100644 Orchestrator/Demo/HELLO/config.py create mode 100644 Orchestrator/Demo/HELLO/html_jinja2.xhtml create mode 100644 Orchestrator/Demo/HELLO/js.js create mode 100644 Orchestrator/Demo/JUPYTER_01/config.py create mode 100644 Orchestrator/Demo/JUPYTER_01/html_jinja2.xhtml create mode 100644 Orchestrator/Demo/JUPYTER_01/js.js create mode 100644 Orchestrator/Demo/OPER_01/config.py create mode 100644 Orchestrator/Demo/OPER_01/html_jinja2.xhtml diff --git a/Orchestrator/ControlPanel/CP_Test.py b/Orchestrator/ControlPanel/CP_Test.py deleted file mode 100755 index 0fb55ef4..00000000 --- a/Orchestrator/ControlPanel/CP_Test.py +++ /dev/null @@ -1,57 +0,0 @@ -# !ATTENTION - Current Control panel works only from pyOpenRPA v1.2.0! -from pyOpenRPA import Orchestrator -def CPRender(inGSettings): - - lJSCheckVersion=""" - lT = 9; - lY="123"; - console.log(lT+1); - if (lT==9) { - alert(123) - } - """ - - lResultDict={ - "HeaderLeftText":"CP_TEST", - "HeaderRightText":"NAME", - "DataStorageKey":"", #Use key for set current dict in mGlobal.DataStorage["DataStorageKey"] on client side - "SubheaderText":"", - "BodyKeyValueList":[ - {"Key": "HTMLLinkURL", "Value": Orchestrator.Web.Basic.HTMLLinkURL(inURLStr="test",inColorStr="orange")}, - {"Key": "HTMLLinkJSOnClick", "Value": Orchestrator.Web.Basic.HTMLLinkJSOnClick(inJSOnClickStr=lJSCheckVersion, inTitleStr="!Click me!",inColorStr="green")}, - ], - "FooterText":"", - "FooterButtonX2List":[], - "FooterButtonX1List":[], - "GlobalStorage": "" # UNCOMMENT FOR DEBUG PURPOSE TO WATCH inGSettings on client side - } - return lResultDict -# Check in control panel, that process is runnning - -# Test JSON generator when page init -def JSONGenerator(): - lJSONDict=[1,2,2,4,2,2,2] - return lJSONDict - -# Test JS when page init -def JSInitGenerator(): - lJSCheckVersion=""" - lT = 9; - lY="123"; - //console.log(lT+1); - if (lT==9) { - //alert(123) - } - """ - return lJSCheckVersion - -def test(): - #Orchestrator.WebRequestGet() - Orchestrator.WebRequestResponseSend("Hello my friend!") - -#Orchestrator settings -def SettingsUpdate(inGSettings): - # New way to add CP defs in orchestrator - no gSettings.. - Orchestrator.WebCPUpdate(inGSettings=inGSettings, inCPKeyStr="TEST", inHTMLRenderDef=CPRender, inJSONGeneratorDef=JSONGenerator, inJSInitGeneratorDef=JSInitGenerator) - Orchestrator.WebURLConnectDef(inMethodStr="GET", inURLStr="/test", inMatchTypeStr="Equal", inDef=test, inUACBool=False) - return inGSettings \ No newline at end of file diff --git a/Orchestrator/ControlPanel/CP_VersionCheck.py b/Orchestrator/ControlPanel/CP_VersionCheck.py deleted file mode 100755 index 5b07ac05..00000000 --- a/Orchestrator/ControlPanel/CP_VersionCheck.py +++ /dev/null @@ -1,55 +0,0 @@ -# !ATTENTION - Current Control panel works only from pyOpenRPA v1.2.0! -from pyOpenRPA import Orchestrator -from pyOpenRPA.Orchestrator import Managers -def ControlPanelRenderDict(inGSettings): - # Example of the JS code in Python code - lJSCheckVersion = f""" - if (!('VersionStr' in mGlobal)) {{ - window.location.reload(true); - }} else {{ - if (mGlobal.VersionStr != "{inGSettings["VersionStr"]}") {{ - window.location.reload(true); - }} else {{ - $('div.orchestrator-version').html(mGlobal['VersionStr']); - }} - }} - """ - lResultDict={ - "HeaderLeftText":"Version check", - "HeaderRightText":"Orchestrator", - "DataStorageKey":"", #Use key for set current dict in mGlobal.DataStorage["DataStorageKey"] on client side - "SubheaderText":f"", - "BodyKeyValueList":[ - {"Key": "Client", "Value": '
'}, - {"Key": "Server", "Value": inGSettings["VersionStr"]}, - ], - "FooterText":"", - "FooterButtonX2List":[], - "FooterButtonX1List":[], - "GlobalStorage": "" # UNCOMMENT FOR DEBUG PURPOSE TO WATCH inGSettings on client side - } - return lResultDict -# Check in control panel, that process is runnning - -#Orchestrator settings -def SettingsUpdate(inGSettings): - #Add RobotRDPActive in control panel - Orchestrator.WebCPUpdate(inCPKeyStr="VersionCheck", inHTMLRenderDef=ControlPanelRenderDict) - - #lCP = Orchestrator.Managers.ControlPanel(inControlPanelNameStr="TestTTT",inRefreshHTMLJinja2TemplatePathStr="ControlPanel\\test.html", inJinja2TemplateRefreshBool = True) - #lCP.InitJSJinja2TemplatePathSet(inJinja2TemplatePathStr="ControlPanel\\test.js") - #lProcess = Orchestrator.Managers.ProcessInitSafe(inAgentHostNameStr="IVANMASLOV-DESKTOP",inAgentUserNameStr="ND", - # inProcessNameWOExeStr="notepad",inStartCMDStr="notepad",inStopSafeTimeoutSecFloat=3) - # Some test - Orchestrator.OrchestratorInitWait() - #lProcess.ScheduleStatusCheckEverySeconds(inIntervalSecondsInt=5) - #lProcess.Start(inIsManualBool=False) - #lProcess.StartCheck() - #Orchestrator.OrchestratorScheduleGet().every(2).seconds.do(Orchestrator.OrchestratorThreadStart, - # lProcess.StartCheck) - #Orchestrator.OrchestratorScheduleGet().every(5).seconds.do(Orchestrator.OrchestratorThreadStart,lProcess.StatusCheckStart) - #lProcess.Start() - #lGit = Orchestrator.Managers.Git(inAgentHostNameStr="IVANMASLOV-DESKTOP",inAgentUserNameStr="ND",inGitPathStr="C:\Abs\Archive\scopeSrcUL\pyStore") - #lGit.BranchRevLastGetInterval(inBranchLocalStr="prd", inBranchRemoteStr="origin/prd", inPreviousBranchRestoreBool=False,inIntervalSecFloat=10.0) - #lGit.ProcessConnect(inProcess=lProcess) - return inGSettings \ No newline at end of file diff --git a/Orchestrator/ControlPanel/test.html b/Orchestrator/ControlPanel/test.html deleted file mode 100644 index 51261204..00000000 --- a/Orchestrator/ControlPanel/test.html +++ /dev/null @@ -1 +0,0 @@ -
11231231
\ No newline at end of file diff --git a/Orchestrator/ControlPanel/test.js b/Orchestrator/ControlPanel/test.js deleted file mode 100644 index dbc73129..00000000 --- a/Orchestrator/ControlPanel/test.js +++ /dev/null @@ -1 +0,0 @@ -alert(123) \ No newline at end of file diff --git a/Orchestrator/Demo/HELLO/config.py b/Orchestrator/Demo/HELLO/config.py new file mode 100644 index 00000000..b3d80de0 --- /dev/null +++ b/Orchestrator/Demo/HELLO/config.py @@ -0,0 +1,28 @@ + +from pyOpenRPA import Orchestrator +from pyOpenRPA.Orchestrator.Managers import ControlPanel +from pyOpenRPA.Orchestrator.Managers import Process +from pyOpenRPA.Tools import CrossOS + +import os +import sys +import socket +import datetime +import urllib.parse +import time +g_cp_name_str = "HELLO" +g_repo_name_str = os.path.abspath(__file__).split("\\")[-5] +g_repo_package_path_str = os.path.abspath("\\".join(os.path.abspath(__file__).split("\\")[:-1])) + + +# User settings +g_host_str = socket.gethostname().upper() # Identify PC + + +g_control_panel = ControlPanel(inControlPanelNameStr=g_cp_name_str, + inRefreshHTMLJinja2TemplatePathStr=os.path.join(g_repo_package_path_str, "html_jinja2.xhtml"), + inJinja2TemplateRefreshBool=True,inRobotNameStr=g_repo_name_str) +g_jinja_context_dict = {"settings": sys.modules[__name__], + "urllib_parse_quote_plus": urllib.parse.quote_plus, "g_host_str": g_host_str, "g_repo_name_str": g_repo_name_str} +g_control_panel.Jinja2DataUpdateDictSet(inJinja2DataUpdateDict=g_jinja_context_dict) +g_control_panel.InitJSJinja2TemplatePathSet(inJinja2TemplatePathStr=os.path.join(g_repo_package_path_str, "js.js")) diff --git a/Orchestrator/Demo/HELLO/html_jinja2.xhtml b/Orchestrator/Demo/HELLO/html_jinja2.xhtml new file mode 100644 index 00000000..d37b4aa9 --- /dev/null +++ b/Orchestrator/Demo/HELLO/html_jinja2.xhtml @@ -0,0 +1,52 @@ +
+
+
+
+

Добро пожаловать {{UserInfoDict["UserNameUpperStr"]}}!

+
+
+
+
Предлагаем ознакомиться с демонстрационным стэндом оркестратора pyOpenRPA.
+ pyOpenRPA – это прогрессивная RPA платформа, которая позволяет сочетать в рамках одного проекта все перспективные технологии, такие как: +
    +
  • OCR / NLP / NER: Распознавание изображений и текста
  • +
  • CV: Компьютерное зрение
  • +
  • AI: Искусственный интеллект
  • +
  • ML: Машинное обучение
  • +
  • BIGDATA: Большие данные
  • +
  • VOICE & CHAT: Голосовые и чат-боты
  • +
+ Роботов pyOpenRPA невозможно отключить принудительно - управлять ими будете только вы! +

+ Здесь представлены примеры роботов для таких специалистов как: +
    +
  • Экономистов
  • +
  • Финансистов
  • +
  • Продавцов
  • +
  • Закупщиков
  • +
  • Маркетологов
  • +
  • Кадровиков
  • +
  • Рекрутёров
  • +
  • Казначеев
  • +
  • Юристов
  • +
  • Бухгалтеров
  • +
  • Операционистов
  • +
  • Безопасников
  • +
  • ИТ специалистов
  • +
+ +
pyOpenRPA - роботы помогут!
+ + +
+
+
+
+ \ No newline at end of file diff --git a/Orchestrator/Demo/HELLO/js.js b/Orchestrator/Demo/HELLO/js.js new file mode 100644 index 00000000..03960ec8 --- /dev/null +++ b/Orchestrator/Demo/HELLO/js.js @@ -0,0 +1,4 @@ +$(document).ready(function() { + $('#test8-progress').progress(); + +}); diff --git a/Orchestrator/Demo/HR_01/HR_officer01.css b/Orchestrator/Demo/HR_01/HR_officer01.css index 76474990..288f36c6 100644 --- a/Orchestrator/Demo/HR_01/HR_officer01.css +++ b/Orchestrator/Demo/HR_01/HR_officer01.css @@ -27,7 +27,7 @@ i#second { h4 { width: 100%; text-align: center; - border-bottom: 5px solid rgb(82, 105, 95); + border-bottom: 5px solid teal; line-height: 0.1em; margin: 10px 0 20px; } diff --git a/Orchestrator/Demo/HR_01/config.py b/Orchestrator/Demo/HR_01/config.py index 9bfa9c41..c11f379b 100644 --- a/Orchestrator/Demo/HR_01/config.py +++ b/Orchestrator/Demo/HR_01/config.py @@ -1,24 +1,26 @@ +import time +time.sleep(1) splitter1 = 'Рабочий процесс' splitter2 = 'Пример доступных данных' splitter3 = 'Пример запуска роботов' -title = 'Кадровик' +title = 'КАДРОВИК' introHeader = 'Применение:' introText = 'Робот-кадровик помогает проводить отбор кандидатов' -workflowHeader1 = 'Размещение вакансии' +workflowHeader1 = 'Шаг 1: Размещение вакансии' workflowDescription1 = 'Выполняет человек' workflowHint1 = 'Размещение вакансии в telegram/HH.ru' -workflowHeader2 = 'Тестирование' +workflowHeader2 = 'Шаг 2: Тестирование' workflowDescription2 = 'Выполняет робот' workflowHint2 = 'Автоматическое тестирования кандидатов' -workflowHeader3 = 'Подведение итогов' +workflowHeader3 = 'Шаг 3: Подведение итогов' workflowDescription3 = 'Выполняет робот' workflowHint3 = 'Автоматическое подведение итогов тестирования' -workflowHeader4 = 'Личное собеседование' +workflowHeader4 = 'Шаг 4: Личное собеседование' workflowDescription4 = 'Выполняет человек' workflowHint4 = 'Собеседование с лучшими кандидатами' -workflowHeader5 = 'Оформление будущего сотрудника' +workflowHeader5 = 'Шаг 5: Оформление будущего сотрудника' workflowDescription5 = 'Выполняет человек' workflowHint5 = 'Подписание трудового договора' @@ -73,14 +75,14 @@ html = f'''
- +
{workflowHeader2}
{workflowDescription2}
- +
{workflowHeader3}
{workflowDescription3}
diff --git a/Orchestrator/Demo/HR_01/index.html b/Orchestrator/Demo/HR_01/index.html index c547c333..3cbd542f 100644 --- a/Orchestrator/Demo/HR_01/index.html +++ b/Orchestrator/Demo/HR_01/index.html @@ -13,7 +13,7 @@
-

Кадровик


+

КАДРОВИК


Применение:

Робот-кадровик помогает проводить отбор кандидатов

@@ -25,35 +25,35 @@
-
Размещение вакансии
+
Шаг 1: Размещение вакансии
Выполняет человек
- +
-
Тестирование
+
Шаг 2: Тестирование
Выполняет робот
- +
-
Подведение итогов
+
Шаг 3: Подведение итогов
Выполняет робот
-
Личное собеседование
+
Шаг 4: Личное собеседование
Выполняет человек
-
Оформление будущего сотрудника
+
Шаг 5: Оформление будущего сотрудника
Выполняет человек
diff --git a/Orchestrator/Demo/JUPYTER_01/config.py b/Orchestrator/Demo/JUPYTER_01/config.py new file mode 100644 index 00000000..a8a6480f --- /dev/null +++ b/Orchestrator/Demo/JUPYTER_01/config.py @@ -0,0 +1,31 @@ + +from pyOpenRPA import Orchestrator +from pyOpenRPA.Orchestrator.Managers import ControlPanel +from pyOpenRPA.Orchestrator.Managers import Process +from pyOpenRPA.Tools import CrossOS + +import os +import sys +import socket +import datetime +import urllib.parse +import time +g_cp_name_str = "CP_JUPYTER" +g_repo_name_str = os.path.abspath(__file__).split("\\")[-5] +g_repo_package_path_str = os.path.abspath("\\".join(os.path.abspath(__file__).split("\\")[:-1])) +#g_repo_package_path_str = os.path.join(g_repo_path_str, "Orchestrator","Demo","JUPITER_01") +#g_repo_package_path_str = os.path.join(g_repo_package_path_str, g_cp_name_str) + + +# User settings +g_host_str = socket.gethostname().upper() # Identify PC + +time.sleep(2) + +g_control_panel = ControlPanel(inControlPanelNameStr=g_cp_name_str, + inRefreshHTMLJinja2TemplatePathStr=os.path.join(g_repo_package_path_str, "html_jinja2.xhtml"), + inJinja2TemplateRefreshBool=True,inRobotNameStr=g_repo_name_str) +g_jinja_context_dict = {"settings": sys.modules[__name__], + "urllib_parse_quote_plus": urllib.parse.quote_plus, "g_host_str": g_host_str, "g_repo_name_str": g_repo_name_str} +g_control_panel.Jinja2DataUpdateDictSet(inJinja2DataUpdateDict=g_jinja_context_dict) +g_control_panel.InitJSJinja2TemplatePathSet(inJinja2TemplatePathStr=os.path.join(g_repo_package_path_str, "js.js")) diff --git a/Orchestrator/Demo/JUPYTER_01/html_jinja2.xhtml b/Orchestrator/Demo/JUPYTER_01/html_jinja2.xhtml new file mode 100644 index 00000000..a9f7bf07 --- /dev/null +++ b/Orchestrator/Demo/JUPYTER_01/html_jinja2.xhtml @@ -0,0 +1,33 @@ +
+
+
+ {{settings.g_cp_name_str}} +
+
+ ИТ - JUPYTER + +
+
+
+
Рабочая область PYTHON JUPYTER.
Сотрудник: {{UserInfoDict["UserNameUpperStr"]}}
+
+
+ + +
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/Orchestrator/Demo/JUPYTER_01/js.js b/Orchestrator/Demo/JUPYTER_01/js.js new file mode 100644 index 00000000..03960ec8 --- /dev/null +++ b/Orchestrator/Demo/JUPYTER_01/js.js @@ -0,0 +1,4 @@ +$(document).ready(function() { + $('#test8-progress').progress(); + +}); diff --git a/Orchestrator/Demo/OPER_01/config.py b/Orchestrator/Demo/OPER_01/config.py new file mode 100644 index 00000000..77989e10 --- /dev/null +++ b/Orchestrator/Demo/OPER_01/config.py @@ -0,0 +1,23 @@ + +from pyOpenRPA import Orchestrator +from pyOpenRPA.Orchestrator.Managers import ControlPanel +import time +import os +import sys +import socket +import datetime +import urllib.parse +time.sleep(1.5) +g_cp_name_str = "OPER_00" +g_repo_name_str = os.path.abspath(__file__).split("\\")[-5] +g_repo_package_cp_path_str = os.path.abspath("\\".join(os.path.abspath(__file__).split("\\")[:-1])) + +# User settings +g_host_str = socket.gethostname().upper() # Identify PC + +g_control_panel = ControlPanel(inControlPanelNameStr=g_cp_name_str, + inRefreshHTMLJinja2TemplatePathStr=os.path.join(g_repo_package_cp_path_str, "html_jinja2.xhtml"), + inJinja2TemplateRefreshBool=True,inRobotNameStr=g_repo_name_str) +g_jinja_context_dict = {"settings": sys.modules[__name__], + "urllib_parse_quote_plus": urllib.parse.quote_plus, "g_host_str": g_host_str, "g_repo_name_str": g_repo_name_str} +g_control_panel.Jinja2DataUpdateDictSet(inJinja2DataUpdateDict=g_jinja_context_dict) diff --git a/Orchestrator/Demo/OPER_01/html_jinja2.xhtml b/Orchestrator/Demo/OPER_01/html_jinja2.xhtml new file mode 100644 index 00000000..0525c66c --- /dev/null +++ b/Orchestrator/Demo/OPER_01/html_jinja2.xhtml @@ -0,0 +1,85 @@ +
+
+
+ OPER_00 +
+
+ ОПЕРАЦИОНИСТ + +
+
+
Робот бухгалтер.
+ Сотрудник: {{UserInfoDict["UserNameUpperStr"]}} +
+
+
+ + Статус за 05.04.2022: +
+
+ +
+
Шаг 1: Выгрузка
+
Ежедневно в 08:22 (STARTED)
+
+ +
+
+ +
+
Шаг 2: Опрос
+
Производить до 12:00
+
+ +
+
+ +
+ +
Шаг 3: Отчет
+
Отправка вручную в период с 12:00 до 12:30
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+ \ No newline at end of file diff --git a/Orchestrator/Demo/TREASURER_01/config.py b/Orchestrator/Demo/TREASURER_01/config.py index 3e50bc20..d2975eb3 100644 --- a/Orchestrator/Demo/TREASURER_01/config.py +++ b/Orchestrator/Demo/TREASURER_01/config.py @@ -1,18 +1,22 @@ +import time +time.sleep(1) + + splitter1 = 'Рабочий процесс' splitter2 = 'Окно настройки робота' -title = 'Казначей' +title = 'КАЗНАЧЕЙ' introHeader = 'Применение:' introText = 'Робот-казначей выполняет выгрузку банковских выписок' -workflowHeader1 = 'Авторизация в клиент-банке' +workflowHeader1 = 'Шаг 1: Авторизация в клиент-банке' workflowDescription1 = 'Выполняет робот' workflowHint1 = 'Авторизация на сайте банка' -workflowHeader2 = 'Выгрузка выписок' +workflowHeader2 = 'Шаг 2: Выгрузка выписок' workflowDescription2 = 'Выполняет робот' workflowHint2 = 'Скачивание выписок с сайта банка' -workflowHeader3 = 'Перенаправление выписок' +workflowHeader3 = 'Шаг 3: Перенаправление выписок' workflowDescription3 = 'Выполняет робот' workflowHint3 = 'Например, размещение в сетевой папке' @@ -25,7 +29,7 @@ dropBankAccountTitle = 'Выберите счет' dropBankAccount1 = 'Счет 1' dropBankAccount2 = 'Счет 2' dropBankAccount3 = 'Счет 3' -dropBankAccountAll = 'Все' +dropBankAccountAll = 'Счет XY' checkboxPerTitle = 'Период:' checkboxPer1 = 'За день' @@ -68,21 +72,21 @@ html = f'''
- +
{workflowHeader1}
{workflowDescription1}
- +
{workflowHeader2}
{workflowDescription2}
- +
{workflowHeader3}
{workflowDescription3}
@@ -103,7 +107,7 @@ html = f'''


- diff --git a/Orchestrator/Demo/TREASURER_01/index.html b/Orchestrator/Demo/TREASURER_01/index.html index eba87332..c429188b 100644 --- a/Orchestrator/Demo/TREASURER_01/index.html +++ b/Orchestrator/Demo/TREASURER_01/index.html @@ -12,7 +12,7 @@
-

Казначей


+

КАЗНАЧЕЙ


Применение:

Робот-казначей выполняет выгрузку банковских выписок

@@ -22,23 +22,23 @@
- +
-
Авторизация в клиент-банке
+
Шаг 1: Авторизация в клиент-банке
Выполняет робот
- +
-
Выгрузка выписок
+
Шаг 2: Выгрузка выписок
Выполняет робот
- +
-
Перенаправление выписок
+
Шаг 3: Перенаправление выписок
Выполняет робот
@@ -57,9 +57,9 @@


- - + diff --git a/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py b/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py index e2f69a35..f15e9009 100755 --- a/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py +++ b/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py @@ -691,7 +691,7 @@ def OrchestratorPySearchInit(inGlobPatternStr, inDefStr = None, inDefArgNameGSet sys.modules[lModuleNameStr] = lTechModuleFromSpec # Add initialized module in sys - python will not init this module enought lTechSpecificationModuleLoader = lTechSpecification.loader.exec_module(lTechModuleFromSpec) lItemDict = {"ModuleNameStr": lModuleNameStr, "PyPathStr": lPyPathItemStr, "Module": lTechModuleFromSpec} - if lL: lL.info(f"Модуль .py {lModuleNameStr} был успешно инициализирован") + if lL: lL.info(f"Модуль .py {lModuleNameStr} был успешно инициализирован. Путь к файлу: {lPyPathItemStr}") inResultDict[lModuleNameStr]=lItemDict # Backward compatibility to call def with gsettings when init if inDefStr is not None and inDefStr != "": @@ -701,7 +701,7 @@ def OrchestratorPySearchInit(inGlobPatternStr, inDefStr = None, inDefArgNameGSet lArgDict = {inDefArgNameGSettingsStr:GSettingsGet()} lDef(**lArgDict) except Exception as e: - if lL: lL.exception(f"Exception when init the .py file {os.path.abspath(lPyPathItemStr)}") + if lL: lL.exception(f"Ошибка при инициализации .py файла: {os.path.abspath(lPyPathItemStr)}") # # # # # # # # lResultDict = {} diff --git a/Sources/pyOpenRPA/Resources/Web/orpa/orc.xhtml b/Sources/pyOpenRPA/Resources/Web/orpa/orc.xhtml index 750b3362..d13482be 100755 --- a/Sources/pyOpenRPA/Resources/Web/orpa/orc.xhtml +++ b/Sources/pyOpenRPA/Resources/Web/orpa/orc.xhtml @@ -69,13 +69,12 @@ } .ui.search.dropdown>input.search { width:100%; - font-family:monospace; + font-family:'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif; font-weight: bold; } .ui.search.dropdown>.text { width:100%; - font-family:monospace; - font-weight: bold; + font-family:'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif; } diff --git a/Sources/pyOpenRPA/Robot/UIWeb.py b/Sources/pyOpenRPA/Robot/UIWeb.py index da73a4bd..30b9a105 100755 --- a/Sources/pyOpenRPA/Robot/UIWeb.py +++ b/Sources/pyOpenRPA/Robot/UIWeb.py @@ -177,7 +177,7 @@ def UIOSelectorList(inUIOSelectorStr, inUIO=None) -> list: UIWeb.BrowserChromeStart() UIWeb.PageOpen("https://mail.ru") lUIOSelectorStr = "//*[@id=\"grid\"]/div[2]/div[2]/div[3]/div[1]/ul/li[5]/div/a" - lUIOList = UIOSelectorList(inUIOSelectorStr = lUIOSelectorStr) + lUIOList = UIWeb.UIOSelectorList(inUIOSelectorStr = lUIOSelectorStr) UIWeb.BrowserClose() :param inUIOSelectorStr: XPATH или CSS селектор UI объекта на web странице. Подсказки по CSS: https://devhints.io/css Подсказки по XPath: https://devhints.io/xpath @@ -212,7 +212,7 @@ def UIOSelectorFirst(inUIOSelectorStr, inUIO=None) -> list: UIWeb.BrowserChromeStart() UIWeb.PageOpen("https://mail.ru") lUIOSelectorStr = "//*[@id=\"grid\"]/div[2]/div[2]/div[3]/div[1]/ul/li[5]/div/a" - lUIO = UIOSelectorFirst(inUIOSelectorStr = lUIOSelectorStr) + lUIO = UIWeb.UIOSelectorFirst(inUIOSelectorStr = lUIOSelectorStr) UIWeb.BrowserClose() :param inUIOSelectorStr: XPATH или CSS селектор UI объекта на web странице. Подсказки по CSS: https://devhints.io/css Подсказки по XPath: https://devhints.io/xpath @@ -237,7 +237,7 @@ def UIOTextGet(inUIO) -> str: UIWeb.BrowserChromeStart() UIWeb.PageOpen("https://mail.ru") lUIOSelectorStr = "//*[@id=\"grid\"]/div[2]/div[2]/div[3]/div[1]/ul/li[5]/div/a" - lUIO = UIOSelectorList(inUIOSelectorStr = lUIOSelectorStr)[0] + lUIO = UIWeb.UIOSelectorList(inUIOSelectorStr = lUIOSelectorStr)[0] lTextStr = UIWeb.UIOTextGet(inUIO=lUIO) UIWeb.BrowserClose() @@ -258,7 +258,7 @@ def UIOAttributeGet(inUIO, inAttributeStr) -> str: UIWeb.BrowserChromeStart() UIWeb.PageOpen("https://mail.ru") lUIOSelectorStr = "//*[@id=\"grid\"]/div[2]/div[2]/div[3]/div[1]/ul/li[5]/div/a" - lUIO = UIOSelectorList(inUIOSelectorStr = lUIOSelectorStr)[0] + lUIO = UIWeb.UIOSelectorList(inUIOSelectorStr = lUIOSelectorStr)[0] UIWeb.UIOAttributeGet(inUIO=lUIO, inAttributeStr = "href") UIWeb.BrowserClose() @@ -281,7 +281,7 @@ def UIOAttributeStyleGet(inUIO, inAttributeStr) -> str: UIWeb.BrowserChromeStart() UIWeb.PageOpen("https://mail.ru") lUIOSelectorStr = "//*[@id=\"grid\"]/div[2]/div[2]/div[3]/div[1]/ul/li[5]/div/a" - lUIO = UIOSelectorList(inUIOSelectorStr = lUIOSelectorStr)[0] + lUIO = UIWeb.UIOSelectorList(inUIOSelectorStr = lUIOSelectorStr)[0] UIWeb.UIOAttributeStyleGet(inUIO=lUIO, inAttributeStr = "href") UIWeb.BrowserClose() @@ -304,7 +304,7 @@ def UIOAttributeSet(inUIO, inAttributeStr, inValue): UIWeb.BrowserChromeStart() UIWeb.PageOpen("https://mail.ru") lUIOSelectorStr = "//*[@id=\"grid\"]/div[2]/div[2]/div[3]/div[1]/ul/li[5]/div/a" - lUIO = UIOSelectorList(inUIOSelectorStr = lUIOSelectorStr)[0] + lUIO = UIWeb.UIOSelectorList(inUIOSelectorStr = lUIOSelectorStr)[0] UIWeb.UIOAttributeSet(inUIO=lUIO, inAttributeStr = "href", inValue = "https://mail.ru") UIWeb.BrowserClose() @@ -329,7 +329,7 @@ def UIOAttributeRemove(inUIO, inAttributeStr): UIWeb.BrowserChromeStart() UIWeb.PageOpen("https://mail.ru") lUIOSelectorStr = "//*[@id=\"grid\"]/div[2]/div[2]/div[3]/div[1]/ul/li[5]/div/a" - lUIO = UIOSelectorList(inUIOSelectorStr = lUIOSelectorStr)[0] + lUIO = UIWeb.UIOSelectorList(inUIOSelectorStr = lUIOSelectorStr)[0] UIWeb.UIOAttributeRemove(lUIO, "href") UIWeb.BrowserClose() @@ -352,7 +352,7 @@ def UIOAttributeStyleSet(inUIO, inAttributeStr, inValue): UIWeb.BrowserChromeStart() UIWeb.PageOpen("https://mail.ru") lUIOSelectorStr = "//*[@id=\"grid\"]/div[2]/div[2]/div[3]/div[1]/ul/li[5]/div/a" - lUIO = UIOSelectorList(inUIOSelectorStr = lUIOSelectorStr)[0] + lUIO = UIWeb.UIOSelectorList(inUIOSelectorStr = lUIOSelectorStr)[0] UIWeb.UIOAttributeStyleSet(inUIO=lUIO, inAttributeStr = "color", inValue = "grey") UIWeb.BrowserClose() @@ -377,7 +377,7 @@ def UIOAttributeStyleRemove(inUIO, inAttributeStr:str): UIWeb.BrowserChromeStart() UIWeb.PageOpen("https://mail.ru") lUIOSelectorStr = "//*[@id=\"grid\"]/div[2]/div[2]/div[3]/div[1]/ul/li[5]/div/a" - lUIO = UIOSelectorList(inUIOSelectorStr = lUIOSelectorStr)[0] + lUIO = UIWeb.UIOSelectorList(inUIOSelectorStr = lUIOSelectorStr)[0] UIWeb.UIOAttributeStyleRemove(lUIO, "color") UIWeb.BrowserClose() @@ -400,7 +400,7 @@ def UIOClick(inUIO): UIWeb.BrowserChromeStart() UIWeb.PageOpen("https://mail.ru") lUIOSelectorStr = "//*[@id=\"grid\"]/div[2]/div[2]/div[3]/div[1]/ul/li[5]/div/a" - lUIO = UIOSelectorList(inUIOSelectorStr = lUIOSelectorStr)[0] + lUIO = UIWeb.UIOSelectorList(inUIOSelectorStr = lUIOSelectorStr)[0] UIOClick(inUIO = lUIO) UIWeb.BrowserClose() @@ -419,7 +419,7 @@ def UIOSelectorHighlight(inUIOSelectorStr: str, inIsFirst:bool=False, inDuration UIWeb.BrowserChromeStart() UIWeb.PageOpen("https://mail.ru") lUIOSelectorStr = "//*[@id=\"grid\"]/div[2]/div[2]/div[3]/div[1]/ul/li[5]/div/a" - UIOSelectorHighlight(inUIOSelectorStr = lUIOSelectorStr) + UIWeb.UIOSelectorHighlight(inUIOSelectorStr = lUIOSelectorStr) UIWeb.BrowserClose() :param inUIOSelectorStr: XPATH или CSS селектор UI элемента на web странице. Подсказки по CSS: https://devhints.io/css Подсказки по XPath: https://devhints.io/xpath @@ -475,7 +475,7 @@ def UIOSelectorClick(inUIOSelectorStr: str): UIWeb.BrowserChromeStart() UIWeb.PageOpen("https://mail.ru") lUIOSelectorStr = "//*[@id=\"grid\"]/div[2]/div[2]/div[3]/div[1]/ul/li[5]/div/a" - UIOSelectorClick(inUIOSelectorStr = lUIOSelectorStr) + UIWeb.UIOSelectorClick(inUIOSelectorStr = lUIOSelectorStr) UIWeb.BrowserClose() :param inUIOSelectorStr: XPATH или CSS селектор UI элемента на web странице. Подсказки по CSS: https://devhints.io/css Подсказки по XPath: https://devhints.io/xpath @@ -493,7 +493,7 @@ def UIOSelectorWaitAppear(inUIOSelectorStr:str, inWaitSecFloat:float=UIO_WAIT_SE UIWeb.BrowserChromeStart() UIWeb.PageOpen("https://mail.ru") lUIOSelectorStr = "//*[@id=\"grid\"]/div[2]/div[2]/div[3]/div[1]/ul/li[5]/div/a" - lAppearUIOList = UIOSelectorWaitAppear(inUIOSelectorStr = lUIOSelectorStr) + lAppearUIOList = UIWeb.UIOSelectorWaitAppear(inUIOSelectorStr = lUIOSelectorStr) UIWeb.BrowserClose() :param inUIOSelectorStr: XPATH или CSS селектор UI элемента на web странице. Подсказки по CSS: https://devhints.io/css Подсказки по XPath: https://devhints.io/xpath @@ -525,7 +525,7 @@ def UIOSelectorWaitDisappear(inUIOSelectorStr:str, inWaitSecFloat:float=UIO_WAIT UIWeb.BrowserChromeStart() UIWeb.PageOpen("https://mail.ru") lUIOSelectorStr = "//*[@id=\"grid\"]/div[2]/div[2]/div[3]/div[1]/ul/li[5]/div/a" - UIOSelectorWaitDisappear(inUIOSelectorStr = lUIOSelectorStr) + UIWeb.UIOSelectorWaitDisappear(inUIOSelectorStr = lUIOSelectorStr) UIWeb.BrowserClose() :param inUIOSelectorStr: XPATH или CSS селектор UI элемента на web странице. Подсказки по CSS: https://devhints.io/css Подсказки по XPath: https://devhints.io/xpath @@ -557,7 +557,7 @@ def UIOSelectorDetect(inUIOSelectorStr:str) -> str: from pyOpenRPA.Robot import UIWeb lUIOSelectorStr = "#grid > div.grid-middle > div.grid__main-col.svelte-2y66pa > div.grid_newscol.grid_newscol__more-pulse.svelte-1yvqfic > div.grid__ccol.svelte-1yvqfic > ul > li:nth-child(5) > div > a" lUIOSelectorStr = "//*[@id=\"grid\"]/div[2]/div[2]/div[3]/div[1]/ul/li[5]/div/a" - lResultStr = UIOSelectorDetect(inUIOSelectorStr = lUIOSelectorStr) + lResultStr = UIWeb.UIOSelectorDetect(inUIOSelectorStr = lUIOSelectorStr) :param inUIOSelectorStr: XPATH или CSS селектор UI объекта на web странице. Подсказки по CSS: https://devhints.io/css Подсказки по XPath: https://devhints.io/xpath :type inUIOSelectorStr: str