robo_appian 0.0.16__tar.gz → 0.0.17__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 (22) hide show
  1. {robo_appian-0.0.16 → robo_appian-0.0.17}/PKG-INFO +1 -1
  2. {robo_appian-0.0.16 → robo_appian-0.0.17}/pyproject.toml +1 -1
  3. {robo_appian-0.0.16 → robo_appian-0.0.17}/robo_appian/components/ButtonUtils.py +9 -3
  4. {robo_appian-0.0.16 → robo_appian-0.0.17}/robo_appian/components/DateUtils.py +1 -1
  5. {robo_appian-0.0.16 → robo_appian-0.0.17}/robo_appian/components/InputUtils.py +4 -3
  6. {robo_appian-0.0.16 → robo_appian-0.0.17}/robo_appian/components/LinkUtils.py +0 -2
  7. {robo_appian-0.0.16 → robo_appian-0.0.17}/robo_appian/components/SearchDropdownUtils.py +3 -3
  8. {robo_appian-0.0.16 → robo_appian-0.0.17}/robo_appian/components/SearchInputUtils.py +1 -5
  9. {robo_appian-0.0.16 → robo_appian-0.0.17}/robo_appian/utils/ComponentUtils.py +1 -1
  10. {robo_appian-0.0.16 → robo_appian-0.0.17}/LICENSE +0 -0
  11. {robo_appian-0.0.16 → robo_appian-0.0.17}/README.md +0 -0
  12. {robo_appian-0.0.16 → robo_appian-0.0.17}/robo_appian/__init__.py +0 -0
  13. {robo_appian-0.0.16 → robo_appian-0.0.17}/robo_appian/components/DropdownUtils.py +0 -0
  14. {robo_appian-0.0.16 → robo_appian-0.0.17}/robo_appian/components/LabelUtils.py +0 -0
  15. {robo_appian-0.0.16 → robo_appian-0.0.17}/robo_appian/components/TabUtils.py +0 -0
  16. {robo_appian-0.0.16 → robo_appian-0.0.17}/robo_appian/components/TableUtils.py +0 -0
  17. {robo_appian-0.0.16 → robo_appian-0.0.17}/robo_appian/components/__init__.py +0 -0
  18. {robo_appian-0.0.16 → robo_appian-0.0.17}/robo_appian/controllers/ComponentDriver.py +0 -0
  19. {robo_appian-0.0.16 → robo_appian-0.0.17}/robo_appian/controllers/__init__.py +0 -0
  20. {robo_appian-0.0.16 → robo_appian-0.0.17}/robo_appian/exceptions/MyCustomError.py +0 -0
  21. {robo_appian-0.0.16 → robo_appian-0.0.17}/robo_appian/exceptions/__init__.py +0 -0
  22. {robo_appian-0.0.16 → robo_appian-0.0.17}/robo_appian/utils/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: robo_appian
3
- Version: 0.0.16
3
+ Version: 0.0.17
4
4
  Summary: Automate your Appian code testing with Python. Boost quality, save time.
5
5
  Author: Dinil Mithra
6
6
  Author-email: dinilmithra@mailme@gmail.com
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "robo_appian"
3
- version = "0.0.16"
3
+ version = "0.0.17"
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"
@@ -1,6 +1,7 @@
1
1
  from selenium.webdriver.common.by import By
2
2
  from selenium.webdriver.support import expected_conditions as EC
3
3
  from selenium.webdriver.support.ui import WebDriverWait
4
+ from selenium.webdriver.remote.webelement import WebElement
4
5
 
5
6
 
6
7
  class ButtonUtils:
@@ -12,6 +13,11 @@ class ButtonUtils:
12
13
  ButtonUtils.clickByLabelText(wait, "Submit")
13
14
  """
14
15
 
16
+ @staticmethod
17
+ def __click(wait: WebDriverWait, component: WebElement):
18
+ wait.until(EC.element_to_be_clickable(component))
19
+ component.click()
20
+
15
21
  @staticmethod
16
22
  def _findByPartialLabelText(wait: WebDriverWait, label: str):
17
23
  """
@@ -69,7 +75,7 @@ class ButtonUtils:
69
75
  ButtonUtils.clickByPartialLabelText(wait, "Button Label")
70
76
  """
71
77
  component = ButtonUtils._findByPartialLabelText(wait, label)
72
- component.click()
78
+ ButtonUtils.__click(wait, component)
73
79
 
74
80
  @staticmethod
75
81
  def clickByLabelText(wait: WebDriverWait, label: str):
@@ -82,7 +88,7 @@ class ButtonUtils:
82
88
  ButtonUtils.clickByLabelText(wait, "Button Label")
83
89
  """
84
90
  component = ButtonUtils._findByLabelText(wait, label)
85
- component.click()
91
+ ButtonUtils.__click(wait, component)
86
92
 
87
93
  @staticmethod
88
94
  def clickById(wait: WebDriverWait, id: str):
@@ -102,4 +108,4 @@ class ButtonUtils:
102
108
  except Exception as e:
103
109
  raise RuntimeError(f"Input button with id '{id}' not found or not clickable.") from e
104
110
 
