wcp-library 1.6.8__py3-none-any.whl → 1.6.9__py3-none-any.whl

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.
wcp_library/__init__.py CHANGED
@@ -42,7 +42,7 @@ def divide_chunks(list_obj: list, size: int) -> Generator:
42
42
 
43
43
 
44
44
  def retry(
45
- exceptions: tuple[Type[Exception]],
45
+ exceptions: tuple,
46
46
  max_attempts: Optional[int] = MAX_ATTEMPTS,
47
47
  delay: Optional[int] = DELAY,
48
48
  backoff: Optional[int] = BACKOFF,
@@ -87,7 +87,7 @@ def retry(
87
87
 
88
88
 
89
89
  def async_retry(
90
- exceptions: tuple[Type[Exception]],
90
+ exceptions: tuple,
91
91
  max_attempts: Optional[int] = MAX_ATTEMPTS,
92
92
  delay: Optional[int] = DELAY,
93
93
  backoff: Optional[int] = BACKOFF,
@@ -185,7 +185,7 @@ class BaseSelenium(UIInteractions, WEInteractions):
185
185
  time.sleep(wait_time)
186
186
 
187
187
  def switch_to_window(
188
- self, window_handle: Optional[str] = None
188
+ self, window_handle: Optional[str | list] = None
189
189
  ) -> Optional[Dict[str, list]]:
190
190
  """
191
191
  Switches the browser context to a new window.
@@ -194,10 +194,8 @@ class BaseSelenium(UIInteractions, WEInteractions):
194
194
  Otherwise, it will attempt to switch to a newly opened window that is different
195
195
  from the current one.
196
196
 
197
- :param window_handle: The handle of the window to switch to.
198
- If None, the method will search for a new window handle.
199
- :return: A dictionary containing the original window handle, the new window handle,
200
- and a list of all window handles at the time of switching.
197
+ :param window_handle: The handle of the window to switch to. If None, the method will search for a new window handle.
198
+ :return: A dictionary containing the original window handle, the new window handle, and a list of all window handles at the time of switching.
201
199
  :raises RuntimeError: If the WebDriver is not initialized.
202
200
  """
203
201
 
@@ -223,8 +221,7 @@ class BaseSelenium(UIInteractions, WEInteractions):
223
221
  """
224
222
  Closes a browser window. If a specific window handle is provided, the driver
225
223
  will close that window. Otherwise, the current window will be closed.
226
- :param window_handle: The handle of the window to close.
227
- If None, the current window will be closed.
224
+ :param window_handle: The handle of the window to close. If None, the current window will be closed.
228
225
  :return: None
229
226
  """
230
227
  if window_handle:
@@ -230,7 +230,7 @@ class UIInteractions(Interactions):
230
230
  self,
231
231
  elements: list[dict],
232
232
  wait_time: Optional[float] = 0,
233
- ) -> None:
233
+ ) -> WebElement:
234
234
  """Get the first available WebElement from a list of element dictionaries.
235
235
 
236
236
  Each dictionary can contain:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: wcp-library
3
- Version: 1.6.8
3
+ Version: 1.6.9
4
4
  Summary: Common utilites for internal development at WCP
5
5
  Author: Mitch-Petersen
6
6
  Author-email: mitch.petersen@wcap.ca
@@ -1,7 +1,7 @@
1
- wcp_library/__init__.py,sha256=WXIU8COP7iejbj4wnqB9fG9vTyBkGO52Jp1Rrx1wndE,4249
1
+ wcp_library/__init__.py,sha256=mW6D4FezFpJdviOAlGfk2r9uuwpWFOa3BKs2NyEPSjY,4215
2
2
  wcp_library/browser_automation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- wcp_library/browser_automation/browser.py,sha256=5m5bD-vV6GFydUUdr_PblqFTnKjwUKiuiJ0VuAiQCqc,11273
4
- wcp_library/browser_automation/interactions.py,sha256=VS0iX1liYY4SMkj7n4BJ6poT7l9PihkIL8rK-EeFlV0,30776
3
+ wcp_library/browser_automation/browser.py,sha256=XQU0lp_fHm5xVTSmodqmN0sEH10Rg4z-Xgem6nJgn7w,11256
4
+ wcp_library/browser_automation/interactions.py,sha256=4fkaZ0N4xU2FZIbo-LWQXoPLyOf04Kh06ngwMQCSudk,30782
5
5
  wcp_library/credentials/__init__.py,sha256=cfClJuFs9E3o_-5IPSKVJrkhQTiC3S2HhnZdrab9L6U,1856
6
6
  wcp_library/credentials/_credential_manager_asynchronous.py,sha256=3ZqiQ4sVN8oeX_FYwSbYpNrf-rEJWTpPy0HNQROZVT8,6348
7
7
  wcp_library/credentials/_credential_manager_synchronous.py,sha256=AtXa__HgPCGc27hWUTiflFR1PF1TjtxQJZBMs05y-dk,5728
@@ -23,6 +23,6 @@ wcp_library/sql/__init__.py,sha256=fgewoQeGWIkVXwPWvt2_PRyDBajaSq2ztanOYezRcqY,2
23
23
  wcp_library/sql/oracle.py,sha256=hsZbnuCxEZuUdZ8Z4FVRjxAcIjkMNkHMzLEAiT51nQY,19321
24
24
  wcp_library/sql/postgres.py,sha256=cLOurfmad3WqJcE7FiSxUyzo_0patpfMcTfQAoiteuU,18525
25
25
  wcp_library/time.py,sha256=ktSzhK7SZnGPNXobFexnhFGQAcriLCJQKxnO0fed8fQ,1740
26
- wcp_library-1.6.8.dist-info/METADATA,sha256=vZpqPtU0de9Q93vxl8J18J7I-uFo2gxtlBVh8bxCCTA,1393
27
- wcp_library-1.6.8.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
28
- wcp_library-1.6.8.dist-info/RECORD,,
26
+ wcp_library-1.6.9.dist-info/METADATA,sha256=xDgYqywf8DpqxG3LCFum6Spv_QUO4ahgnDHIweYwFhQ,1393
27
+ wcp_library-1.6.9.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
28
+ wcp_library-1.6.9.dist-info/RECORD,,