itk-dev-shared-components 2.6.1__tar.gz → 2.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/PKG-INFO +6 -6
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/eflyt/eflyt_case.py +67 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components.egg-info/PKG-INFO +6 -6
- itk_dev_shared_components-2.7.0/itk_dev_shared_components.egg-info/requires.txt +11 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/pyproject.toml +6 -6
- itk_dev_shared_components-2.6.1/itk_dev_shared_components.egg-info/requires.txt +0 -11
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/LICENSE +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/README.md +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/__init__.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/eflyt/__init__.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/eflyt/eflyt_login.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/eflyt/eflyt_search.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/eflyt/eflyt_util.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/graph/__init__.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/graph/authentication.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/graph/common.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/graph/file.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/graph/mail.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/graph/site.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/kmd_nova/__init__.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/kmd_nova/authentication.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/kmd_nova/cpr.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/kmd_nova/nova_cases.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/kmd_nova/nova_documents.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/kmd_nova/nova_notes.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/kmd_nova/nova_objects.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/kmd_nova/nova_tasks.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/kmd_nova/util.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/misc/__init__.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/misc/address_lookup.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/misc/cpr_util.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/misc/cvr_lookup.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/misc/file_util.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/sap/__init__.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/sap/fmcacov.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/sap/gridview_util.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/sap/multi_session.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/sap/opret_kundekontakt.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/sap/sap_login.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/sap/sap_util.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/sap/tree_util.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/smtp/__init__.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components/smtp/smtp_util.py +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components.egg-info/SOURCES.txt +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components.egg-info/dependency_links.txt +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/itk_dev_shared_components.egg-info/top_level.txt +0 -0
- {itk_dev_shared_components-2.6.1 → itk_dev_shared_components-2.7.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: itk_dev_shared_components
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.7.0
|
|
4
4
|
Summary: Shared components to use in RPA projects
|
|
5
5
|
Author-email: ITK Development <itk-rpa@mkb.aarhus.dk>
|
|
6
6
|
Project-URL: Homepage, https://github.com/itk-dev-rpa/itk-dev-shared-components
|
|
@@ -12,11 +12,11 @@ Requires-Python: >=3.7
|
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
14
|
Requires-Dist: pywin32>=306
|
|
15
|
-
Requires-Dist: msal
|
|
16
|
-
Requires-Dist: requests
|
|
17
|
-
Requires-Dist: beautifulsoup4
|
|
18
|
-
Requires-Dist: selenium==4
|
|
19
|
-
Requires-Dist: uiautomation==2
|
|
15
|
+
Requires-Dist: msal==1.*
|
|
16
|
+
Requires-Dist: requests==2.*
|
|
17
|
+
Requires-Dist: beautifulsoup4==4.*
|
|
18
|
+
Requires-Dist: selenium==4.*
|
|
19
|
+
Requires-Dist: uiautomation==2.*
|
|
20
20
|
Provides-Extra: dev
|
|
21
21
|
Requires-Dist: python-dotenv; extra == "dev"
|
|
22
22
|
Requires-Dist: flake8; extra == "dev"
|
|
@@ -4,6 +4,7 @@ from datetime import date, datetime
|
|
|
4
4
|
|
|
5
5
|
from selenium import webdriver
|
|
6
6
|
from selenium.webdriver.common.by import By
|
|
7
|
+
from selenium.webdriver.common.keys import Keys
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
@dataclass
|
|
@@ -126,3 +127,69 @@ def change_tab(browser: webdriver.Chrome, tab_index: int):
|
|
|
126
127
|
|
|
127
128
|
if current_index != tab_index:
|
|
128
129
|
browser.execute_script(f"__doPostBack('ctl00$ContentPlaceHolder2$ptFanePerson$ImgJournalMap','{tab_index}')")
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
def approve_case(browser: webdriver.Chrome):
|
|
133
|
+
"""Approve a case, even if blocked by a note."""
|
|
134
|
+
change_tab(browser, 0)
|
|
135
|
+
|
|
136
|
+
deadline_field = browser.find_element(By.ID, "ctl00_ContentPlaceHolder2_ptFanePerson_ncPersonTab_txtDeadline")
|
|
137
|
+
deadline_field.clear()
|
|
138
|
+
note_field = browser.find_element(By.ID, "ctl00_ContentPlaceHolder2_ptFanePerson_ncPersonTab_txtDeadlineNote")
|
|
139
|
+
note_field.clear()
|
|
140
|
+
|
|
141
|
+
browser.find_element(By.ID, "ctl00_ContentPlaceHolder2_ptFanePerson_stcPersonTab1_btnGodkend").click()
|
|
142
|
+
browser.find_element(By.ID, "ctl00_ContentPlaceHolder2_ptFanePerson_stcPersonTab1_btnApproveYes").click()
|
|
143
|
+
|
|
144
|
+
approve_persons_button = browser.find_element(By.ID, "ctl00_ContentPlaceHolder2_ptFanePerson_stcPersonTab1_btnGodkendAlle")
|
|
145
|
+
if not approve_persons_button.is_enabled():
|
|
146
|
+
|
|
147
|
+
person_table = browser.find_element(By.ID, "ctl00_ContentPlaceHolder2_GridViewMovingPersons")
|
|
148
|
+
rows = person_table.find_elements(By.TAG_NAME, "tr")
|
|
149
|
+
rows.pop(0)
|
|
150
|
+
|
|
151
|
+
for row in rows:
|
|
152
|
+
row.find_element(By.XPATH, "td[2]").click()
|
|
153
|
+
browser.find_element(By.ID, "ctl00_ContentPlaceHolder2_ptFanePerson_stcPersonTab1_btnGodkend").click()
|
|
154
|
+
approve_button = browser.find_element(By.ID, "ctl00_ContentPlaceHolder2_ptFanePerson_stcPersonTab1_btnApproveYes")
|
|
155
|
+
if approve_button.is_displayed():
|
|
156
|
+
approve_button.click()
|
|
157
|
+
else:
|
|
158
|
+
approve_persons_button.click()
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
def check_all_approved(browser: webdriver.Chrome) -> bool:
|
|
162
|
+
"""Check all inhabiatants in table have a status 'Godkendt'.
|
|
163
|
+
"""
|
|
164
|
+
person_table = browser.find_element(By.ID, "ctl00_ContentPlaceHolder2_GridViewMovingPersons")
|
|
165
|
+
rows = person_table.find_elements(By.TAG_NAME, "tr")
|
|
166
|
+
rows.pop(0)
|
|
167
|
+
|
|
168
|
+
for row in rows:
|
|
169
|
+
row_status = row.find_element(By.XPATH, "td[6]").text
|
|
170
|
+
if row_status != "Godkendt":
|
|
171
|
+
return False
|
|
172
|
+
return True
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
def add_note(browser: webdriver.Chrome, message: str):
|
|
176
|
+
"""Add a note to a case."""
|
|
177
|
+
message = f"{date.today().strftime('%Y-%m-%d')} Besked fra Robot: {message}"
|
|
178
|
+
browser.find_element(By.ID, "ctl00_ContentPlaceHolder2_ptFanePerson_ncPersonTab_ButtonVisOpdater").click()
|
|
179
|
+
|
|
180
|
+
existing_note = browser.find_element(By.ID, "ctl00_ContentPlaceHolder2_ptFanePerson_ncPersonTab_txtVisOpdaterNote").text
|
|
181
|
+
if len(existing_note) > 0:
|
|
182
|
+
message = "\n\n" + message
|
|
183
|
+
browser.find_element(By.ID, "ctl00_ContentPlaceHolder2_ptFanePerson_ncPersonTab_txtVisOpdaterNote").send_keys(Keys.CONTROL+Keys.END)
|
|
184
|
+
|
|
185
|
+
browser.find_element(By.ID, "ctl00_ContentPlaceHolder2_ptFanePerson_ncPersonTab_txtVisOpdaterNote").send_keys(message)
|
|
186
|
+
browser.find_element(By.ID, "ctl00_ContentPlaceHolder2_ptFanePerson_ncPersonTab_btnLongNoteUpdater").click()
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
def get_note_text(browser: webdriver.Chrome) -> str:
|
|
190
|
+
"""Read note text and close the window, returning the value.
|
|
191
|
+
"""
|
|
192
|
+
browser.find_element(By.ID, "ctl00_ContentPlaceHolder2_ptFanePerson_ncPersonTab_ButtonVisOpdater").click()
|
|
193
|
+
text = browser.find_element(By.ID, "ctl00_ContentPlaceHolder2_ptFanePerson_ncPersonTab_txtVisOpdaterNote").text
|
|
194
|
+
browser.find_element(By.ID, "ctl00_ContentPlaceHolder2_ptFanePerson_ncPersonTab_btnLuk").click()
|
|
195
|
+
return text
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: itk_dev_shared_components
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.7.0
|
|
4
4
|
Summary: Shared components to use in RPA projects
|
|
5
5
|
Author-email: ITK Development <itk-rpa@mkb.aarhus.dk>
|
|
6
6
|
Project-URL: Homepage, https://github.com/itk-dev-rpa/itk-dev-shared-components
|
|
@@ -12,11 +12,11 @@ Requires-Python: >=3.7
|
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
14
|
Requires-Dist: pywin32>=306
|
|
15
|
-
Requires-Dist: msal
|
|
16
|
-
Requires-Dist: requests
|
|
17
|
-
Requires-Dist: beautifulsoup4
|
|
18
|
-
Requires-Dist: selenium==4
|
|
19
|
-
Requires-Dist: uiautomation==2
|
|
15
|
+
Requires-Dist: msal==1.*
|
|
16
|
+
Requires-Dist: requests==2.*
|
|
17
|
+
Requires-Dist: beautifulsoup4==4.*
|
|
18
|
+
Requires-Dist: selenium==4.*
|
|
19
|
+
Requires-Dist: uiautomation==2.*
|
|
20
20
|
Provides-Extra: dev
|
|
21
21
|
Requires-Dist: python-dotenv; extra == "dev"
|
|
22
22
|
Requires-Dist: flake8; extra == "dev"
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "itk_dev_shared_components"
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.7.0"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="ITK Development", email="itk-rpa@mkb.aarhus.dk" },
|
|
10
10
|
]
|
|
@@ -18,11 +18,11 @@ classifiers = [
|
|
|
18
18
|
]
|
|
19
19
|
dependencies = [
|
|
20
20
|
"pywin32 >= 306",
|
|
21
|
-
"msal
|
|
22
|
-
"requests
|
|
23
|
-
"beautifulsoup4
|
|
24
|
-
"selenium==4
|
|
25
|
-
"uiautomation == 2
|
|
21
|
+
"msal == 1.*",
|
|
22
|
+
"requests == 2.*",
|
|
23
|
+
"beautifulsoup4 == 4.*",
|
|
24
|
+
"selenium == 4.*",
|
|
25
|
+
"uiautomation == 2.*"
|
|
26
26
|
]
|
|
27
27
|
|
|
28
28
|
[project.urls]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|