entity¶
Entity(browser, container, add_btn=None, is_single_page=False)
¶
Bases: BaseComponent
Entity form to add/edit the configuration. The instance of the class expects that the entity is already open. The instance of the class holds all the controls in the entity and provides the generic interaction that can be done with the entity
Parameters:
Name | Type | Description | Default |
---|---|---|---|
browser |
The selenium webdriver |
required | |
container |
Container in which the Entity is located. Of type dictionary: {“by”:…, “select”:…} |
required | |
add_btn |
The locator of add_button with which the entity will be opened |
None
|
|
is_single_page |
Boolean indicating whether the selected tab is single entity form or not like proxy and logging. |
False
|
Source code in pytest_splunk_addon_ui_smartx/components/entity.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
|
cancel()
¶
Cancel the entity :return: True if done properly
Source code in pytest_splunk_addon_ui_smartx/components/entity.py
122 123 124 125 126 127 128 129 |
|
close()
¶
Close the entity :return: True if done properly
Source code in pytest_splunk_addon_ui_smartx/components/entity.py
131 132 133 134 135 136 137 138 |
|
get_error()
¶
Get the error message displayed while saving the configuration
Source code in pytest_splunk_addon_ui_smartx/components/entity.py
81 82 83 84 85 |
|
get_warning()
¶
Get the error message displayed while saving the configuration
Source code in pytest_splunk_addon_ui_smartx/components/entity.py
75 76 77 78 79 |
|
open()
¶
Open the entity by click on “New” button. :return: True if done properly
Source code in pytest_splunk_addon_ui_smartx/components/entity.py
140 141 142 143 144 145 146 147 |
|
save(expect_error=False, expect_warning=False)
¶
Attempts to save configuration. If error or warning messages are found, return them instead.
Source code in pytest_splunk_addon_ui_smartx/components/entity.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
|