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

@@ -13,7 +13,7 @@ class ButtonUtils:
13
13
  """
14
14
 
15
15
  @staticmethod
16
- def __findByPartialLabelText(wait: WebDriverWait, label: str):
16
+ def _findByPartialLabelText(wait: WebDriverWait, label: str):
17
17
  """
18
18
  Finds a button by its label.
19
19
 
@@ -26,7 +26,7 @@ class ButtonUtils:
26
26
  WebElement representing the button.
27
27
 
28
28
  Example:
29
- component = ButtonUtils.__findByLabelText(wait, "Submit")
29
+ component = ButtonUtils._findByPartialLabelText(wait, "Submit")
30
30
  """
31
31
  xpath = f".//button[./span[contains(translate(normalize-space(.), '\u00a0', ' '), '{label}')]]"
32
32
  try:
@@ -36,7 +36,7 @@ class ButtonUtils:
36
36
  return component
37
37
 
38
38
  @staticmethod
39
- def __findByLabelText(wait: WebDriverWait, label: str):
39
+ def _findByLabelText(wait: WebDriverWait, label: str):
40
40
  """
41
41
  Finds a button by its label.
42
42
 
@@ -49,9 +49,9 @@ class ButtonUtils:
49
49
  WebElement representing the button.
50
50
 
51
51
  Example:
52
- component = ButtonUtils.__findByLabelText(wait, "Submit")
52
+ component = ButtonUtils._findByLabelText(wait, "Submit")
53
53
  """
54
- xpath = f".//button[./span[normalize-space(text())='{label}']]"
54
+ xpath = f".//button[./span[normalize-space(.)='{label}']]"
55
55
  try:
56
56
  component = wait.until(EC.element_to_be_clickable((By.XPATH, xpath)))
57
57
  except Exception as e:
@@ -68,7 +68,7 @@ class ButtonUtils:
68
68
  Example:
69
69
  ButtonUtils.clickByPartialLabelText(wait, "Button Label")
70
70
  """
71
- component = ButtonUtils.__findByPartialLabelText(wait, label)
71
+ component = ButtonUtils._findByPartialLabelText(wait, label)
72
72
  component.click()
73
73
 
74
74
  @staticmethod
@@ -81,7 +81,7 @@ class ButtonUtils:
81
81
  Example:
82
82
  ButtonUtils.clickByLabelText(wait, "Button Label")
83
83
  """
84
- component = ButtonUtils.__findByLabelText(wait, label)
84
+ component = ButtonUtils._findByLabelText(wait, label)
85
85
  component.click()
86
86
 
87
87
  @staticmethod
@@ -25,7 +25,7 @@ class DropdownUtils:
25
25
  Example:
26
26
  component = DropdownUtils.__findComboboxByPartialLabelText(wait, "Dropdown Label")
27
27
  """
28
- xpath = f'.//div[./div/span[contains(normalize-space(text()), "{label}")]]/div/div/div/div[@role="combobox" and not(@aria-disabled="true")]' # noqa: E501
28
+ xpath = f'.//div[./div/span[contains(normalize-space(.), "{label}")]]/div/div/div/div[@role="combobox" and not(@aria-disabled="true")]' # noqa: E501
29
29
  try:
30
30
  component = wait.until(EC.element_to_be_clickable((By.XPATH, xpath)))
31
31
  except Exception as e:
@@ -44,7 +44,7 @@ class DropdownUtils:
44
44
  Example:
45
45
  component = DropdownUtils.__findComboboxByLabelText(wait, "Dropdown Label")
46
46
  """
47
- xpath = f'.//div[./div/span[normalize-space(text())="{label}"]]/div/div/div/div[@role="combobox" and not(@aria-disabled="true")]' # noqa: E501
47
+ xpath = f'.//div[./div/span[normalize-space(.)="{label}"]]/div/div/div/div[@role="combobox" and not(@aria-disabled="true")]' # noqa: E501
48
48
  try:
49
49
  component = wait.until(EC.element_to_be_clickable((By.XPATH, xpath)))
50
50
  except Exception as e:
@@ -96,7 +96,7 @@ class DropdownUtils:
96
96
  print("The value does not exist in the dropdown.")
97
97
  """
