Table
- class pytest_splunk_addon_ui_smartx.components.table.Table(browser, container, mapping={}, wait_for_seconds=10)[source]
Bases:
pytest_splunk_addon_ui_smartx.components.base_component.BaseComponent
Component: Table
Base class of Input & Configuration table
- check_alert_sign(row_name, column_name='account')[source]
- This function check account warning present in the table while account is not configured in input
- param row_name
the name of the row
- param column_name
the header name of the column
- clone_row(name)[source]
- Clone the specified row. It will open the edit form(entity). The opened entity should be interacted with instance of entity-class only.
- param name
row_name of the table
- delete_row(name, cancel=False, close=False, prompt_msg=False)[source]
- Delete the specified row. Clicking on delete will open a pop-up. Delete the row if neither of (cancel, close) specified.
- param name
row_name of the table
- param cancel
if provided, after the popup is opened, click on cancel button and Do Not delete the row
- param close
if provided, after the popup is opened, click on close button and Do Not delete the row
- return
Bool Returns true if successful or returns the string of the delete prompt if looking for prompt message
- edit_row(name)[source]
- Edit the specified row. It will open the edit form(entity). The opened entity should be interacted with instance of entity-class only.
- param name
row_name of the table
- get_action_values(name)[source]
- Get the specified rows action values
- param name
row name
- return
List Gets the action values of the row specified within the table
- get_cell_value(name, column)[source]
- Get a specific cell value.
- param name
row_name of the table
- param column
column header of the table
- return
str The value within the cell that we are looking for
- get_column_values(column)[source]
- Get list of values of column
- param column
column header of the table
- return
List The values within the certain column
- get_count_number()[source]
- Returns the count from the title of the table.
- return
Int The title count of the table.
- get_count_title()[source]
- Get the count mentioned in the table title
- return
Str The count of the table title
- get_headers()[source]
- Get list of headers from the table
- return
Generator for Str list The headers in the table
- get_list_of_actions(name)[source]
- Get list of possible actions for a specific row
- param name
The name of the row
- return
Generator List The list of actions available within a certain row of the table
- get_more_info(name, cancel=True)[source]
- Returns the text from the more info field within a tables row
- param name
Str row name
- param cancel
Bool Whether or not to click cancel after getting the info
- return
Dict The information found when opening the info table on a row in the table
- get_row_count()[source]
- Count the number of rows in the page.
- return
Int The count of the table rows
- get_sort_order()[source]
- Get the column-header which is sorted rn.
Warning: It depends on the class of the headers and due to it, the returned result might give wrong answer.
- returns
a dictionary with the “header” & “ascending” order
- get_table()[source]
- Get whole table in dictionary form. The row_name will will be the key and all header:values will be it’s value. {row_1{header_1: value_1, …}, …}
- return
dict The data within the table
- set_filter(filter_query)[source]
- Provide a string in table filter.
- param filter_query
query of the filter
- returns
resultant list of filtered row_names
- sort_column(column, ascending=True)[source]
- Sort a column in ascending or descending order
- param column
The header of the column which should be sorted
- param ascending
True if the column should be sorted in ascending order, False otherwise
- switch_to_next()[source]
- Switches the table’s page forward by 1
- return
Bool whether or not switching to the next page was successful
- switch_to_page(value)[source]
- Switches the table to specified page
- param value
Int The page to switch the table to
- return
Bool whether or not switching to the page was successful
- switch_to_prev()[source]
- Switches the table’s page back by 1
- return
Bool whether or not switching to the previous page was successful