Disable stale marking feature test
[integration/test.git] / csit / libraries / YangmanKeywords.robot
1 *** Settings ***
2 Documentation     A resource file containing all global keywords to help
3 ...               Yangman GUI and functional testing.
4 Library           Collections
5 Library           Selenium2Library    timeout=30    implicit_wait=30    run_on_failure=Selenium2Library.Log Source
6 Resource          ../variables/Variables.robot
7 Resource          GUIKeywords.robot
8 Resource          ../variables/YangmanGUIVariables.robot
9
10 *** Keywords ***
11 Open DLUX And Login And Navigate To Yangman URL
12     [Documentation]    Launches DLUX page using PhantomJS, or Xvfb, or real browser and navigates to yangman url.
13     GUIKeywords.Open Or Launch DLUX Page And Log In To DLUX
14     GUIKeywords.Navigate To URL    ${YANGMAN_SUBMENU_URL}
15
16 Return List Of Operation IDs
17     [Documentation]    Returns list of IDs of Get, Put, Post and Delete options in expanded operation select menu.
18     ${list}=    BuiltIn.Create List    ${GET_OPTION}    ${PUT_OPTION}    ${POST_OPTION}    ${DELETE_OPTION}
19     [Return]    ${list}
20
21 Return List Of Operation Names
22     [Documentation]    Returns list of operations names.
23     ${list}=    BuiltIn.Create List    GET    PUT    POST    DELETE
24     [Return]    ${list}
25
26 Expand Operation Select Menu
27     [Documentation]    Clicks operation select menu to expand it.
28     GUIKeywords.Patient Click    ${OPERATION_SELECT_INPUT}    ${OPERATION_SELECT_MENU_EXPANDED}
29
30 Exit Opened Application Dialog
31     [Documentation]    Closes opened/ expanded dialogs/ menus by clicking the backdrop.
32     Selenium2Library.Click Element    ${SELECT_BACKDROP}
33
34 Select Operation
35     [Arguments]    ${operation_id}
36     [Documentation]    Selects chosen operation from expanded operation select menu.
37     ${status}=    BuiltIn.Run Keyword And Return Status    GUIKeywords.Page Should Contain Element With Wait    ${OPERATION_SELECT_MENU_EXPANDED}
38     BuiltIn.Run Keyword If    "${status}"=="False"    Expand Operation Select Menu    ${OPERATION_SELECT_INPUT}
39     GUIKeywords.Focus And Click Element    ${operation_id}
40
41 Verify Selected Operation Is Displayed
42     [Arguments]    ${selected_operation_name}
43     [Documentation]    Verifies that the selected operation is now displayed in collapsed operation select menu.
44     ${selected_operation_xpath}=    BuiltIn.Set Variable    ${OPERATION_SELECT_INPUT}//span/div[contains(text(), "${selected_operation_name}")]
45     GUIKeywords.Page Should Contain Element With Wait    ${selected_operation_xpath}
46
47 Select Operation And Verify Operation Has Been Selected
48     [Arguments]    ${operation_id}    ${selected_operation_name}
49     [Documentation]    Selects chosen operation from expanded operation select menu and verifies the operation has been selected.
50     ${status}=    BuiltIn.Run Keyword And Return Status    GUIKeywords.Page Should Contain Element With Wait    ${OPERATION_SELECT_MENU_EXPANDED}
51     BuiltIn.Run Keyword If    "${status}"=="False"    Expand Operation Select Menu    ${OPERATION_SELECT_INPUT}
52     ${selected_operation_xpath}=    BuiltIn.Set Variable    ${OPERATION_SELECT_INPUT}//span/div[contains(text(), "${selected_operation_name}")]
53     GUIKeywords.Patient Click    ${operation_id}    ${selected_operation_xpath}
54
55 Expand Operation Select Menu And Select Operation
56     [Arguments]    ${operation_id}    ${selected_operation_name}
57     [Documentation]    Expands operation select menu and select operation provided as an argument.
58     Expand Operation Select Menu
59     Select Operation And Verify Operation Has Been Selected    ${operation_id}    ${selected_operation_name}
60
61 Verify Yangman Home Page Elements
62     [Documentation]    Verifies presence of Yangman home page elements.
63     Selenium2Library.Wait Until Page Contains Element    ${YANGMAN_LOGO}
64     Selenium2Library.Log Location
65     Modules Tab Is Selected
66     Selenium2Library.Page Should Contain Element    ${TOGGLE_MENU_BUTTON}
67     Selenium2Library.Page Should Contain Element    ${LOGOUT_BUTTON}
68     Verify Selected Operation Is Displayed    GET
69     Selenium2Library.Page Should Contain Element    ${REQUEST_URL_INPUT}
70     Selenium2Library.Page Should Contain Element    ${SEND_BUTTON}
71     Selenium2Library.Page Should Contain Element    ${SAVE_BUTTON}
72     Selenium2Library.Page Should Contain Element    ${PARAMETERS_BUTTON}
73     Selenium2Library.Page Should Contain Element    ${FORM_RADIOBUTTON_UNSELECTED}
74     Selenium2Library.Page Should Contain Element    ${JSON_RADIOBUTTON_SELECTED}
75     Selenium2Library.Page Should Contain Element    ${SHOW_SENT_DATA_CHECKBOX_UNSELECTED}
76     Selenium2Library.Page Should Contain Element    ${SHOW_RECEIVED_DATA_CHECKBOX_SELECTED}
77     Selenium2Library.Page Should Contain Element    ${RECEIVED_DATA_CODE_MIRROR_DISPLAYED}
78     Selenium2Library.Page Should Contain Element    ${RECEIVED_DATA_ENLARGE_FONT_SIZE_BUTTON}
79     Selenium2Library.Page Should Contain Element    ${RECEIVED_DATA_REDUCE_FONT_SIZE_BUTTON}
80     Selenium2Library.Page Should Not Contain Element    ${SENT_DATA_CODE_MIRROR_DISPLAYED}
81
82 Select Form View
83     [Documentation]    Click Form radiobutton to display form view.
84     ${status}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Page Should Contain Element    ${FORM_RADIOBUTTON_SELECTED}
85     BuiltIn.Run Keyword If    "${status}"=="False"    GUIKeywords.Patient Click    ${FORM_RADIOBUTTON_UNSELECTED}    ${FORM_RADIOBUTTON_SELECTED}
86
87 Select Json View
88     [Documentation]    Click Json radiobutton to display json view.
89     ${status}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Page Should Contain Element    ${JSON_RADIOBUTTON_SELECTED}
90     BuiltIn.Run Keyword If    "${status}"=="False"    GUIKeywords.Patient Click    ${JSON_RADIOBUTTON_UNSELECTED}    ${JSON_RADIOBUTTON_SELECTED}
91
92 Modules Tab Is Selected
93     [Documentation]    Verifies that module tab is selected and history and collection tabs are unselected.
94     Selenium2Library.Page Should Contain Element    ${MODULES_TAB_SELECTED}
95     Selenium2Library.Page Should Contain Element    ${MODULE_SEARCH_INPUT}
96     Selenium2Library.Page Should Contain Element    ${HISTORY_TAB_UNSELECTED}
97     Selenium2Library.Page Should Contain Element    ${COLLECTIONS_TAB_UNSELECTED}
98
99 Return Number Of Modules Loaded
100     [Arguments]    ${module_xpath}
101     [Documentation]    Returns number of modules loaded in Modules tab.
102     ${number_of_modules}=    Selenium2Library.Get Matching Xpath Count    ${module_xpath}
103     [Return]    ${number_of_modules}
104
105 Verify Any Module Is Loaded
106     [Documentation]    Verifies that at least one module has been loaded in Modules tab.
107     ${number_of__modules_loaded}=    Return Number Of Modules Loaded    ${MODULE_LIST_ITEM}
108     BuiltIn.Should Be True    ${number_of_modules_loaded}>0
109
110 Return Module List Indexed Module
111     [Arguments]    ${index}
112     [Documentation]    Returns indexed Xpath of the module. ${index} is a number.
113     ${module_index}=    BuiltIn.Set Variable    ${MODULE_ID_LABEL}${index}
114     ${module_list_item_indexed}=    BuiltIn.Set Variable    ${MODULE_TAB_CONTENT}//md-list-item[@id="${module_index}"]//div[@class="pointer title layout-align-center-center layout-row"]
115     [Return]    ${module_list_item_indexed}
116
117 Return Indexed Module Operations Label
118     [Arguments]    ${index}
119     [Documentation]    Returns Xpath of the indexed module's operations item in Modules tab.
120     ${module_list_item_indexed}=    Return Module List Indexed Module    ${index}
121     ${indexed_module_operations_label}=    BuiltIn.Set Variable    ${module_list_item_indexed}//following-sibling::md-list[@aria-hidden="false"]//p[contains(., "${OPERATIONS_LABEL}")]
122     [Return]    ${indexed_module_operations_label}
123
124 Return Indexed Module Operational Label
125     [Arguments]    ${index}
126     [Documentation]    Returns Xpath of the indexed module`s operational in Modules tab.
127     ${module_list_item_indexed}=    Return Module List Indexed Module    ${index}
128     ${indexed_module_operational_label}=    BuiltIn.Set Variable    ${module_list_item_indexed}//following-sibling::md-list[@aria-hidden="false"]//p[contains(., "${OPERATIONAL_LABEL}")]
129     [Return]    ${indexed_module_operational_label}
130
131 Return Indexed Module Config Label
132     [Arguments]    ${index}
133     [Documentation]    Returns Xpath of the indexed module`s config in Modules tab.
134     ${module_list_item_indexed}=    Return Module List Indexed Module    ${index}
135     ${indexed_module_config_label}=    BuiltIn.Set Variable    ${module_list_item_indexed}//following-sibling::md-list[@aria-hidden="false"]//p[contains(., "${CONFIG_LABEL}")]
136     [Return]    ${indexed_module_config_label}
137
138 Click Indexed Module Operations To Load Module Detail Operations Tab
139     [Arguments]    ${index}
140     [Documentation]    Clicks indexed module`s operations to load module detail operations tab.
141     ${indexed_module_operations}=    Return Indexed Module Operations Label    ${index}
142     Selenium2Library.Wait Until Page Contains Element    ${indexed_module_operations}
143     GUIKeywords.Focus And Click Element    ${indexed_module_operations}
144     Selenium2Library.Wait Until Page Contains Element    ${MODULE_DETAIL_OPERATIONS_TAB_SELECTED}
145
146 Click Indexed Module Operational To Load Module Detail Operational Tab
147     [Arguments]    ${index}
148     [Documentation]    Clicks indexed module`s operational to load module detail operational tab.
149     ${indexed_module_operational}=    Return Indexed Module Operational Label    ${index}
150     Selenium2Library.Wait Until Page Contains Element    ${indexed_module_operational}
151     GUIKeywords.Focus And Click Element    ${indexed_module_operational}
152     Selenium2Library.Wait Until Page Contains Element    ${MODULE_DETAIL_OPERATIONAL_TAB_SELECTED}
153
154 Click Indexed Module Config To Load Module Detail Config Tab
155     [Arguments]    ${index}
156     [Documentation]    Clicks indexed module`s config to load module detail config tab.
157     ${indexed_module_config}=    Return Indexed Module Config Label    ${index}
158     Selenium2Library.Wait Until Page Contains Element    ${indexed_module_config}
159     GUIKeywords.Focus And Click Element    ${indexed_module_config}
160     Selenium2Library.Wait Until Page Contains Element    ${MODULE_DETAIL_CONFIG_TAB_SELECTED}
161
162 Return Module ID Index From Module Name
163     [Arguments]    ${module_name}
164     [Documentation]    Returns number - module id index from module name.
165     ${testing_module_xpath}=    BuiltIn.Set Variable    ${MODULE_TAB_CONTENT}//p[contains(., "${module_name}")]//ancestor::md-list-item[contains(@id, "${MODULE_ID_LABEL}")]
166     ${module_id}=    Selenium2Library.Get Element Attribute    ${testing_module_xpath}@id
167     ${module_id_index}=    String.Fetch From Right    ${module_id}    ${MODULE_ID_LABEL}
168     [Return]    ${module_id_index}
169
170 Return Indexed Module From Module Name
171     [Arguments]    ${module_name}
172     [Documentation]    Returns indexed Xpath of the module from the module`s name.
173     ${module_id_index}=    Return Module ID Index From Module Name    ${module_name}
174     ${module_list_item_indexed}=    Return Module List Indexed Module    ${module_id_index}
175     [Return]    ${module_list_item_indexed}
176
177 Expand Module
178     [Arguments]    ${module_name}    ${module_id_index}
179     [Documentation]    Clicks module list item in modules tab to expand the item and display its operations/ operational/ config items.
180     ...    Arguments are either module name, or module id index, that is a number, or ${EMPTY}, if the option is not used.
181     ${module_list_item_indexed}=    BuiltIn.Run Keyword If    "${module_name}"!= "${EMPTY}"    Return Indexed Module From Module Name    ${module_name}
182     ${module_list_item_indexed}=    BuiltIn.Run Keyword If    "${module_id_index}"!= "${EMPTY}"    Return Module List Indexed Module    ${module_id_index}
183     Selenium2Library.Click Element    ${module_list_item_indexed}
184     ${module_list_item_collapsed_indexed}=    BuiltIn.Set Variable    ${module_list_item_indexed}//following-sibling::md-list[@aria-hidden="true"]
185     Selenium2Library.Page Should Not Contain Element    ${module_list_item_collapsed_indexed}
186
187 Expand Module And Click Module Operational Item
188     [Arguments]    ${module_name}    ${module_id_index}
189     [Documentation]    Clicks module list item in modules tab and then clicks its operational item to load operational tab in module detail.
190     ...    Arguments are either module name, or module id index, that is a number, or ${EMPTY}, if the option is not used.
191     Expand Module    ${module_name}    ${module_id_index}
192     Click Indexed Module Operational To Load Module Detail Operational Tab    ${module_id_index}
193
194 Expand Module And Click Module Config Item
195     [Arguments]    ${module_name}    ${module_id_index}
196     [Documentation]    Clicks module list item in modules tab and then clicks its config item to load operational tab in module detail.
197     ...    Arguments are either module name, or module id index, that is a number, or ${EMPTY}, if the option is not used.
198     Expand Module    ${module_name}    ${module_id_index}
199     Click Indexed Module Config To Load Module Detail Config Tab    ${module_id_index}
200
201 Navigate From Yangman Submenu To Testing Module Operational Tab
202     [Arguments]    ${testing_module_name}
203     [Documentation]    Navigates from loaded Yangman URL to testing module detail operational tab.
204     ${module_id_index}=    YangmanKeywords.Return Module ID Index From Module Name    ${testing_module_name}
205     Selenium2Library.Wait Until Page Does Not Contain Element    ${MODULES_WERE_LOADED_ALERT}
206     Expand Module And Click Module Operational Item    ${EMPTY}    ${module_id_index}
207
208 Navigate From Yangman Submenu To Testing Module Config Tab
209     [Arguments]    ${testing_module_name}
210     [Documentation]    Navigates from loaded Yangman URL to testing module detail config tab.
211     ${module_id_index}=    YangmanKeywords.Return Module ID Index From Module Name    ${testing_module_name}
212     Selenium2Library.Wait Until Page Does Not Contain Element    ${MODULES_WERE_LOADED_ALERT}
213     Expand Module And Click Module Config Item    ${EMPTY}    ${module_id_index}
214
215 Compose Branch Id
216     [Arguments]    ${index}
217     [Documentation]    Composes and returns string - branch id in the format branch-${index}.
218     BuiltIn.Return From Keyword    ${BRANCH_ID_LABEL}${index}
219
220 Toggle Module Detail To Modules Or History Or Collections Tab
221     [Documentation]    Click toggle module detail button to toggle from module detail to modules or history or collections tab.
222     Selenium2Library.Wait Until Element Is Visible    ${TOGGLE_MODULE_DETAIL_BUTTON_LEFT}
223     GUIKeywords.Focus And Click Element    ${TOGGLE_MODULE_DETAIL_BUTTON_LEFT}
224
225 Select Module Detail Operational Tab
226     [Documentation]    Selects operational tab in module detail.
227     ${status}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Page Should Contain Element    ${MODULE_DETAIL_OPERATIONAL_TAB_SELECTED}
228     BuiltIn.Run Keyword If    "${status}"=="False"    Selenium2Library.Click Element    ${MODULE_DETAIL_OPERATIONAL_TAB_DESELECTED}
229     Selenium2Library.Wait Until Page Contains Element    ${MODULE_DETAIL_OPERATIONAL_TAB_SELECTED}
230
231 Select Module Detail Config Tab
232     [Documentation]    Selects config tab in module detail.
233     ${status}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Page Should Contain Element    ${MODULE_DETAIL_CONFIG_TAB_SELECTED}
234     BuiltIn.Run Keyword If    "${status}"=="False"    Selenium2Library.Click Element    ${MODULE_DETAIL_CONFIG_TAB_DESELECTED}
235     Selenium2Library.Wait Until Page Contains Element    ${MODULE_DETAIL_CONFIG_TAB_SELECTED}
236
237 Expand All Branches In Module Detail Content Active Tab
238     [Documentation]    Expands all branches in module detail active operations or operational or config tab.
239     Selenium2Library.Wait Until Element Is Visible    ${MODULE_DETAIL_EXPAND_BRANCH_BUTTON}
240     : FOR    ${i}    IN RANGE    1    1000
241     \    ${count}=    Selenium2Library.Get Matching Xpath Count    ${MODULE_DETAIL_EXPAND_BRANCH_BUTTON}
242     \    BuiltIn.Exit For Loop If    ${count}==0
243     \    BuiltIn.Wait Until Keyword Succeeds    30 s    5 s    GUIKeywords.Focus And Click Element    ${MODULE_DETAIL_EXPAND_BRANCH_BUTTON}
244     Selenium2Library.Wait Until Page Does Not Contain Element    ${MODULE_DETAIL_EXPAND_BRANCH_BUTTON}
245
246 Collapse All Branches In Module Detail Content Active Tab
247     [Documentation]    Collapses all branches in module detail active operations or operational or config tab.
248     Selenium2Library.Wait Until Element Is Visible    ${MODULE_DETAIL_COLLAPSE_BRANCH_BUTTON}
249     : FOR    ${i}    IN RANGE    1    1000
250     \    ${count}=    Selenium2Library.Get Matching Xpath Count    ${MODULE_DETAIL_COLLAPSE_BRANCH_BUTTON}
251     \    BuiltIn.Exit For Loop If    ${count}==0
252     \    BuiltIn.Wait Until Keyword Succeeds    30 s    5 s    GUIKeywords.Focus And Click Element    ${MODULE_DETAIL_COLLAPSE_BRANCH_BUTTON}
253     Selenium2Library.Wait Until Page Does Not Contain Element    ${MODULE_DETAIL_COLLAPSE_BRANCH_BUTTON}
254
255 Return Module Detail Labelled Branch Xpath
256     [Arguments]    ${branch_label}
257     [Documentation]    Returns xpath of module detail labelled branch.
258     ${labelled_branch_xpath}=    BuiltIn.Set Variable    ${MODULE_DETAIL_BRANCH}//span[contains(@class, "indented tree-label ng-binding flex") and contains(text(), "${branch_label}")]
259     [Return]    ${labelled_branch_xpath}
260
261 Return Module Detail Branch ID From Branch Label
262     [Arguments]    ${branch_label}
263     [Documentation]    Returns string - module detail branch id in the format branch-${index}.
264     ${labelled_branch_xpath}=    Return Module Detail Labelled Branch Xpath    ${branch_label}
265     ${branch_id}=    Selenium2Library.Get Element Attribute    ${labelled_branch_xpath}//ancestor::md-list-item[contains(@id, "${BRANCH_ID_LABEL}")]@id
266     [Return]    ${branch_id}
267
268 Return Module Detail Branch Indexed
269     [Arguments]    ${branch_id}
270     [Documentation]    Returns indexed Xpath of the module detail branch. Argument is ${branch_id} in the form "branch-"${index}"".
271     ${module_detail_branch_indexed}=    BuiltIn.Set Variable    ${MODULE_DETAIL_ACTIVE_TAB_CONTENT}//md-list-item[contains(@id, "${branch_id}")]
272     [Return]    ${module_detail_branch_indexed}
273
274 Return Indexed Branch Label
275     [Arguments]    ${module_detail_branch_indexed}
276     [Documentation]    Returns string - label of indexed branch in module detail.
277     ${branch_label}=    Selenium2Library.Get Text    ${module_detail_branch_indexed}//span[@class="indented tree-label ng-binding flex"]
278     [Return]    ${branch_label}
279
280 Return Branch Label Without Curly Braces Part
281     [Arguments]    ${branch_label}
282     [Documentation]    Returns string - part of label of indexed branch in module detail without curly braces part.
283     ${branch_label_without_curly_braces_part}=    String.Fetch From Left    ${branch_label}    ${SPACE}
284     [Return]    ${branch_label_without_curly_braces_part}
285
286 Return Labelled Branch Toggle Button
287     [Arguments]    ${labelled_branch_xpath}
288     [Documentation]    Returns xpath of toggle button of labelled branch in module detail.
289     ${labelled_branch_toggle_button}=    BuiltIn.Set Variable    ${labelled_branch_xpath}//preceding-sibling::md-icon[contains(@id, "toggle-branch-")]
290     [Return]    ${labelled_branch_toggle_button}
291
292 Return Branch Toggle Button From Branch Label And Click
293     [Arguments]    ${branch_label}
294     [Documentation]    Returns xpath toggle button of labelled branch in module detail and clicks it.
295     ${labelled_branch_xpath}=    Return Module Detail Labelled Branch Xpath    ${branch_label}
296     ${labelled_branch_toggle_button}=    Return Labelled Branch Toggle Button    ${labelled_branch_xpath}
297     Selenium2Library.Page Should Contain Element    ${labelled_branch_toggle_button}
298     Selenium2Library.Click Element    ${labelled_branch_toggle_button}
299
300 Click Module Detail Branch Indexed
301     [Arguments]    ${module_detail_branch_indexed}
302     [Documentation]    Click indexed branch in module detail.
303     Selenium2Library.Page Should Contain Element    ${module_detail_branch_indexed}
304     GUIKeywords.Mouse Down And Mouse Up Click Element    ${module_detail_branch_indexed}
305
306 Verify Module Detail Branch Is List Branch
307     [Arguments]    ${module_detail_branch_indexed}
308     [Documentation]    Returns status "True" if module detail branch is a list branch and "False" if module detail branch is not a list brnach.
309     ${branch_label}=    Return Indexed Branch Label    ${module_detail_branch_indexed}
310     ${branch_is_list_evaluation}=    BuiltIn.Run Keyword And Return Status    BuiltIn.Should Contain    ${branch_label}    {
311     [Return]    ${branch_is_list_evaluation}
312
313 Return Form Top Element Label
314     [Documentation]    Returns string - form top element label.
315     ${form_top_element_label}=    Selenium2Library.Get Text    ${FORM_TOP_ELEMENT_LABEL_XPATH}
316     [Return]    ${form_top_element_label}
317
318 Return Form Top Element Labelled
319     [Arguments]    ${label}
320     [Documentation]    Returns xpath of form top element with label.
321     ${form_top_element_labelled}=    BuiltIn.Set Variable    ${FORM_TOP_ELEMENT_POINTER}//span[contains(@class, "ng-binding ng-scope") and contains(text(), "${label}")]
322     [Return]    ${form_top_element_labelled}
323
324 Return Form List Item With Index Or Key
325     [Arguments]    ${branch_label}    ${branch_label_curly_braces_part}    ${index_or_key}
326     [Documentation]    Returns string - catenated branch label and index, in the form "label [${index_or_key}]" or "label <${branch_label_curly_braces_part}:${index_or_key}>".
327     ${branch_label_without_curly_braces_part}=    Return Branch Label Without Curly Braces Part    ${branch_label}
328     ${key_part}=    BuiltIn.Set Variable    <${branch_label_curly_braces_part}:${index_or_key}>
329     ${list_item_with_index_or_key}=    BuiltIn.Set Variable If    "${branch_label_curly_braces_part}"=="${EMPTY}"    ${FORM_TOP_ELEMENT_LIST_ITEM_LABEL}[contains(text(), "${branch_label_without_curly_braces_part}") and contains(text(), "[${index_or_key}]")]    ${FORM_TOP_ELEMENT_LIST_ITEM_LABEL}[contains(text(), "${branch_label_without_curly_braces_part}") and contains(text(), "${key_part}")]
330     [Return]    ${list_item_with_index_or_key}
331
332 Verify List Item With Index Or Key Is Visible
333     [Arguments]    ${branch_label}    ${branch_label_curly_braces_part}    ${index_or_key}
334     [Documentation]    Verifies that form list item with given index or key is visible.
335     ${list_item_with_index_or_key}=    Return Form List Item With Index Or Key    ${branch_label}    ${branch_label_curly_braces_part}    ${index_or_key}
336     Selenium2Library.Wait Until Element Is Visible    ${list_item_with_index_or_key}
337
338 Load Topology Topology Id Node In Form
339     [Documentation]    Expands network-topology branch in testing module detail and clicks topology {topology-id} branch to load topology list node in form.
340     Select Form View
341     ${topology_topology_id_branch}=    Return Module Detail Labelled Branch Xpath    ${TOPOLOGY_TOPOLOGY_ID_LABEL}
342     ${status}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Element Should Be Visible    ${topology_topology_id_branch}
343     BuiltIn.Run Keyword If    "${status}"=="False"    Return Branch Toggle Button From Branch Label And Click    ${NETWORK_TOPOLOGY_LABEL}
344     YangmanKeywords.Return Branch Toggle Button From Branch Label And Click    ${TOPOLOGY_TOPOLOGY_ID_LABEL}
345     Verify List Item With Index Or Key Is Visible    ${TOPOLOGY_TOPOLOGY_ID_LABEL}    ${EMPTY}    0
346
347 Verify Sent Data CM Is Displayed
348     [Documentation]    Verifies that sent data code mirror is displayed.
349     Selenium2Library.Wait Until Element Is Visible    ${SENT_DATA_CODE_MIRROR_DISPLAYED}
350
351 Verify Sent Data CM Is Not Displayed
352     [Documentation]    Verifies that sent data code mirror is not displayed.
353     Selenium2Library.Wait Until Element Is Not Visible    ${SENT_DATA_CODE_MIRROR_DISPLAYED}
354
355 Verify Received Data CM Is Displayed
356     [Documentation]    Verifies that received data code mirror is displayed.
357     Selenium2Library.Wait Until Element Is Visible    ${RECEIVED_DATA_CODE_MIRROR_DISPLAYED}
358
359 Verify Received Data CM Is Not Displayed
360     [Documentation]    Verifies that received data code mirror is not displayed.
361     Selenium2Library.Wait Until Element Is Not Visible    ${RECEIVED_DATA_CODE_MIRROR_DISPLAYED}