robo_appian 0.0.12__py3-none-any.whl → 0.0.14__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.
- robo_appian/components/ButtonUtils.py +37 -1
- robo_appian/utils/ComponentUtils.py +71 -112
- robo_appian-0.0.14.dist-info/METADATA +66 -0
- {robo_appian-0.0.12.dist-info → robo_appian-0.0.14.dist-info}/RECORD +6 -6
- robo_appian-0.0.12.dist-info/METADATA +0 -140
- {robo_appian-0.0.12.dist-info → robo_appian-0.0.14.dist-info}/LICENSE +0 -0
- {robo_appian-0.0.12.dist-info → robo_appian-0.0.14.dist-info}/WHEEL +0 -0
|
@@ -13,7 +13,7 @@ class ButtonUtils:
|
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
15
|
@staticmethod
|
|
16
|
-
def
|
|
16
|
+
def __findByPartialLabelText(wait: WebDriverWait, label: str):
|
|
17
17
|
"""
|
|
18
18
|
Finds a button by its label.
|
|
19
19
|
|
|
@@ -35,6 +35,42 @@ class ButtonUtils:
|
|
|
35
35
|
raise RuntimeError(f"Button with label '{label}' not found or not clickable.") from e
|
|
36
36
|
return component
|
|
37
37
|
|
|
38
|
+
@staticmethod
|
|
39
|
+
def __findByLabelText(wait: WebDriverWait, label: str):
|
|
40
|
+
"""
|
|
41
|
+
Finds a button by its label.
|
|
42
|
+
|
|
43
|
+
Parameters:
|
|
44
|
+
wait: Selenium WebDriverWait instance.
|
|
45
|
+
label: The label of the button to find.
|
|
46
|
+
label: The label of the button to find.
|
|
47
|
+
|
|
48
|
+
Returns:
|
|
49
|
+
WebElement representing the button.
|
|
50
|
+
|
|
51
|
+
Example:
|
|
52
|
+
component = ButtonUtils.__findByLabelText(wait, "Submit")
|
|
53
|
+
"""
|
|
54
|
+
xpath = f".//button[./span[normalize-space(text())='{label}']]"
|
|
55
|
+
try:
|
|
56
|
+
component = wait.until(EC.element_to_be_clickable((By.XPATH, xpath)))
|
|
57
|
+
except Exception as e:
|
|
58
|
+
raise RuntimeError(f"Button with label '{label}' not found or not clickable.") from e
|
|
59
|
+
return component
|
|
60
|
+
|
|
61
|
+
@staticmethod
|
|
62
|
+
def clickByPartialLabelText(wait: WebDriverWait, label: str):
|
|
63
|
+
"""Finds a button by its partial label and clicks it.
|
|
64
|
+
|
|
65
|
+
Parameters:
|
|
66
|
+
wait: Selenium WebDriverWait instance.
|
|
67
|
+
label: The partial label of the button to click.
|
|
68
|
+
Example:
|
|
69
|
+
ButtonUtils.clickByPartialLabelText(wait, "Button Label")
|
|
70
|
+
"""
|
|
71
|
+
component = ButtonUtils.__findByPartialLabelText(wait, label)
|
|
72
|
+
component.click()
|
|
73
|
+
|
|
38
74
|
@staticmethod
|
|
39
75
|
def clickByLabelText(wait: WebDriverWait, label: str):
|
|
40
76
|
"""Finds a button by its label and clicks it.
|
|
@@ -9,11 +9,6 @@ from selenium.webdriver.support.ui import WebDriverWait
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class ComponentUtils:
|
|
12
|
-
"""
|
|
13
|
-
Utility class for interacting with various components in Appian UI.
|
|
14
|
-
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
12
|
@staticmethod
|
|
18
13
|
def today():
|
|
19
14
|
"""
|
|
@@ -40,79 +35,60 @@ class ComponentUtils:
|
|
|
40
35
|
|
|
41
36
|
@staticmethod
|
|
42
37
|
def findChildComponent(wait: WebDriverWait, component: WebElement, xpath: str):
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
38
|
+
"""Finds a child component using the given XPath within a parent component.
|
|
39
|
+
|
|
40
|
+
:param wait: WebDriverWait instance to wait for elements
|
|
41
|
+
:param component: Parent WebElement to search within
|
|
42
|
+
:param xpath: XPath string to locate the child component
|
|
43
|
+
:return: WebElement if found, raises NoSuchElementException otherwise
|
|
44
|
+
Example usage:
|
|
45
|
+
from selenium.webdriver.support.ui import WebDriverWait
|
|
46
|
+
from selenium import webdriver
|
|
47
|
+
|
|
48
|
+
driver = webdriver.Chrome()
|
|
49
|
+
wait = WebDriverWait(driver, 10)
|
|
50
|
+
parent_component = driver.find_element(By.ID, "parent")
|
|
51
|
+
xpath = ".//button[@class='child']"
|
|
52
|
+
child_component = ComponentUtils.findChildComponent(wait, parent_component, xpath)
|
|
56
53
|
"""
|
|
57
|
-
|
|
58
|
-
# The message is normalized to handle any extra spaces.
|
|
59
|
-
# It uses the presence_of_element_located condition to ensure the element is present in the DOM.
|
|
60
|
-
|
|
61
|
-
xpath = f'.//div/div/p/span/strong[normalize-space(text())="{message}"]'
|
|
62
|
-
component = wait.until(EC.presence_of_element_located((By.XPATH, xpath)))
|
|
63
|
-
return component
|
|
54
|
+
return component.find_element(By.XPATH, xpath)
|
|
64
55
|
|
|
65
56
|
@staticmethod
|
|
66
57
|
def findComponentUsingXpathAndClick(wait: WebDriverWait, xpath: str):
|
|
67
|
-
"""
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
Example:
|
|
73
|
-
|
|
58
|
+
"""Finds a component using the given XPath and clicks it.
|
|
59
|
+
|
|
60
|
+
:param wait: WebDriverWait instance to wait for elements
|
|
61
|
+
:param xpath: XPath string to locate the component
|
|
62
|
+
:return: None
|
|
63
|
+
Example usage:
|
|
64
|
+
from selenium.webdriver.support.ui import WebDriverWait
|
|
65
|
+
from selenium import webdriver
|
|
74
66
|
|
|
67
|
+
driver = webdriver.Chrome()
|
|
68
|
+
wait = WebDriverWait(driver, 10)
|
|
69
|
+
xpath = "//button[@id='submit']"
|
|
70
|
+
ComponentUtils.findComponentUsingXpathAndClick(wait, xpath)
|
|
75
71
|
"""
|
|
76
|
-
# This method locates a component using the provided XPath and clicks it.
|
|
77
|
-
# It uses the presence_of_element_located condition to ensure the element is present in the DOM.
|
|
78
|
-
# After locating the component, it clicks it to perform the action.
|
|
79
72
|
component = ComponentUtils.findComponentUsingXpath(wait, xpath)
|
|
80
73
|
component.click()
|
|
81
74
|
|
|
82
75
|
@staticmethod
|
|
83
76
|
def findComponentUsingXpath(wait: WebDriverWait, xpath: str):
|
|
77
|
+
"""Finds a component using the given XPath in the current WebDriver instance.
|
|
78
|
+
|
|
79
|
+
:param wait: WebDriverWait instance to wait for elements
|
|
80
|
+
:param xpath: XPath string to locate the component
|
|
81
|
+
:return: WebElement if found, raises NoSuchElementException otherwise
|
|
82
|
+
Example usage:
|
|
83
|
+
component = ComponentUtils.findComponentUsingXpath(wait, "//button[@id='submit']")
|
|
84
|
+
component.click()
|
|
84
85
|
"""
|
|
85
|
-
Finds a component using its XPath.
|
|
86
|
-
Parameters:
|
|
87
|
-
wait: Selenium WebDriverWait instance.
|
|
88
|
-
xpath: The XPath of the component to find.
|
|
89
|
-
Returns:
|
|
90
|
-
The Selenium WebElement for the component.
|
|
91
|
-
Example:
|
|
92
|
-
ComponentUtils.findComponentUsingXpath(wait, "//button[@id='submit']")
|
|
93
|
-
"""
|
|
94
|
-
# This method locates a component using the provided XPath.
|
|
95
|
-
# It uses the presence_of_element_located condition to ensure the element is present in the DOM.
|
|
96
|
-
# The method returns the WebElement for further interaction.
|
|
97
86
|
component = wait.until(EC.presence_of_element_located((By.XPATH, xpath)))
|
|
98
87
|
return component
|
|
99
88
|
|
|
100
89
|
@staticmethod
|
|
101
90
|
def checkComponentExistsByXpath(wait: WebDriverWait, xpath: str):
|
|
102
|
-
"""
|
|
103
|
-
Checks if a component exists using its XPath.
|
|
104
|
-
Parameters:
|
|
105
|
-
wait: Selenium WebDriverWait instance.
|
|
106
|
-
xpath: The XPath of the component to check.
|
|
107
|
-
Returns:
|
|
108
|
-
True if the component exists, False otherwise.
|
|
109
|
-
Example:
|
|
110
|
-
ComponentUtils.checkComponentExistsByXpath(wait, "//button[@id='submit']")
|
|
111
|
-
"""
|
|
112
|
-
# This method checks if a component exists by attempting to find it using the provided XPath.
|
|
113
|
-
# If the component is found, it returns True; otherwise, it catches the NoSuchElementException and returns False.
|
|
114
|
-
# It uses the presence_of_element_located condition to ensure the element is present in the DOM.
|
|
115
|
-
|
|
91
|
+
"""Checks if a component with the given XPath exists in the current WebDriver instance."""
|
|
116
92
|
status = False
|
|
117
93
|
try:
|
|
118
94
|
ComponentUtils.findComponentUsingXpath(wait, xpath)
|
|
@@ -124,20 +100,15 @@ class ComponentUtils:
|
|
|
124
100
|
|
|
125
101
|
@staticmethod
|
|
126
102
|
def checkComponentExistsById(driver: WebDriver, id: str):
|
|
127
|
-
"""
|
|
128
|
-
Checks if a component exists using its ID.
|
|
129
|
-
Parameters:
|
|
130
|
-
driver: Selenium WebDriver instance.
|
|
131
|
-
id: The ID of the component to check.
|
|
132
|
-
Returns:
|
|
133
|
-
True if the component exists, False otherwise.
|
|
134
|
-
Example:
|
|
135
|
-
ComponentUtils.checkComponentExistsById(driver, "submit-button")
|
|
136
|
-
"""
|
|
137
|
-
# This method checks if a component exists by attempting to find it using the provided ID.
|
|
138
|
-
# If the component is found, it returns True; otherwise, it catches the NoSuchElementException and returns False.
|
|
139
|
-
# It uses the find_element method to locate the element by its ID.
|
|
103
|
+
"""Checks if a component with the given ID exists in the current WebDriver instance.
|
|
140
104
|
|
|
105
|
+
:param driver: WebDriver instance to check for the component
|
|
106
|
+
:param id: ID of the component to check
|
|
107
|
+
:return: True if the component exists, False otherwise
|
|
108
|
+
Example usage:
|
|
109
|
+
exists = ComponentUtils.checkComponentExistsById(driver, "submit-button")
|
|
110
|
+
print(f"Component exists: {exists}")
|
|
111
|
+
"""
|
|
141
112
|
status = False
|
|
142
113
|
try:
|
|
143
114
|
driver.find_element(By.ID, id)
|
|
@@ -149,19 +120,15 @@ class ComponentUtils:
|
|
|
149
120
|
|
|
150
121
|
@staticmethod
|
|
151
122
|
def findCount(wait: WebDriverWait, xpath: str):
|
|
123
|
+
"""Finds the count of components matching the given XPath.
|
|
124
|
+
|
|
125
|
+
:param wait: WebDriverWait instance to wait for elements
|
|
126
|
+
:param xpath: XPath string to locate components
|
|
127
|
+
:return: Count of components matching the XPath
|
|
128
|
+
Example usage:
|
|
129
|
+
count = ComponentUtils.findCount(wait, "//div[@class='item']")
|
|
130
|
+
print(f"Number of items found: {count}")
|
|
152
131
|
"""
|
|
153
|
-
Finds the count of components matching the given XPath.
|
|
154
|
-
Parameters:
|
|
155
|
-
wait: Selenium WebDriverWait instance.
|
|
156
|
-
xpath: The XPath of the components to count.
|
|
157
|
-
Returns:
|
|
158
|
-
The count of components matching the XPath.
|
|
159
|
-
Example:
|
|
160
|
-
count = ComponentUtils.findCount(wait, "//div[@class='item']")
|
|
161
|
-
"""
|
|
162
|
-
# This method locates all components matching the provided XPath and returns their count.
|
|
163
|
-
# It uses the presence_of_all_elements_located condition to ensure all elements are present in the DOM.
|
|
164
|
-
# If no elements are found, it catches the NoSuchElementException and returns 0.
|
|
165
132
|
|
|
166
133
|
length = 0
|
|
167
134
|
|
|
@@ -174,40 +141,32 @@ class ComponentUtils:
|
|
|
174
141
|
return length
|
|
175
142
|
|
|
176
143
|
@staticmethod
|
|
177
|
-
def tab(
|
|
178
|
-
"""
|
|
179
|
-
Simulates a TAB key press in the browser.
|
|
144
|
+
def tab(wait: WebDriverWait):
|
|
145
|
+
"""Simulates a tab key press in the current WebDriver instance.
|
|
180
146
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
Example:
|
|
184
|
-
|
|
147
|
+
:param wait: WebDriverWait instance to wait for elements
|
|
148
|
+
:return: None
|
|
149
|
+
Example usage:
|
|
150
|
+
ComponentUtils.tab(wait)
|
|
185
151
|
"""
|
|
186
|
-
|
|
187
|
-
# It creates an ActionChains instance, sends the TAB key, and performs the action.
|
|
188
|
-
# This is useful for navigating through form fields or components in the UI.
|
|
189
|
-
# It uses the ActionChains class to perform the key press action.
|
|
190
|
-
|
|
152
|
+
driver = wait._driver
|
|
191
153
|
actions = ActionChains(driver)
|
|
192
154
|
actions.send_keys(Keys.TAB).perform()
|
|
193
155
|
|
|
194
156
|
@staticmethod
|
|
195
157
|
def findComponentsByXPath(wait: WebDriverWait, xpath: str):
|
|
158
|
+
"""Finds all components matching the given XPath and returns a list of valid components
|
|
159
|
+
that are clickable and displayed.
|
|
160
|
+
|
|
161
|
+
:param wait: WebDriverWait instance to wait for elements
|
|
162
|
+
:param xpath: XPath string to locate components
|
|
163
|
+
:return: List of valid WebElement components
|
|
164
|
+
Example usage:
|
|
165
|
+
components = ComponentUtils.findComponentsByXPath(wait, "//button[@class='submit']")
|
|
166
|
+
for component in components:
|
|
167
|
+
component.click()
|
|
196
168
|
"""
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
Parameters:
|
|
200
|
-
wait: Selenium WebDriverWait instance.
|
|
201
|
-
xpath: The XPath expression to find components.
|
|
202
|
-
|
|
203
|
-
Returns:
|
|
204
|
-
List of WebElement objects that match the XPath.
|
|
205
|
-
|
|
206
|
-
Raises:
|
|
207
|
-
Exception: If no components are found.
|
|
208
|
-
"""
|
|
209
|
-
|
|
210
|
-
# Wait for at least one element to be present
|
|
169
|
+
# Wait for the presence of elements matching the XPath
|
|
211
170
|
wait.until(EC.presence_of_element_located((By.XPATH, xpath)))
|
|
212
171
|
|
|
213
172
|
# Find all matching elements
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: robo_appian
|
|
3
|
+
Version: 0.0.14
|
|
4
|
+
Summary: Automate your Appian code testing with Python. Boost quality, save time.
|
|
5
|
+
Author: Dinil Mithra
|
|
6
|
+
Author-email: dinilmithra@mailme@gmail.com
|
|
7
|
+
Requires-Python: >=3.12,<4.0
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
12
|
+
Requires-Dist: numpy
|
|
13
|
+
Requires-Dist: requests (>=2.25.1,<3.0.0)
|
|
14
|
+
Requires-Dist: selenium (>=4.34.0)
|
|
15
|
+
Project-URL: Homepage, https://github.com/dinilmithra/robo_appian
|
|
16
|
+
Project-URL: Repository, https://github.com/dinilmithra/robo_appian.git
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
|
|
19
|
+
# Robo Appian
|
|
20
|
+
|
|
21
|
+
Robo Appian is a Python library for automated UI testing of Appian applications. It provides user-friendly utilities and best practices to help you write robust, maintainable, and business-focused test automation.
|
|
22
|
+
|
|
23
|
+
## Features
|
|
24
|
+
- Simple, readable API for Appian UI automation
|
|
25
|
+
- Utilities for buttons, inputs, dropdowns, tables, tabs, and more
|
|
26
|
+
- Data-driven and workflow testing support
|
|
27
|
+
- Error handling and debugging helpers
|
|
28
|
+
- Designed for both technical and business users
|
|
29
|
+
|
|
30
|
+
## Documentation
|
|
31
|
+
Full documentation, guides, and API reference are available at:
|
|
32
|
+
|
|
33
|
+
➡️ [Robo Appian Documentation](https://dinilmithra.github.io/robo_appian/)
|
|
34
|
+
|
|
35
|
+
## Quick Start
|
|
36
|
+
1. Install Robo Appian:
|
|
37
|
+
```bash
|
|
38
|
+
pip install robo_appian
|
|
39
|
+
```
|
|
40
|
+
2. See the [Getting Started Guide](docs/getting-started/installation.md) for setup and your first test.
|
|
41
|
+
|
|
42
|
+
## Example Usage
|
|
43
|
+
```python
|
|
44
|
+
from robo_appian.components import InputUtils, ButtonUtils
|
|
45
|
+
|
|
46
|
+
# Set value in a text field by label
|
|
47
|
+
InputUtils.setValueByLabelText(wait, "Username", "testuser")
|
|
48
|
+
|
|
49
|
+
# Click a button by label
|
|
50
|
+
ButtonUtils.clickByLabelText(wait, "Sign In")
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Project Structure
|
|
54
|
+
- `robo_appian/` - Library source code
|
|
55
|
+
- `docs/` - Documentation and guides
|
|
56
|
+
|
|
57
|
+
## Contributing
|
|
58
|
+
Contributions are welcome! Please see the [contributing guidelines](CONTRIBUTING.md) or open an issue to get started.
|
|
59
|
+
|
|
60
|
+
## License
|
|
61
|
+
MIT License. See [LICENSE](LICENSE) for details.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
For questions or support, contact [Dinil Mithra](mailto:dinilmithra.mailme@gmail.com) or connect on [LinkedIn](https://www.linkedin.com/in/dinilmithra).
|
|
66
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
robo_appian/__init__.py,sha256=6u9n2W7P1IKSSr5IPGsg7LhVR1o1uYv424mXDjJLgb0,720
|
|
2
|
-
robo_appian/components/ButtonUtils.py,sha256=
|
|
2
|
+
robo_appian/components/ButtonUtils.py,sha256=G4IMtzYfj-Rq_taX8qZ8U3gLbz7ajsxZvg9n8l2235o,3597
|
|
3
3
|
robo_appian/components/DateUtils.py,sha256=9scKYCyJavVyHzoHVfe1cdW2rEp4NAXsP5Zs_CV3fwk,3252
|
|
4
4
|
robo_appian/components/DropdownUtils.py,sha256=OscvU2mAC-ZhTQxB6j4amac4nByGpeu57ak7OLKdyY8,11174
|
|
5
5
|
robo_appian/components/InputUtils.py,sha256=6BqkAhKyUUcn9cTHbP97DuPaVU17kGAftstl310RMaE,6438
|
|
@@ -14,9 +14,9 @@ robo_appian/controllers/ComponentDriver.py,sha256=0GzEXsncWg4oPHGmG48wKeGlrEHxkS
|
|
|
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=
|
|
17
|
+
robo_appian/utils/ComponentUtils.py,sha256=1tpHMxfZlqlhBbBpoNUP8T-Us1cBeyO80clAalz-U-s,6862
|
|
18
18
|
robo_appian/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
-
robo_appian-0.0.
|
|
20
|
-
robo_appian-0.0.
|
|
21
|
-
robo_appian-0.0.
|
|
22
|
-
robo_appian-0.0.
|
|
19
|
+
robo_appian-0.0.14.dist-info/LICENSE,sha256=g-xR4dRa9_4iFkMoJmED-wE-J5hoxbk3105Knhfpjm0,1068
|
|
20
|
+
robo_appian-0.0.14.dist-info/METADATA,sha256=plmMDkRAUHrkPjsjGunbVAZWN4E2dO682h0lIuCutN8,2261
|
|
21
|
+
robo_appian-0.0.14.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
22
|
+
robo_appian-0.0.14.dist-info/RECORD,,
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.3
|
|
2
|
-
Name: robo_appian
|
|
3
|
-
Version: 0.0.12
|
|
4
|
-
Summary: Automate your Appian code testing with Python. Boost quality, save time.
|
|
5
|
-
Author: Dinil Mithra
|
|
6
|
-
Author-email: dinilmithra@mailme@gmail.com
|
|
7
|
-
Requires-Python: >=3.12,<4.0
|
|
8
|
-
Classifier: Operating System :: OS Independent
|
|
9
|
-
Classifier: Programming Language :: Python :: 3
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
12
|
-
Requires-Dist: numpy
|
|
13
|
-
Requires-Dist: requests (>=2.25.1,<3.0.0)
|
|
14
|
-
Requires-Dist: selenium (>=4.34.0)
|
|
15
|
-
Project-URL: Homepage, https://github.com/dinilmithra/robo_appian
|
|
16
|
-
Project-URL: Repository, https://github.com/dinilmithra/robo_appian.git
|
|
17
|
-
Description-Content-Type: text/markdown
|
|
18
|
-
|
|
19
|
-
# Robo Appian
|
|
20
|
-
|
|
21
|
-
**Automate your Appian code testing with Python. Boost quality, save time.**
|
|
22
|
-
|
|
23
|
-
[](https://badge.fury.io/py/robo-appian)
|
|
24
|
-
[](https://www.python.org/downloads/)
|
|
25
|
-
[](https://dinilmithra.github.io/robo_appian/)
|
|
26
|
-
|
|
27
|
-
## 🚀 Quick Start
|
|
28
|
-
|
|
29
|
-
### Installation
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
pip install robo-appian
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### Basic Usage
|
|
36
|
-
|
|
37
|
-
```python
|
|
38
|
-
from selenium import webdriver
|
|
39
|
-
from selenium.webdriver.support.ui import WebDriverWait
|
|
40
|
-
from robo_appian import ButtonUtils, InputUtils, TableUtils
|
|
41
|
-
|
|
42
|
-
# Setup your driver
|
|
43
|
-
driver = webdriver.Chrome()
|
|
44
|
-
wait = WebDriverWait(driver, 10)
|
|
45
|
-
|
|
46
|
-
# Interact with Appian components
|
|
47
|
-
ButtonUtils.click(wait, "Submit")
|
|
48
|
-
InputUtils.set_text(wait, "Username", "john.doe")
|
|
49
|
-
TableUtils.click_cell_link(wait, "Actions", 1, "Edit")
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## 📚 Features
|
|
53
|
-
|
|
54
|
-
### Components
|
|
55
|
-
- **ButtonUtils**: Find and click buttons
|
|
56
|
-
- **DateUtils**: Interact with date fields and date pickers
|
|
57
|
-
- **DropdownUtils**: Interact with dropdown/select components
|
|
58
|
-
- **InputUtils**: Interact with input fields and text areas
|
|
59
|
-
- **LabelUtils**: Find and interact with labels
|
|
60
|
-
- **LinkUtils**: Click links and navigate
|
|
61
|
-
- **TableUtils**: Interact with tables and grids
|
|
62
|
-
- **TabUtils**: Switch between tabs
|
|
63
|
-
- **ComponentUtils**: General component utilities
|
|
64
|
-
|
|
65
|
-
### Controllers
|
|
66
|
-
- **ComponentDriver**: High-level interface for component interaction
|
|
67
|
-
|
|
68
|
-
### Exceptions
|
|
69
|
-
- **MyCustomError**: Custom exceptions for better error handling
|
|
70
|
-
|
|
71
|
-
## 📖 Documentation
|
|
72
|
-
|
|
73
|
-
Visit our [full documentation](https://dinilmithra.github.io/robo_appian/) for:
|
|
74
|
-
- Detailed API reference
|
|
75
|
-
- Complete examples and tutorials
|
|
76
|
-
- Installation guide
|
|
77
|
-
- Best practices
|
|
78
|
-
|
|
79
|
-
## 🛠️ Requirements
|
|
80
|
-
|
|
81
|
-
- Python 3.12+
|
|
82
|
-
- Selenium WebDriver 4.34.0+
|
|
83
|
-
- Compatible web browser (Chrome, Firefox, etc.)
|
|
84
|
-
|
|
85
|
-
## 🤝 Contributing
|
|
86
|
-
|
|
87
|
-
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
88
|
-
|
|
89
|
-
## 📄 License
|
|
90
|
-
|
|
91
|
-
This project is licensed under the MIT License.
|
|
92
|
-
|
|
93
|
-
## 🔗 Links
|
|
94
|
-
|
|
95
|
-
- [Documentation](https://dinilmithra.github.io/robo_appian/)
|
|
96
|
-
- [PyPI Package](https://pypi.org/project/robo-appian/)
|
|
97
|
-
- [GitHub Repository](https://github.com/dinilmithra/robo_appian)
|
|
98
|
-
ButtonUtils, ComponentUtils, DateUtils, DropdownUtils, InputUtils,
|
|
99
|
-
LabelUtils, LinkUtils, TableUtils, TabUtils
|
|
100
|
-
)
|
|
101
|
-
|
|
102
|
-
# Example: Set a Date Value
|
|
103
|
-
DateUtils.set_date_value("date_field_id", "2023-10-01")
|
|
104
|
-
|
|
105
|
-
# Example: Click a Button
|
|
106
|
-
ButtonUtils.click_button("submit_button_id")
|
|
107
|
-
|
|
108
|
-
# Example: Select a Dropdown Value
|
|
109
|
-
DropdownUtils.select_value("dropdown_id", "Option 1")
|
|
110
|
-
|
|
111
|
-
# Example: Enter Text in an Input Field
|
|
112
|
-
InputUtils.enter_text("input_field_id", "Sample Text")
|
|
113
|
-
|
|
114
|
-
# Example: Click a Link
|
|
115
|
-
LinkUtils.click_link("link_id")
|
|
116
|
-
|
|
117
|
-
# Example: Click a Tab
|
|
118
|
-
TabUtils.click_tab("tab_id")
|
|
119
|
-
|
|
120
|
-
# Example: Get a Table Cell Value
|
|
121
|
-
TableUtils.get_cell_value("table_id", 1, 2) # Row 1, Column 2
|
|
122
|
-
|
|
123
|
-
# Example: Get a Label Value
|
|
124
|
-
LabelUtils.get_label_value("label_id")
|
|
125
|
-
|
|
126
|
-
# Example: Get a Component Value
|
|
127
|
-
ComponentUtils.get_component_value("component_id")
|
|
128
|
-
|
|
129
|
-
# Example: Use the Component Driver
|
|
130
|
-
from robo_appian.utils.controllers.ComponentDriver import ComponentDriver
|
|
131
|
-
ComponentDriver.execute(wait, "Button", "Click", "Submit", None)
|
|
132
|
-
|
|
133
|
-
## Dependencies
|
|
134
|
-
|
|
135
|
-
Python >= 3.8
|
|
136
|
-
Uses selenium
|
|
137
|
-
|
|
138
|
-
## License
|
|
139
|
-
|
|
140
|
-
MIT License. See LICENSE.
|
|
File without changes
|
|
File without changes
|