robo_appian 0.0.20__py3-none-any.whl → 0.0.21__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.

Potentially problematic release.


This version of robo_appian might be problematic. Click here for more details.

@@ -0,0 +1,52 @@
1
+ from selenium.webdriver.support.ui import WebDriverWait
2
+
3
+
4
+ class BrowserUtils:
5
+ @staticmethod
6
+ def switch_to_Tab(wait: WebDriverWait, tab_number):
7
+ """
8
+ Switches to the specified browser tab.
9
+
10
+ :param wait: WebDriverWait instance
11
+ :param tab_number: The index of the tab to switch to
12
+ :return: None
13
+ Example usage:
14
+ BrowserUtils.switch_to_Tab(wait, 1)
15
+ """
16
+
17
+ # Switch to the specified browser tab
18
+ handler = wait._driver.window_handles[tab_number]
19
+ wait._driver.switch_to.window(handler)
20
+
21
+ @staticmethod
22
+ def switch_to_next_tab(wait: WebDriverWait):
23
+ """
24
+ Switches to the next browser tab.
25
+
26
+ :param wait: WebDriverWait instance
27
+ :return: None
28
+ Example usage:
29
+ BrowserUtils.switch_to_next_tab(wait)
30
+ """
31
+ current_tab_index = wait._driver.window_handles.index(
32
+ wait._driver.current_window_handle
33
+ )
34
+ next_tab_index = (current_tab_index + 1) % len(wait._driver.window_handles)
35
+ BrowserUtils.switch_to_Tab(wait, next_tab_index)
36
+
37
+ @staticmethod
38
+ def close_current_tab_and_switch_back(wait: WebDriverWait):
39
+ """
40
+ Closes the current browser tab and switches back to the original tab.
41
+
42
+ :param wait: WebDriverWait instance
43
+ :return: None
44
+ Example usage:
45
+ BrowserUtils.close_current_tab_and_switch_back(wait)
46
+ """
47
+ current_tab_index = wait._driver.window_handles.index(
48
+ wait._driver.current_window_handle
49
+ )
50
+ wait._driver.close()
51
+ original_tab_index = (current_tab_index - 1) % len(wait._driver.window_handles)
52
+ BrowserUtils.switch_to_Tab(wait, original_tab_index)
@@ -238,4 +238,15 @@ class ComponentUtils:
238
238
  try:
239
239
  wait.until(EC.staleness_of(component))
240
240
  except Exception:
241
- raise Exception("Component did not become invisible (stale) within the timeout period.")
241
+ raise Exception("Component did not become invisible (stale) within the timeout period.")
242
+
243
+ @staticmethod
244
+ def isComponentPresentByXpath(wait: WebDriverWait, xpath: str):
245
+ status = False
246
+ try:
247
+ wait.until(EC.presence_of_element_located((By.XPATH, xpath)))
248
+ status = True
249
+ except NoSuchElementException:
250
+ pass
251
+
252
+ return status
@@ -1,7 +1,8 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: robo_appian
3
- Version: 0.0.20
3
+ Version: 0.0.21
4
4
  Summary: Automate your Appian code testing with Python. Boost quality, save time.
5
+ License-File: LICENSE
5
6
  Author: Dinil Mithra
6
7
  Author-email: dinilmithra@mailme@gmail.com
7
8
  Requires-Python: >=3.12,<4.0
@@ -9,6 +10,7 @@ Classifier: Operating System :: OS Independent
9
10
  Classifier: Programming Language :: Python :: 3
10
11
  Classifier: Programming Language :: Python :: 3.12
11
12
  Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: 3.14
12
14
  Requires-Dist: numpy
13
15
  Requires-Dist: requests (>=2.25.1,<3.0.0)
14
16
  Requires-Dist: selenium (>=4.34.0)
@@ -14,9 +14,10 @@ robo_appian/controllers/ComponentDriver.py,sha256=4zKn6Jy71cFsGWqOh7EgQ6NYfRIVvi
14
14
  robo_appian/controllers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  robo_appian/exceptions/MyCustomError.py,sha256=DVAkytXNNQNjqyTyCjk6FFd6fr3AsBe57Y19erDSqVs,222
16
16
  robo_appian/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
- robo_appian/utils/ComponentUtils.py,sha256=qm_55lVSuyu6o5NkqD4N8fSzAxVBxLIlMzzOVomxZiA,8940
17
+ robo_appian/utils/BrowserUtils.py,sha256=Lp0yeHjqstdyA5POqFv4TxGY1TKixApMT6G_nnWadXs,1747
18
+ robo_appian/utils/ComponentUtils.py,sha256=NEzv7IqxaePtIIsziuD9pdrqji9Zo2REQsE5zn2ME5w,9254
18
19
  robo_appian/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
- robo_appian-0.0.20.dist-info/LICENSE,sha256=g-xR4dRa9_4iFkMoJmED-wE-J5hoxbk3105Knhfpjm0,1068
20
- robo_appian-0.0.20.dist-info/METADATA,sha256=8lqgIdQ88C-EvlwwfUXVG2KivdrLIPlwllt4qoAJicQ,2261
21
- robo_appian-0.0.20.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
22
- robo_appian-0.0.20.dist-info/RECORD,,
20
+ robo_appian-0.0.21.dist-info/METADATA,sha256=qs0_pVCEf2YFzHhQHgDuaAFP6IvCpIloaK9GJhwiC3I,2334
21
+ robo_appian-0.0.21.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
22
+ robo_appian-0.0.21.dist-info/licenses/LICENSE,sha256=g-xR4dRa9_4iFkMoJmED-wE-J5hoxbk3105Knhfpjm0,1068
23
+ robo_appian-0.0.21.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.3
2
+ Generator: poetry-core 2.2.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any