98
98
 
99
- xpath = f'.//div/ul[@id="{dropdown_option_id}"]/li[./div[normalize-space(text())="{value}"]]'
99
+ xpath = f'.//div/ul[@id="{dropdown_option_id}"]/li[./div[normalize-space(.)="{value}"]]'
100
100
  try:
101
101
  wait.until(EC.element_to_be_clickable((By.XPATH, xpath)))
102
102
  return True
@@ -116,7 +116,7 @@ class DropdownUtils:
116
116
  Example:
117
117
  DropdownUtils.selectDropdownValueByDropdownOptionId(wait, "dropdown_option_id", "Option Value")
118
118
  """
119
- option_xpath = f'.//div/ul[@id="{dropdown_option_id}"]/li[./div[normalize-space(text())="{value}"]]'
119
+ option_xpath = f'.//div/ul[@id="{dropdown_option_id}"]/li[./div[normalize-space(.)="{value}"]]'
120
120
  try:
121
121
  try:
122
122
  component = wait.until(EC.presence_of_element_located((By.XPATH, option_xpath)))
@@ -172,7 +172,7 @@ class DropdownUtils:
172
172
  else:
173
173
  print("The dropdown is editable.")
174
174
  """
175
- xpath = f'.//div[./div/span[normalize-space(text())="{label}"]]/div/div/p[text()]'
175
+ xpath = f'.//div[./div/span[normalize-space(.)="{label}"]]/div/div/p[text()]'
176
176
  try:
177
177
  wait._driver.find_element(By.XPATH, xpath)
178
178
  return True
@@ -31,7 +31,7 @@ class InputUtils:
31
31
  A list of Selenium WebElement representing the input components.
32
32
 
33
33
  Example:
34
- InputUtils.__findInputComponentsByXpath(wait, './/div/label[normalize-space(text())="Username"]')
34
+ InputUtils.__findInputComponentsByXpath(wait, './/div/label[normalize-space(.)="Username"]')
35
35
  """
36
36
  label_components = ComponentUtils.findComponentsByXPath(wait, xpath)
37
37
  input_components = []
@@ -62,7 +62,7 @@ class InputUtils:
62
62
  Example:
63
63
  InputUtils.__findInputComponentsByPartialLabel(wait, "Username")
64
64
  """
65
- xpath = f'.//div/label[contains(normalize-space(text()), "{label}")]'
65
+ xpath = f'.//div/label[contains(normalize-space(.), "{label}")]'
66
66
  components = InputUtils.__findInputComponentsByXpath(wait, xpath)
67
67
  return components
68
68
 
@@ -80,7 +80,7 @@ class InputUtils:
80
80
  Example:
81
81
  InputUtils.__findComponentsByLabel(wait, "Username")
82
82
  """
83
- xpath = f'.//div/label[normalize-space(text())="{label}"]'
83
+ xpath = f'.//div/label[normalize-space(.)="{label}"]'
84
84
  components = InputUtils.__findInputComponentsByXpath(wait, xpath)
85
85
  return components
86
86
 
@@ -8,13 +8,13 @@ class LabelUtils:
8
8
  Utility class for interacting with label components in Appian UI.
9
9
  Usage Example:
10
10
  # Find a label by its text
11
- component = LabelUtils.findByLabelText(wait, "Submit")
11
+ component = LabelUtils._findByLabelText(wait, "Submit")
12
12
  # Click a label by its text
13
13
  LabelUtils.clickByLabelText(wait, "Submit")
14
14
  """
15
15
 
16
16
  @staticmethod
17
- def findByLabelText(wait: WebDriverWait, label: str):
17
+ def _findByLabelText(wait: WebDriverWait, label: str):
18
18
  """
19
19
  Finds a label element by its text.
20
20
 
@@ -22,11 +22,11 @@ class LabelUtils:
22
22
  :param label: The text of the label to find.
23
23
  :return: WebElement representing the label.
24
24
  Example:
25
- component = LabelUtils.findByLabelText(wait, "Submit")
25
+ component = LabelUtils._findByLabelText(wait, "Submit")
26
26
  """
27
- xpath = f".//*[normalize-space(text())='{label}']"
27
+ xpath = f".//*[normalize-space(.)='{label}']"
28
28
  try:
