TableUtils
robo_appian.utils.components.TableUtils
TableUtils
Utility class for interacting with table components in Appian UI.
Usage Example:
# Find a table using a column name
from robo_appian.utils.components.TableUtils import TableUtils
table = TableUtils.findTableUsingColumnName(wait, "Status")
clickOnButtonUsingHoverText(wait, columnName, rowNumber, hoverText)
staticmethod
Clicks on a button in a table cell identified by its column name, row number, and the hover text of the button.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
wait
|
Selenium WebDriverWait instance. |
required | |
columnName
|
The name of the column where the button is located. |
required | |
rowNumber
|
The row number (0-based index) where the button is located. |
required | |
hoverText
|
The text that appears when hovering over the button. |
required |
Example
TableUtils.clickOnButtonUsingHoverText(wait, "Actions", 2, "Delete")
clickOnLinkUsingHoverText(wait, columnName, rowNumber, hoverText)
staticmethod
Clicks on a link in a table cell identified by its column name, row number, and the hover text of the link.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
wait
|
Selenium WebDriverWait instance. |
required | |
columnName
|
The name of the column where the link is located. |
required | |
rowNumber
|
The row number (0-based index) where the link is located. |
required | |
hoverText
|
The text that appears when hovering over the link. |
required |
Example
TableUtils.clickOnLinkUsingHoverText(wait, "Status", 2, "View Details")
findColumNumberUsingColumnName(tableObject, columnName)
staticmethod
Finds the column number in a table based on the column name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tableObject
|
The Selenium WebElement representing the table. |
required | |
columnName
|
The name of the column to find. |
required |
Returns:
Type | Description |
---|---|
The index of the column (0-based). |
Example
column_number = TableUtils.findColumNumberUsingColumnName(table, "Status")
findTableUsingColumnName(wait, columnName)
staticmethod
Finds a table component that contains a column with the specified name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
wait
|
WebDriverWait
|
Selenium WebDriverWait instance. |
required |
columnName
|
str
|
The name of the column to search for in the table. |
required |
Returns:
Type | Description |
---|---|
The Selenium WebElement for the table component. |
Example
table = TableUtils.findTableUsingColumnName(wait, "Status")
find_component_from_tabele_cell(wait, rowNumber, columnName)
staticmethod
Finds a component within a specific table cell based on the row number and column name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
wait
|
Selenium WebDriverWait instance. |
required | |
rowNumber
|
The row number (0-based index) where the component is located. |
required | |
columnName
|
The name of the column where the component is located. |
required |
Returns:
Type | Description |
---|---|
The Selenium WebElement for the component within the specified table cell. |
Example
component = TableUtils.find_component_from_tabele_cell(wait, 2, "Status")
rowCount(tableObject)
staticmethod
Returns the number of rows in a table, excluding empty grid messages.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tableObject
|
The Selenium WebElement representing the table. |
required |
Returns:
Type | Description |
---|---|
The number of rows in the table. |
Example
count = TableUtils.rowCount(table)