105
- component.click()
111
+ ButtonUtils.__click(wait, component)
@@ -59,7 +59,7 @@ class DateUtils:
59
59
  DateUtils.setValueByLabelText(wait, "Start Date", "2023-10-01")
60
60
  """
61
61
  component = DateUtils.__findComponent(wait, label)
62
- InputUtils._setValueByComponent(component, value)
62
+ InputUtils._setValueByComponent(wait, component, value)
63
63
  return component
64
64
 
65
65
  @staticmethod
@@ -85,7 +85,7 @@ class InputUtils:
85
85
  return components
86
86
 
87
87
  @staticmethod
88
- def _setValueByComponent(component: WebElement, value: str):
88
+ def _setValueByComponent(wait: WebDriverWait, component: WebElement, value: str):
89
89
  """
90
90
  Sets a value in an input component.
91
91
  Parameters:
@@ -96,6 +96,7 @@ class InputUtils:
96
96
  Example:
97
97
  InputUtils._setValueByComponent(component, "test_value")
98
98
  """
99
+ wait.until(EC.element_to_be_clickable(component))
99
100
  component.clear()
100
101
  component.send_keys(value)
101
102
  return component
@@ -115,7 +116,7 @@ class InputUtils:
115
116
  """
116
117
 
117
118
  for component in input_components:
118
- InputUtils._setValueByComponent(component, value)
119
+ InputUtils._setValueByComponent(wait, component, value)
119
120
 
120
121
  @staticmethod
121
122
  def setValueByPartialLabelText(wait: WebDriverWait, label: str, value: str):
@@ -161,5 +162,5 @@ class InputUtils:
161
162
  component = wait.until(EC.element_to_be_clickable((By.ID, component_id)))
162
163
  except Exception as e:
163
164
  raise Exception(f"Timeout or error finding input component with id '{component_id}': {e}")
164
- InputUtils._setValueByComponent(component, value)
165
+ InputUtils._setValueByComponent(wait, component, value)
165
166
  return component
@@ -22,8 +22,6 @@ class LinkUtils:
22
22
  xpath = f'.//a[normalize-space(.)="{label}"]'
23
23
  try:
24
24
  component = wait.until(EC.element_to_be_clickable((By.XPATH, xpath)))
25
- except TimeoutError as e:
26
- raise TimeoutError(f"Could not find clickable link with label '{label}': {e}")
27
25
  except Exception as e:
28
26
  raise Exception(f"Could not find clickable link with label '{label}': {e}")
29
27
  return component
@@ -15,17 +15,17 @@ class SearchDropdownUtils:
15
15
  """
16
16
 
17
17
  @staticmethod
18
- def __selectSearchDropdownValueByDropdownId(wait, component_id, value):
18
+ def __selectSearchDropdownValueByDropdownId(wait: WebDriverWait, component_id: str, value: str):
19
19
  if not component_id:
20
20
  raise ValueError("Invalid component_id provided.")
21
21
 
22
+ input_component_id = str(component_id) + "_searchInput"
22
23
  try:
23
- input_component_id = str(component_id) + "_searchInput"
24
24
  wait.until(EC.presence_of_element_located((By.ID, input_component_id)))
25
25
  input_component = wait.until(EC.element_to_be_clickable((By.ID, input_component_id)))
26
26
  except Exception as e:
27
27
  raise RuntimeError(f"Failed to locate or click input component with ID '{input_component_id}': {e}")
28
- InputUtils._setValueByComponent(input_component, value)
28
+ InputUtils._setValueByComponent(wait, input_component, value)
29
29
 
30
30
  dropdown_option_id = str(component_id) + "_list"
31
31
 
@@ -27,15 +27,11 @@ class SearchInputUtils:
27
27
  attribute: str = "aria-controls"
28
28
  dropdown_list_id = search_input_component.get_attribute(attribute)
29
29
  if dropdown_list_id:
30
- InputUtils._setValueByComponent(search_input_component, value)
30
+ InputUtils._setValueByComponent(wait, search_input_component, value)
31
31
  xpath = f'.//ul[@id="{dropdown_list_id}" and @role="listbox" ]/li[@role="option" and @tabindex="-1" and ./div/div/div/div/div/div/p[normalize-space(.)="{value}"][1]]'
32
32
  try:
33
33
  drop_down_item = wait.until(EC.presence_of_element_located((By.XPATH, xpath)))
34
34
  drop_down_item = wait.until(EC.element_to_be_clickable((By.XPATH, xpath)))
35
- except TimeoutError as e:
36
- raise TimeoutError(
37
- f"Dropdown item with value '{value}' not found for component '{search_input_component.text}'."
38
- ) from e
39
35
  except Exception as e:
40
36
  raise RuntimeError(
41
37
  f"Dropdown item with value '{value}' not found for component '{search_input_component.text}'."
@@ -52,7 +52,7 @@ class ComponentUtils:
52
52
  child_component = ComponentUtils.findChildComponentByXpath(wait, parent_component, xpath)
53
53
  """
54
54
  try:
55
- component = component.find_element(By.XPATH, xpath)
55
+ component = wait.until(lambda comp: component.find_element(By.XPATH, xpath))
56
56
  except Exception:
57
57
  raise Exception(f"Child component with XPath '{xpath}' not found within the given parent component.")
58
58
  return component
File without changes
File without changes