29
- component = wait.until(EC.presence_of_element_located((By.XPATH, xpath)))
29
+ component = wait.until(EC.element_to_be_clickable((By.XPATH, xpath)))
30
30
  except Exception as e:
31
31
  raise RuntimeError(f"Label with text '{label}' not found.") from e
32
32
 
@@ -42,5 +42,5 @@ class LabelUtils:
42
42
  Example:
43
43
  LabelUtils.clickByLabelText(wait, "Submit")
44
44
  """
45
- component = LabelUtils.findByLabelText(wait, label)
45
+ component = LabelUtils._findByLabelText(wait, label)
46
46
  component.click()
@@ -19,7 +19,7 @@ class LinkUtils:
19
19
 
20
20
  @staticmethod
21
21
  def find(wait: WebDriverWait, label: str):
22
- xpath = f'.//a[normalize-space(text())="{label}"]'
22
+ xpath = f'.//a[normalize-space(.)="{label}"]'
23
23
  try:
24
24
  component = wait.until(EC.element_to_be_clickable((By.XPATH, xpath)))
25
25
  except TimeoutError as e:
@@ -22,7 +22,7 @@ class SearchDropdownUtils:
22
22
  raise RuntimeError(f"Failed to locate or click input component with ID '{input_component_id}': {e}")
23
23
  InputUtils._setValueByComponent(input_component, value)
24
24
 
25
- xpath = f'.//ul[@id="{dropdown_option_id}"]/li[./div[normalize-space(text())="{value}"]][1]'
25
+ xpath = f'.//ul[@id="{dropdown_option_id}"]/li[./div[normalize-space(.)="{value}"]][1]'
26
26
  try:
27
27
  component = wait.until(EC.element_to_be_clickable((By.XPATH, xpath)))
28
28
  except Exception as e:
@@ -31,7 +31,7 @@ class SearchDropdownUtils:
31
31
 
32
32
  @staticmethod
33
33
  def __selectSearchDropdownValueByPartialLabelText(wait: WebDriverWait, label: str, value: str):
34
- xpath = f'.//div[./div/span[contains(normalize-space(text()), "{label}")]]/div/div/div/div[@role="combobox" and not(@aria-disabled="true")]'
34
+ xpath = f'.//div[./div/span[contains(normalize-space(.), "{label}")]]/div/div/div/div[@role="combobox" and not(@aria-disabled="true")]'
35
35
  try:
36
36
  component = wait.until(EC.element_to_be_clickable((By.XPATH, xpath)))
37
37
  except Exception as e:
@@ -44,7 +44,7 @@ class SearchDropdownUtils:
44
44
 
45
45
  @staticmethod
46
46
  def __selectSearchDropdownValueByLabelText(wait: WebDriverWait, label: str, value: str):
47
- xpath = f'.//div[./div/span[normalize-space(text())="{label}"]]/div/div/div/div[@role="combobox" and not(@aria-disabled="true")]'
47
+ xpath = f'.//div[./div/span[normalize-space(.)="{label}"]]/div/div/div/div[@role="combobox" and not(@aria-disabled="true")]'
48
48
  try:
49
49
  component = wait.until(EC.element_to_be_clickable((By.XPATH, xpath)))
50
50
  except Exception as e:
@@ -28,8 +28,9 @@ class SearchInputUtils:
28
28
  dropdown_list_id = search_input_component.get_attribute(attribute)
29
29
  if dropdown_list_id:
30
30
  InputUtils._setValueByComponent(search_input_component, value)
31
- xpath = f".//ul[@id='{dropdown_list_id}' and @role='listbox' ]/li[@role='option']/div/div/div/div/div/div/p[text()='{value}'][1]"
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
+ drop_down_item = wait.until(EC.presence_of_element_located((By.XPATH, xpath)))
33
34
  drop_down_item = wait.until(EC.element_to_be_clickable((By.XPATH, xpath)))
34
35
  except TimeoutError as e:
35
36
  raise TimeoutError(
@@ -49,7 +50,7 @@ class SearchInputUtils:
49
50
 
50
51
  @staticmethod
51
52
  def __selectSearchInputComponentsByPartialLabelText(wait: WebDriverWait, label: str, value: str):
52
- xpath = f".//div[./div/span[contains(normalize-space(text())='{label}']]/div/div/div/input[@role='combobox']"
53
+ xpath = f".//div[./div/span[contains(normalize-space(.)='{label}']]/div/div/div/input[@role='combobox']"
53
54
  SearchInputUtils.__findSearchInputComponentsByLabelPathAndSelectValue(wait, xpath, value)
54
55
 
55
56
  @staticmethod
@@ -33,7 +33,7 @@ class TabUtils:
33
33
  Example:
34
34
  component = TabUtils.findSelectedTabByLabelText(wait, "Tab Label")
35
35
  """
