ITK-dev-shared-components 2.10.0__tar.gz → 2.11.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.10.0 → itk_dev_shared_components-2.11.0}/PKG-INFO +1 -1
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/eflyt/eflyt_login.py +19 -3
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components.egg-info/PKG-INFO +1 -1
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/pyproject.toml +1 -1
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/LICENSE +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/README.md +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/__init__.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/eflyt/__init__.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/eflyt/eflyt_case.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/eflyt/eflyt_search.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/eflyt/eflyt_util.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/graph/__init__.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/graph/authentication.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/graph/common.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/graph/file.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/graph/mail.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/graph/site.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/kmd_nova/__init__.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/kmd_nova/authentication.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/kmd_nova/cpr.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/kmd_nova/nova_cases.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/kmd_nova/nova_documents.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/kmd_nova/nova_notes.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/kmd_nova/nova_objects.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/kmd_nova/nova_tasks.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/kmd_nova/util.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/misc/__init__.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/misc/address_lookup.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/misc/cpr_util.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/misc/cvr_lookup.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/misc/file_util.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/sap/__init__.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/sap/fmcacov.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/sap/gridview_util.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/sap/multi_session.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/sap/opret_kundekontakt.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/sap/sap_login.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/sap/sap_util.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/sap/tree_util.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/smtp/__init__.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components/smtp/smtp_util.py +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components.egg-info/SOURCES.txt +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components.egg-info/dependency_links.txt +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components.egg-info/requires.txt +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/itk_dev_shared_components.egg-info/top_level.txt +0 -0
- {itk_dev_shared_components-2.10.0 → itk_dev_shared_components-2.11.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: itk_dev_shared_components
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.11.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
|
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
"""Module for logging into Eflyt/Daedalus/Whatchamacallit using Selenium"""
|
|
2
|
+
import time
|
|
3
|
+
|
|
2
4
|
from selenium import webdriver
|
|
3
5
|
from selenium.webdriver.common.by import By
|
|
4
|
-
from selenium.
|
|
6
|
+
from selenium.webdriver.remote.webelement import WebElement
|
|
7
|
+
from selenium.common.exceptions import NoSuchElementException, StaleElementReferenceException
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ResilientBrowser(webdriver.Chrome):
|
|
11
|
+
"""A webdriver.Chrome subclass that retries find_element if the element goes stale."""
|
|
12
|
+
def find_element(self, by=By.ID, value = None) -> WebElement:
|
|
13
|
+
element = super().find_element(by, value)
|
|
14
|
+
time.sleep(0.1)
|
|
15
|
+
try:
|
|
16
|
+
element.tag_name
|
|
17
|
+
except StaleElementReferenceException:
|
|
18
|
+
element = super().find_element(by, value)
|
|
19
|
+
return element
|
|
5
20
|
|
|
6
21
|
|
|
7
|
-
def login(username: str, password: str) ->
|
|
22
|
+
def login(username: str, password: str) -> ResilientBrowser:
|
|
8
23
|
"""Log into Eflyt using a password and username.
|
|
9
24
|
|
|
10
25
|
Args:
|
|
@@ -13,8 +28,9 @@ def login(username: str, password: str) -> webdriver.Chrome:
|
|
|
13
28
|
"""
|
|
14
29
|
chrome_options = webdriver.ChromeOptions()
|
|
15
30
|
chrome_options.add_argument("--disable-search-engine-choice-screen")
|
|
16
|
-
browser =
|
|
31
|
+
browser = ResilientBrowser(options=chrome_options)
|
|
17
32
|
browser.maximize_window()
|
|
33
|
+
browser.implicitly_wait(2)
|
|
18
34
|
|
|
19
35
|
browser.get("https://notuskommunal.scandihealth.net/")
|
|
20
36
|
browser.find_element(By.ID, "Login1_UserName").send_keys(username)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: itk_dev_shared_components
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.11.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
|
|
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
|
|
File without changes
|