robo_appian 0.0.20__tar.gz → 0.0.21__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.

Potentially problematic release.


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

Files changed (23) hide show
  1. {robo_appian-0.0.20 → robo_appian-0.0.21}/PKG-INFO +4 -2
  2. {robo_appian-0.0.20 → robo_appian-0.0.21}/pyproject.toml +1 -1
  3. robo_appian-0.0.21/robo_appian/utils/BrowserUtils.py +52 -0
  4. {robo_appian-0.0.20 → robo_appian-0.0.21}/robo_appian/utils/ComponentUtils.py +12 -1
  5. {robo_appian-0.0.20 → robo_appian-0.0.21}/LICENSE +0 -0
  6. {robo_appian-0.0.20 → robo_appian-0.0.21}/README.md +0 -0
  7. {robo_appian-0.0.20 → robo_appian-0.0.21}/robo_appian/__init__.py +0 -0
  8. {robo_appian-0.0.20 → robo_appian-0.0.21}/robo_appian/components/ButtonUtils.py +0 -0
  9. {robo_appian-0.0.20 → robo_appian-0.0.21}/robo_appian/components/DateUtils.py +0 -0
  10. {robo_appian-0.0.20 → robo_appian-0.0.21}/robo_appian/components/DropdownUtils.py +0 -0
  11. {robo_appian-0.0.20 → robo_appian-0.0.21}/robo_appian/components/InputUtils.py +0 -0
  12. {robo_appian-0.0.20 → robo_appian-0.0.21}/robo_appian/components/LabelUtils.py +0 -0
  13. {robo_appian-0.0.20 → robo_appian-0.0.21}/robo_appian/components/LinkUtils.py +0 -0
  14. {robo_appian-0.0.20 → robo_appian-0.0.21}/robo_appian/components/SearchDropdownUtils.py +0 -0
  15. {robo_appian-0.0.20 → robo_appian-0.0.21}/robo_appian/components/SearchInputUtils.py +0 -0
  16. {robo_appian-0.0.20 → robo_appian-0.0.21}/robo_appian/components/TabUtils.py +0 -0
  17. {robo_appian-0.0.20 → robo_appian-0.0.21}/robo_appian/components/TableUtils.py +0 -0
  18. {robo_appian-0.0.20 → robo_appian-0.0.21}/robo_appian/components/__init__.py +0 -0
  19. {robo_appian-0.0.20 → robo_appian-0.0.21}/robo_appian/controllers/ComponentDriver.py +0 -0
  20. {robo_appian-0.0.20 → robo_appian-0.0.21}/robo_appian/controllers/__init__.py +0 -0
  21. {robo_appian-0.0.20 → robo_appian-0.0.21}/robo_appian/exceptions/MyCustomError.py +0 -0
  22. {robo_appian-0.0.20 → robo_appian-0.0.21}/robo_appian/exceptions/__init__.py +0 -0
  23. {robo_appian-0.0.20 → robo_appian-0.0.21}/robo_appian/utils/__init__.py +0 -0
@@ -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)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "robo_appian"
3
- version = "0.0.20"
3
+ version = "0.0.21"
4
4
  description = "Automate your Appian code testing with Python. Boost quality, save time."
5
5
  authors = ["Dinil Mithra <dinilmithra@mailme@gmail.com>"]
6
6
  readme = "README.md"
@@ -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
File without changes
File without changes