36
- xpath = f".//div[./div[./div/div/div/div/div/p/strong[normalize-space(text())='{label}']]/span[text()='Selected Tab.']]/div[@role='link']"
36
+ xpath = f".//div[./div[./div/div/div/div/div/p/strong[normalize-space(.)='{label}']]/span[text()='Selected Tab.']]/div[@role='link']"
37
37
  try:
38
38
  component = wait.until(EC.element_to_be_clickable((By.XPATH, xpath)))
39
39
  except TimeoutError as e:
@@ -56,7 +56,7 @@ class ComponentDriver:
56
56
  case "Label":
57
57
  match action:
58
58
  case "Find":
59
- LabelUtils.findByLabelText(wait, label)
59
+ LabelUtils._findByLabelText(wait, label)
60
60
  case _:
61
61
  raise ValueError(f"Unsupported action for {type}: {action}")
62
62
  case "Link":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: robo_appian
3
- Version: 0.0.13
3
+ Version: 0.0.15
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
@@ -53,7 +53,6 @@ ButtonUtils.clickByLabelText(wait, "Sign In")
53
53
  ## Project Structure
54
54
  - `robo_appian/` - Library source code
55
55
  - `docs/` - Documentation and guides
56
- - `examples/` - Example test scripts
57
56
 
58
57
  ## Contributing
59
58
  Contributions are welcome! Please see the [contributing guidelines](CONTRIBUTING.md) or open an issue to get started.
@@ -0,0 +1,22 @@
1
+ robo_appian/__init__.py,sha256=6u9n2W7P1IKSSr5IPGsg7LhVR1o1uYv424mXDjJLgb0,720
2
+ robo_appian/components/ButtonUtils.py,sha256=_FUote6eBekTAq7KsFJvE301ZRbmnjYr_-56I-JDRVg,3593
3
+ robo_appian/components/DateUtils.py,sha256=9scKYCyJavVyHzoHVfe1cdW2rEp4NAXsP5Zs_CV3fwk,3252
4
+ robo_appian/components/DropdownUtils.py,sha256=X_ucR4uCiU3fnsMXGnJC9PTfwbfW3w3ulzyuURh1Vlw,11149
5
+ robo_appian/components/InputUtils.py,sha256=21MsMuGHwUtpTmZdwUxVrpePMr2Kdy7aOZ6kqPV4lQ4,6423
6
+ robo_appian/components/LabelUtils.py,sha256=LnznYetS9ZOW6nWUXNzWoVREjNH7H4EK_EX0imJqbfo,1578
7
+ robo_appian/components/LinkUtils.py,sha256=PS3U_o8BpTu5gFLHKPTGcUrs0Qo2H8qHNueKuXTC_y4,1514
8
+ robo_appian/components/SearchDropdownUtils.py,sha256=bbyDJ_Q-kJY9NK7MI9lhvwpNw-6siMGjHKwRaESyGSM,4027
9
+ robo_appian/components/SearchInputUtils.py,sha256=bBKXDWT2O4ZKoUz-YbLjnOhy56Af2OR9g707buQ7Y2w,3487
10
+ robo_appian/components/TabUtils.py,sha256=bubQUAjJ7vwjbBXxmiu7uOGnmJy2CJj_XWolIzEgKCE,2458
11
+ robo_appian/components/TableUtils.py,sha256=do9FvJIjV0hX2pafrIv5A9-NYxwyMZC-Z4k2Wo1yWs4,5039
12
+ robo_appian/components/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
+ robo_appian/controllers/ComponentDriver.py,sha256=RFaUZD9WNCjNKwCTxhLJLSu8v3SIEjupnXOivHKcIfA,4359
14
+ robo_appian/controllers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
+ robo_appian/exceptions/MyCustomError.py,sha256=DVAkytXNNQNjqyTyCjk6FFd6fr3AsBe57Y19erDSqVs,222
16
+ robo_appian/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
+ robo_appian/utils/ComponentUtils.py,sha256=1tpHMxfZlqlhBbBpoNUP8T-Us1cBeyO80clAalz-U-s,6862
18
+ robo_appian/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
+ robo_appian-0.0.15.dist-info/LICENSE,sha256=g-xR4dRa9_4iFkMoJmED-wE-J5hoxbk3105Knhfpjm0,1068
20
+ robo_appian-0.0.15.dist-info/METADATA,sha256=iBQ1UH8RGuA_tVrYhVxVDdHiNbMeUhuFS0c7e0FA5Jw,2261
21
+ robo_appian-0.0.15.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
22
+ robo_appian-0.0.15.dist-info/RECORD,,
@@ -1,22 +0,0 @@
1
- robo_appian/__init__.py,sha256=6u9n2W7P1IKSSr5IPGsg7LhVR1o1uYv424mXDjJLgb0,720
2
- robo_appian/components/ButtonUtils.py,sha256=G4IMtzYfj-Rq_taX8qZ8U3gLbz7ajsxZvg9n8l2235o,3597
3
- robo_appian/components/DateUtils.py,sha256=9scKYCyJavVyHzoHVfe1cdW2rEp4NAXsP5Zs_CV3fwk,3252
4
- robo_appian/components/DropdownUtils.py,sha256=OscvU2mAC-ZhTQxB6j4amac4nByGpeu57ak7OLKdyY8,11174
5
- robo_appian/components/InputUtils.py,sha256=6BqkAhKyUUcn9cTHbP97DuPaVU17kGAftstl310RMaE,6438
6
- robo_appian/components/LabelUtils.py,sha256=luT_bY720GJF95sA1fWgu8FB0XiupK3fTNG9jmghQ60,1583
7
- robo_appian/components/LinkUtils.py,sha256=AfJma3ahznMGm771ukAES3qSCBBug6lO5LxzN8PPf6w,1519
8
- robo_appian/components/SearchDropdownUtils.py,sha256=sSe-GnbLL-Va8RvX_bTkcTSd9uPMfcmROlmRa8BEp1U,4042
9
- robo_appian/components/SearchInputUtils.py,sha256=FcRazZ_3J-_XvXOwZhV4TVr-t65kWFG2-RjVH8rlkgo,3356
10
- robo_appian/components/TabUtils.py,sha256=Pq-g61uPbhyfSgC8mt9PBBcdDDnmCcRziltfHGA52qw,2463
11
- robo_appian/components/TableUtils.py,sha256=do9FvJIjV0hX2pafrIv5A9-NYxwyMZC-Z4k2Wo1yWs4,5039
12
- robo_appian/components/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- robo_appian/controllers/ComponentDriver.py,sha256=0GzEXsncWg4oPHGmG48wKeGlrEHxkSX-Ml_NsLIcrvQ,4358
14
- robo_appian/controllers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- robo_appian/exceptions/MyCustomError.py,sha256=DVAkytXNNQNjqyTyCjk6FFd6fr3AsBe57Y19erDSqVs,222
16
- robo_appian/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
- robo_appian/utils/ComponentUtils.py,sha256=1tpHMxfZlqlhBbBpoNUP8T-Us1cBeyO80clAalz-U-s,6862
18
- robo_appian/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
- robo_appian-0.0.13.dist-info/LICENSE,sha256=g-xR4dRa9_4iFkMoJmED-wE-J5hoxbk3105Knhfpjm0,1068
20
- robo_appian-0.0.13.dist-info/METADATA,sha256=hfQgFOStQbfukp-9mOKVEvVX6ybrCJpeUbR3KRL8ONc,2298
21
- robo_appian-0.0.13.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
22
- robo_appian-0.0.13.dist-info/RECORD,,