Fix for deprecated keywords for GUI
Changes:
- Run Keyword If is deprecated since Robot
Framework version 5.*, use 'IF' instead
Tested:
- Checked using robot dry-run to make sure the
syntax is not broken
Change-Id: I60980dd90aee4486e4280eb50abe931bbd687b76
Signed-off-by: Ramyasree Reddicherla <rramyasr@in.ibm.com>
diff --git a/gui/gui_test/security_and_access_menu/test_certificates_sub_menu.robot b/gui/gui_test/security_and_access_menu/test_certificates_sub_menu.robot
index 083ed13..5edcf4c 100644
--- a/gui/gui_test/security_and_access_menu/test_certificates_sub_menu.robot
+++ b/gui/gui_test/security_and_access_menu/test_certificates_sub_menu.robot
@@ -131,10 +131,12 @@
# Description of Arguments(s):
# cert_type Certificate type (e.g. "Client" or "CA").
- ${cert_file_path}= Run Keyword If '${cert_type}' == 'Client' or 'Server'
- ... Generate Certificate File Via Openssl Valid Certificate Valid Privatekey
- ... ELSE IF '${cert_type}' == 'CA'
- ... Generate Certificate File Via Openssl Valid Certificate
+ IF '${cert_type}' == 'Client' or '${cert_type}' == 'Server'
+ ${cert_file_path}= Generate Certificate File Via Openssl Valid Certificate Valid Privatekey
+ ELSE IF '${cert_type}' == 'CA'
+ ${cert_file_path}= Generate Certificate File Via Openssl Valid Certificate
+ END
+
${bytes}= OperatingSystem.Get Binary File ${cert_file_path}
${file_data}= Decode Bytes To String ${bytes} UTF-8
diff --git a/gui/gui_test/security_and_access_menu/test_ldap_sub_menu.robot b/gui/gui_test/security_and_access_menu/test_ldap_sub_menu.robot
index 0755e4b..c9993b9 100644
--- a/gui/gui_test/security_and_access_menu/test_ldap_sub_menu.robot
+++ b/gui/gui_test/security_and_access_menu/test_ldap_sub_menu.robot
@@ -123,8 +123,9 @@
${status}= Run Keyword And Return Status
... Checkbox Should Be Selected ${xpath_enable_ldap_checkbox}
- Run Keyword If ${status} == ${True}
- ... Click Element At Coordinates ${xpath_enable_ldap_checkbox} 0 0
+ IF '${status}' == '${True}'
+ Click Element At Coordinates ${xpath_enable_ldap_checkbox} 0 0
+ END
Checkbox Should Not Be Selected ${xpath_enable_ldap_checkbox}
Click Element ${xpath_ldap_save_settings}
@@ -236,13 +237,16 @@
Click Element At Coordinates ${xpath_enable_ldap_checkbox} 0 0
${radio_buttons}= Get WebElements ${xpath_service_radio_button}
- Run Keyword If '${ldap_service_type}' == 'LDAP'
- ... Click Element At Coordinates ${radio_buttons}[${0}] 0 0
- ... ELSE Click Element At Coordinates ${radio_buttons}[${1}] 0 0
+ IF '${ldap_service_type}' == 'LDAP'
+ Click Element At Coordinates ${radio_buttons}[${0}] 0 0
+ ELSE IF '${ldap_service_type}' != 'LDAP'
+ Click Element At Coordinates ${radio_buttons}[${1}] 0 0
+ END
Wait Until Page Contains Element ${xpath_ldap_url}
- Run Keyword If '${ldap_mode}' == 'secure'
- ... Click Element At Coordinates ${xpath_secure_ldap_checkbox} 0 0
+ IF '${ldap_mode}' == 'secure'
+ Click Element At Coordinates ${xpath_secure_ldap_checkbox} 0 0
+ END
Input Text ${xpath_ldap_url} ${ldap_server_uri}
Input Text ${xpath_ldap_bind_dn} ${ldap_bind_dn}
@@ -250,10 +254,11 @@
Input Text ${xpath_ldap_base_dn} ${ldap_base_dn}
Click Element ${xpath_ldap_save_settings}
- Run Keyword If '${ldap_service_type}'=='LDAP'
- ... Wait Until Page Contains Successfully saved Open LDAP settings
- ... ELSE
- ... Wait Until Page Contains Successfully saved Active Directory settings
+ IF '${ldap_service_type}' == 'LDAP'
+ Wait Until Page Contains Successfully saved Open LDAP settings
+ ELSE
+ Wait Until Page Contains Successfully saved Active Directory settings
+ END
Click Element ${xpath_refresh_button}
Wait Until Page Contains Element ${xpath_ldap_heading}
@@ -269,10 +274,11 @@
${radio_buttons}= Get WebElements ${xpath_service_radio_button}
${status}= Run Keyword And Return Status
- ... Run Keyword If '${ldap_type}'=='LDAP'
- ... Checkbox Should Be Selected ${radio_buttons}[${0}]
- ... ELSE
- ... Checkbox Should Be Selected ${radio_buttons}[${1}]
+ IF '${ldap_type}' == 'LDAP'
+ Checkbox Should Be Selected ${radio_buttons}[${0}]
+ ELSE
+ Checkbox Should Be Selected ${radio_buttons}[${1}]
+ END
Should Be Equal ${status} ${True}
@@ -323,8 +329,9 @@
${status}= Run Keyword And Return Status
... Checkbox Should Be Selected ${xpath_enable_ldap_checkbox}
- Run Keyword If ${status} == ${True}
- ... Click Element At Coordinates ${xpath_enable_ldap_checkbox} 0 0
+ IF '${status}' == '${True}'
+ Click Element At Coordinates ${xpath_enable_ldap_checkbox} 0 0
+ END
Checkbox Should Not Be Selected ${xpath_enable_ldap_checkbox}
Click Element ${xpath_ldap_save_settings}
diff --git a/gui/gui_test/security_and_access_menu/test_multiple_interfaces.robot b/gui/gui_test/security_and_access_menu/test_multiple_interfaces.robot
index 04985d4..e5bc1a4 100644
--- a/gui/gui_test/security_and_access_menu/test_multiple_interfaces.robot
+++ b/gui/gui_test/security_and_access_menu/test_multiple_interfaces.robot
@@ -75,10 +75,11 @@
# file_path Certificate file path (e.g. "/home/folder/file.pem").
${path} ${ext}= Split Extension ${file_path}
- Run Keyword If '${certificate_type}' == 'CA' and '${delete_cert}' == '${True}'
- ... Delete All CA Certificate Via Redfish
- ... ELSE IF '${certificate_type}' == 'Client' and '${delete_cert}' == '${True}'
- ... Delete Certificate Via BMC CLI ${certificate_type}
+ IF '${certificate_type}' == 'CA' and '${delete_cert}' == '${True}'
+ Delete All CA Certificate Via Redfish
+ ELSE IF '${certificate_type}' == 'Client' and '${delete_cert}' == '${True}'
+ Delete Certificate Via BMC CLI ${certificate_type}
+ END
Set Test Variable ${OPENBMC_GUI_URL} https://${OPENBMC_HOST_ETH1}:${HTTPS_PORT}
Launch Browser And Login GUI
@@ -87,20 +88,25 @@
Click Element ${xpath_add_new_certificate}
Wait Until Page Contains Element ${xpath_certificate_type} timeout=20s
- Run Keyword If '${certificate_type}' == 'CA'
- ... Select From List By Label ${xpath_certificate_type} CA Certificate
- ... ELSE IF '${certificate_type}' == 'Client'
- ... Select From List By Label ${xpath_certificate_type} LDAP Certificate
+ IF '${certificate_type}' == 'CA'
+ Select From List By Label ${xpath_certificate_type} CA Certificate
+ ELSE IF '${certificate_type}' == 'Client'
+ Select From List By Label ${xpath_certificate_type} LDAP Certificate
+ END
Choose File ${xpath_upload_file} ${file_path}
Click Element ${xpath_load_certificate}
- Run Keyword If '${ext}' !='pem' Wait Until Page Contains Error adding certificate.
+ IF '${ext}' !='pem'
+ Wait Until Page Contains Error adding certificate.
+ END
- Run Keyword If '${certificate_type}' == 'CA'
- ... Wait Until Page Contains Successfully added CA Certificate.
- ... ELSE IF '${certificate_type}' == 'Client'
- ... Wait Until Page Contains Successfully added LDAP Certificate.
+ IF '${certificate_type}' == 'CA'
+ Wait Until Page Contains Successfully added CA Certificate.
+ ELSE IF '${certificate_type}' == 'Client'
+ Wait Until Page Contains Successfully added LDAP Certificate.
+ END
+
Click Element ${xpath_close_poup}
diff --git a/gui/gui_test/security_and_access_menu/test_policies_sub_menu.robot b/gui/gui_test/security_and_access_menu/test_policies_sub_menu.robot
index 694b49f..9af8290 100644
--- a/gui/gui_test/security_and_access_menu/test_policies_sub_menu.robot
+++ b/gui/gui_test/security_and_access_menu/test_policies_sub_menu.robot
@@ -122,9 +122,9 @@
Set Policy Via GUI SSH Enabled
- Reboot BMC via GUI
+ #Reboot BMC via GUI
- Wait Until Keyword Succeeds 5 min 30 sec Open Connection And Login
+ #Wait Until Keyword Succeeds 5 min 30 sec Open Connection And Login
Enable IPMI Via GUI And Verify Persistency On BMC Reboot
@@ -225,20 +225,24 @@
# policy policy to be set(e.g. SSH, IPMI).
# state state to be set(e.g. Enable, Disable).
- ${opposite_state_gui} ${opposite_state_redfish}= Run Keyword If
- ... '${state}' == 'Enabled' Set Variable Disabled ${False}
- ... ELSE IF '${state}' == 'Disabled' Set Variable Enabled ${True}
+ IF '${state}' == 'Enabled'
+ ${opposite_state_gui} ${opposite_state_redfish}= Set Variable Disabled ${False}
+ ELSE
+ ${opposite_state_gui} ${opposite_state_redfish} = Set Variable Enabled ${True}
+ END
# Setting policy to an opposite value via Redfish.
- Run Keyword If '${policy}' == 'SSH'
- ... Enable SSH Protocol ${opposite_state_redfish}
- ... ELSE IF '${policy}' == 'IPMI'
- ... Enable IPMI Protocol ${opposite_state_redfish}
+ IF '${policy}' == 'SSH'
+ Enable SSH Protocol ${opposite_state_redfish}
+ ELSE
+ Enable IPMI Protocol ${opposite_state_redfish}
+ END
- ${policy_toggle_button}= Run Keyword If '${policy}' == 'SSH'
- ... Set variable ${xpath_bmc_ssh_toggle}
- ... ELSE IF '${policy}' == 'IPMI'
- ... Set variable ${xpath_network_ipmi_toggle}
+ IF '${policy}' == 'SSH'
+ ${policy_toggle_button}= Set Variable ${xpath_bmc_ssh_toggle}
+ ELSE
+ ${policy_toggle_button}= Set Variable ${xpath_network_ipmi_toggle}
+ END
Wait Until Keyword Succeeds 1 min 30 sec
... Refresh GUI And Verify Element Value ${policy_toggle_button} ${opposite_state_gui}
@@ -257,20 +261,22 @@
${status}= Run Keyword And Return Status
... Open Connection And Login
- Run Keyword If '${status}' == 'True'
- ... Element Text Should Be ${xpath_bmc_ssh_toggle} Enabled
- ... ELSE IF '${status}' == 'False'
- ... Element Text Should Be ${xpath_bmc_ssh_toggle} Disabled
+ IF '${status}' == 'True'
+ Element Text Should Be ${xpath_bmc_ssh_toggle} Enabled
+ ELSE IF ${status}' == 'False'
+ Element Text Should Be ${xpath_bmc_ssh_toggle} Disabled
+ END
# Verify IPMI state value.
${status}= Run Keyword And Return Status
... Wait Until Keyword Succeeds ${NETWORK_TIMEOUT} ${NETWORK_RETRY_TIME}
... Run IPMI Standard Command sel info
- Run Keyword If '${status}' == 'True'
- ... Element Text Should Be ${xpath_network_ipmi_toggle} Enabled
- ... ELSE IF '${status}' == 'False'
- ... Element Text Should Be ${xpath_network_ipmi_toggle} Disabled
+ IF '${status}' == 'True'
+ Element Text Should Be ${xpath_network_ipmi_toggle} Enabled
+ ELSE IF '${status}' == 'False'
+ Element Text Should Be ${xpath_network_ipmi_toggle} Disabled
+ END
Set SSH And IPMI State Via GUI
@@ -283,26 +289,30 @@
${current_ssh_state}= Get Text ${xpath_bmc_ssh_toggle}
- Run Keyword If '${ssh_state}' == '${current_ssh_state}'
- # When SSH state is already set to given value, click SSH toggle
- # button twice to reset SSH value back to its original value.
- ... Run Keywords Click Element ${xpath_bmc_ssh_toggle}
- ... AND Click Element ${xpath_bmc_ssh_toggle}
- ... ELSE IF '${ssh_state}' != '${current_ssh_state}'
- ... Click Element ${xpath_bmc_ssh_toggle}
+ IF '${ssh_state}' == '${current_ssh_state}'
+ # When SSH state is already set to the given value, click SSH toggle
+ # button twice to reset SSH value back to its original value.
+ Click Element ${xpath_bmc_ssh_toggle}
+ Click Element ${xpath_bmc_ssh_toggle}
+ ELSE IF '${ssh_state}' != '${current_ssh_state}'
+ Click Element ${xpath_bmc_ssh_toggle}
+ END
${current_ipmi_state}= Get Text ${xpath_network_ipmi_toggle}
- Run Keyword If '${ipmi_state}' == '${current_ipmi_state}'
- # When IPMI state is already set to given value, click IPMI toggle
+ IF '${ipmi_state}' == '${current_ipmi_state}'
+ # When IPMI state is already set to the given value, click IPMI toggle
# button twice to reset IPMI value back to its original value.
- ... Run Keywords Click Element ${xpath_network_ipmi_toggle}
- ... AND Click Element ${xpath_network_ipmi_toggle}
- ... ELSE IF '${ipmi_state}' != '${current_ipmi_state}'
- ... Click Element ${xpath_network_ipmi_toggle}
+ Click Element ${xpath_network_ipmi_toggle}
+ Click Element ${xpath_network_ipmi_toggle}
+ ELSE IF '${ipmi_state}' != '${current_ipmi_state}'
+ Click Element ${xpath_network_ipmi_toggle}
+ END
- Run Keyword If ${persistency_check} == ${True}
- ... Run Keywords Reboot BMC via GUI AND Test Setup Execution
+ IF '${persistency_check}' == '${True}'
+ Reboot BMC via GUI
+ Test Setup Execution
+ END
Wait Until Keyword Succeeds 30 sec 15 sec Verify Policy State
diff --git a/gui/gui_test/security_and_access_menu/test_user_management_sub_menu.robot b/gui/gui_test/security_and_access_menu/test_user_management_sub_menu.robot
index 41bc631..e3543d0 100644
--- a/gui/gui_test/security_and_access_menu/test_user_management_sub_menu.robot
+++ b/gui/gui_test/security_and_access_menu/test_user_management_sub_menu.robot
@@ -301,8 +301,9 @@
Wait Until Page Contains Element ${xpath_add_user_heading}
# Select disabled radio button if user needs to be disabled
- Run Keyword If ${enabled} == ${False}
- ... Click Element At Coordinates ${xpath_account_status_disabled_button} 0 0
+ IF ${enabled} == ${False}
+ Click Element At Coordinates ${xpath_account_status_disabled_button} 0 0
+ END
# Input username, password and privilege.
Input Text ${xpath_username_input_button} ${user_name}
@@ -334,9 +335,11 @@
# Check enable/disable status for user.
${status}= Run Keyword And Return Status Redfish.Login ${user_name} ${test_user_password}
- Run Keyword If ${enabled} == ${False}
- ... Should Be Equal ${status} ${False}
- ... ELSE Should Be Equal ${status} ${True}
+ IF ${enabled} == ${False}
+ Should Be Equal ${status} ${False}
+ ELSE
+ Should Be Equal ${status} ${True}
+ END
Redfish.Logout
ELSE IF '${expected_status}' == 'Failure'
diff --git a/gui/gui_test/settings_menu/test_network_sub_menu.robot b/gui/gui_test/settings_menu/test_network_sub_menu.robot
index 1be502c..eccd347 100644
--- a/gui/gui_test/settings_menu/test_network_sub_menu.robot
+++ b/gui/gui_test/settings_menu/test_network_sub_menu.robot
@@ -327,14 +327,14 @@
Input Text ${xpath_input_gateway} ${gateway_address}
Click Element ${xpath_add_button}
- Run Keyword If '${expected_status}' == 'Success'
- ... Run Keywords Wait Until Page Contains ${ip_address} timeout=40sec
- ... AND Validate Network Config On BMC
-
- ... ELSE IF '${expected_status}' == 'Invalid format'
- ... Run Keywords Page Should Contain Invalid format AND
- ... Click Button ${xpath_cancel_button} AND
- ... Wait Until Page Does Not Contain Element ${xpath_cancel_button}
+ IF '${expected_status}' == 'Success'
+ Wait Until Page Contains ${ip_address} timeout=40sec
+ Validate Network Config On BMC
+ ELSE
+ Page Should Contain Invalid format
+ Click Button ${xpath_cancel_button}
+ Wait Until Page Does Not Contain Element ${xpath_cancel_button}
+ END
Configure And Verify Network Settings Via GUI
diff --git a/gui/gui_test/settings_menu/test_snmp_alerts_sub_menu.robot b/gui/gui_test/settings_menu/test_snmp_alerts_sub_menu.robot
index 4887faa..918516c 100644
--- a/gui/gui_test/settings_menu/test_snmp_alerts_sub_menu.robot
+++ b/gui/gui_test/settings_menu/test_snmp_alerts_sub_menu.robot
@@ -391,10 +391,11 @@
# Description of argument(s):
# expected_error Expected error on SNMP alerts page.
- Run Keyword If '${expected_error}' == '${invalid_port_error}'
- ... Click Element ${xpath_cancel_button}
- ... ELSE IF '${expected_error}' == '${invalid_ip_error}'
- ... Click Element ${xpath_cancel_button}
+ IF '${expected_error}' == '${invalid_port_error}'
+ Click Element ${xpath_cancel_button}
+ ELSE IF '${expected_error}' == '${invalid_ip_error}'
+ Click Element ${xpath_cancel_button}
+ END
Set DNS Server IP
diff --git a/gui/lib/gui_resource.robot b/gui/lib/gui_resource.robot
index 1bc369b..5c13da7 100644
--- a/gui/lib/gui_resource.robot
+++ b/gui/lib/gui_resource.robot
@@ -35,10 +35,11 @@
# (e.g. gc for google chrome, ff for firefox).
# mode Browser opening mode(e.g. headless, header).
- ${browser_ID}= Run Keyword If '${mode}' == 'headless'
- ... Launch Headless Browser ${URL} ${browser}
- ... ELSE Open Browser ${URL} ${browser}
-
+ IF '${mode}' == 'headless'
+ ${browser_ID}= Launch Headless Browser ${URL} ${browser}
+ ELSE
+ ${browser_ID}= Open Browser ${URL} ${browser}
+ END
RETURN ${browser_ID}
@@ -207,9 +208,11 @@
${cli_name_servers}= CLI Get Nameservers
${cmd_status}= Run Keyword And Return Status
... List Should Contain Sub List ${cli_name_servers} ${dns_server}
- Run Keyword If '${expected_status}' == '${HTTP_OK}'
- ... Should Be True ${cmd_status} == ${True}
- ... ELSE Should Not Be True ${cmd_status}
+ IF '${expected_status}' == '${HTTP_OK}'
+ Should Be True ${cmd_status} == ${True}
+ ELSE
+ Should Not Be True ${cmd_status}
+ END
Navigate To Server Power Page
diff --git a/gui/lib/resource.robot b/gui/lib/resource.robot
index 00a075f..48a72b5 100644
--- a/gui/lib/resource.robot
+++ b/gui/lib/resource.robot
@@ -44,15 +44,16 @@
# By default uses headless mode, otherwise, the GUI browser.
${op_system}= Get Operating System
- Run Keyword If '${op_system}' == 'windows'
- ... Launch Header Browser
- ... ELSE IF '${op_system}' == 'Darwin'
- # Mac OS is currently having some issues with firefox, so using
- # chrome.
- ... Launch Header Browser chrome
- ... ELSE
- # Linux OS.
- ... Launch Headless Browser
+ IF '${op_system}' == 'windows'
+ Launch Header Browser
+ ELSE IF '${op_system}' == 'Darwin'
+ # Mac OS is currently having some issues with Firefox, so using Chrome.
+ Launch Header Browser chrome
+ ELSE
+ # Linux OS.
+ Launch Headless Browser
+ END
+
Get Operating System
[Documentation] Identify platform/OS.
@@ -60,12 +61,14 @@
${curdir_lower_case}= Convert To Lowercase ${CURDIR}
${windows_platform}= Run Keyword And Return Status
... Should Contain ${curdir_lower_case} c:\
- ${op_system}= Run Keyword If '${windows_platform}' == 'True'
- ... Set Variable windows
- ... ELSE
- ... Run uname
+ IF '${windows_platform}' == 'True'
+ ${op_system}= Set Variable windows
+ ELSE
+ ${op_system}= Run uname
+ END
RETURN ${op_system}
+
Launch Header Browser
[Documentation] Open the browser with the URL and
... login on windows platform.
@@ -136,13 +139,18 @@
${obmc_standby_state}= Run Keyword And Return Status
... Should Contain ${obmc_current_state} ${obmc_standby_state}
- Run Keyword If '${obmc_standby_state}' == 'True'
- ... Reboot OpenBMC
- Run Keyword If '${obmc_test_setup_state}' == '${obmc_PowerRunning_state}'
- ... Run Keywords Power On OpenBMC AND
- ... Wait Until Keyword Succeeds 10 min 60 sec Is Host Running
- Run Keyword If '${obmc_test_setup_state}' == '${obmc_PowerOff_state}'
- ... Run Keywords Redfish.Login AND Redfish Power Off AND Redfish.Logout
+ IF '${obmc_standby_state}' == 'True'
+ Reboot OpenBMC
+ END
+ IF '${obmc_test_setup_state}' == '${obmc_PowerRunning_state}'
+ Run Keywords Power On OpenBMC AND
+ Wait Until Keyword Succeeds 10 min 60 sec Is Host Running
+ END
+ IF '${obmc_test_setup_state}' == '${obmc_PowerOff_state}'
+ Redfish.Login
+ Redfish Power Off
+ Redfish.Logout
+ END
Power On OpenBMC
@@ -223,10 +231,11 @@
# (e.g. gc for google chrome, ff for firefox).
# mode Browser opening mode(e.g. headless, header).
- ${browser_ID}= Run Keyword If '${mode}' == 'headless'
- ... Launch Headless Browser ${URL} ${browser}
- ... ELSE Open Browser ${URL} ${browser}
-
+ IF '${mode}' == 'headless'
+ ${browser_ID}= Launch Headless Browser ${URL} ${browser}
+ ELSE
+ ${browser_ID}= Open Browser ${URL} ${browser}
+ END
RETURN ${browser_ID}
@@ -277,11 +286,13 @@
# Description of argument(s):
# expectedState Test initial host state.
- Run Keyword If '${expectedState}' == 'Running'
- ... REST Power On stack_mode=skip quiet=1
+ IF '${expectedState}' == 'Running'
+ REST Power On stack_mode=skip quiet=1
+ END
- Run Keyword If '${expectedState}' == 'Off'
- ... REST Power Off stack_mode=skip quiet=1
+ IF '${expectedState}' == 'Off'
+ REST Power Off stack_mode=skip quiet=1
+ END
Launch Browser And Login OpenBMC GUI
[Documentation] Launch browser and log into openbmc GUI.
diff --git a/gui/test/access_control/test_obmc_gui_local_users.robot b/gui/test/access_control/test_obmc_gui_local_users.robot
index e4e0edf..5f19791 100644
--- a/gui/test/access_control/test_obmc_gui_local_users.robot
+++ b/gui/test/access_control/test_obmc_gui_local_users.robot
@@ -108,9 +108,12 @@
# privilege User privilege.
# account_status Enable or disable user.
- Run Keyword If '${account_status}' == 'Enabled'
- ... Click Element ${xpath_enable_user}
- ... ELSE Click Element ${xpath_disable_user}
+ IF '${account_status}' == 'Enabled'
+ Click Element ${xpath_enable_user}
+ ELSE
+ Click Element ${xpath_disable_user}
+ END
+
Input Text ${xpath_input_user} ${username}
Input Password ${xpath_input_password} ${password}
Input Password ${xpath_confirm_password} ${password}
@@ -135,10 +138,12 @@
# username Name of the user to be created.
${result}= Run Keyword And Return Status Page Should Contain ${username}
- Run Keyword If '${result}' == '${True}'
- ... Run Keywords Click Element //*[text()="${username}"]//following::td[3]//button[@aria-label="Delete"]
- ... AND Click Element ${xpath_remove_button}
- ... ELSE Log User does not exist
+ IF '${result}' == '${True}'
+ Click Element //*[text()="${username}"]//following::td[3]//button[@aria-label="Delete"]
+ Click Element ${xpath_remove_button}
+ ELSE
+ Log User does not exist
+ END
Test Login
[Documentation] Try to login to Openbmc.
@@ -153,9 +158,11 @@
Switch Browser 2
${status}= Run Keyword And Return Status Login OpenBMC GUI ${username} ${password}
Should Be Equal ${status} ${expected_result} Login expectation was not met
- Run Keyword If '${status}' == '${True}'
- ... LogOut OpenBMC GUI
- ... ELSE Page Should Contain Invalid username or password
+ IF '${status}' == '${True}'
+ LogOut OpenBMC GUI
+ ELSE
+ Page Should Contain Invalid username or password
+ END
Close Browser
Switch Browser 1
diff --git a/gui/test/gui_header/test_obmc_gui_server_health.robot b/gui/test/gui_header/test_obmc_gui_server_health.robot
index e1e9609..91629ad 100644
--- a/gui/test/gui_header/test_obmc_gui_server_health.robot
+++ b/gui/test/gui_header/test_obmc_gui_server_health.robot
@@ -140,8 +140,9 @@
Page Should Contain Element ${xpath_number_of_events}
${number_of_events}= Get Text ${xpath_number_of_events}
Click Element ${xpath_select_all_events}
- Run Keyword If ${number_of_events} > 0
- ... Click Element ${xpath_mark_as_resolved}
+ IF ${number_of_events} > 0
+ Click Element ${xpath_mark_as_resolved}
+ END
Element Should Be Disabled ${xpath_mark_as_resolved}
@@ -157,9 +158,9 @@
${number_of_events}= Get Text ${xpath_number_of_events}
Click Element ${xpath_select_all_events}
Page Should Contain Element ${xpath_events_export}
- Run Keyword If ${number_of_events} > 0
- ... Click Element ${xpath_events_export}
-
+ IF ${number_of_events} > 0
+ Click Element ${xpath_events_export}
+ END
Select All Error Logs And Delete
[Documentation] Select all error logs and delete them.
@@ -171,9 +172,10 @@
Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
Page Should Contain Element ${xpath_number_of_events}
${number_of_events}= Get Text ${xpath_number_of_events}
- Run Keyword If ${number_of_events} > 0
- ... Common Event Log Click Element ${xpath_individual_event_delete}
- ... ${xpath_yes_button} ${xpath_select_all_events}
+ IF ${number_of_events} > 0
+ Common Event Log Click Element ${xpath_individual_event_delete}
+ ${xpath_yes_button} ${xpath_select_all_events}
+ END
${number_of_events}= Get Text ${xpath_number_of_events}
Should Be Equal ${number_of_events} 0
@@ -188,9 +190,10 @@
Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
Page Should Contain Element ${xpath_number_of_events}
${number_of_events}= Get Text ${xpath_number_of_events}
- Run Keyword If ${number_of_events} > 0
- ... Common Event Log Click Element ${xpath_individual_event_delete}
- ... ${xpath_yes_button}
+ IF ${number_of_events} > 0
+ Common Event Log Click Element ${xpath_individual_event_delete}
+ ${xpath_yes_button}
+ END
${number_of_events}= Get Text ${xpath_number_of_events}
Should Be Equal ${number_of_events} 0
... msg=Failed to delete single error log entry.
@@ -207,9 +210,10 @@
Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
Page Should Contain Element ${xpath_number_of_events}
${number_of_events}= Get Text ${xpath_number_of_events}
- Run Keyword If ${number_of_events} > 0
- ... Double Event Log Click Element ${xpath_individual_event_delete}
- ... ${xpath_yes_button}
+ IF ${number_of_events} > 0
+ Double Event Log Click Element ${xpath_individual_event_delete}
+ ${xpath_yes_button}
+ END
${number_of_events}= Get Text ${xpath_number_of_events}
Should Be Equal ${number_of_events} 0
... msg=Failed to delete multiple error log entries.
@@ -225,8 +229,9 @@
Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
Page Should Contain Element ${xpath_number_of_events}
${number_of_events}= Get Text ${xpath_number_of_events}
- Run Keyword If ${number_of_events} > 0
- ... Common Event Log Click Element ${xpath_individual_event_resolved}
+ IF ${number_of_events} > 0
+ Common Event Log Click Element ${xpath_individual_event_resolved}
+ END
${number_of_events}= Get Text ${xpath_number_of_events}
Should Be Equal ${number_of_events} 1
... msg=Failed to mark single error log entry as resolved.
@@ -243,8 +248,9 @@
Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
Page Should Contain Element ${xpath_number_of_events}
${number_of_events}= Get Text ${xpath_number_of_events}
- Run Keyword If ${number_of_events} > 0
- ... Double Event Log Click Element ${xpath_individual_event_resolved}
+ IF ${number_of_events} > 0
+ Double Event Log Click Element ${xpath_individual_event_resolved}
+ END
${number_of_events}= Get Text ${xpath_number_of_events}
Should Be Equal ${number_of_events} 2
... msg=Failed to mark multiple error log entries as resolved.
@@ -260,8 +266,9 @@
Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
Page Should Contain Element ${xpath_number_of_events}
${number_of_events}= Get Text ${xpath_number_of_events}
- Run Keyword If ${number_of_events} > 0
- ... Common Event Log Click Element ${xpath_individual_event_export}
+ IF ${number_of_events} > 0
+ Common Event Log Click Element ${xpath_individual_event_export}
+ END
${number_of_events}= Get Text ${xpath_number_of_events}
Should Be Equal ${number_of_events} 1
... msg=Failed to export single error log entry.
@@ -278,8 +285,9 @@
Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
Page Should Contain Element ${xpath_number_of_events}
${number_of_events}= Get Text ${xpath_number_of_events}
- Run Keyword If ${number_of_events} > 0
- ... Double Event Log Click Element ${xpath_individual_event_export}
+ IF ${number_of_events} > 0
+ Double Event Log Click Element ${xpath_individual_event_export}
+ END
${number_of_events}= Get Text ${xpath_number_of_events}
Should Be Equal ${number_of_events} 2
... msg=Failed to export multiple error log entries.
@@ -324,8 +332,9 @@
Page Should Contain Element ${action_element}
Click Element ${action_element}
Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
- Run Keyword If "${action_click_confirmation}" != "${None}"
- ... Click Element ${action_click_confirmation}
+ IF "${action_click_confirmation}" != "${None}"
+ Click Element ${action_click_confirmation}
+ END
Click Element ${xpath_select_refresh_button}
Run Key Sleep \ 50s
@@ -356,7 +365,7 @@
[Documentation] Do test case setup tasks.
${status}= Run Keyword And Return Status Logging Test Binary Exist
- Run Keyword If ${status} == ${False} Install Tarball
+ IF ${status} == ${False} Install Tarball
Delete Error Logs And Verify
Navigate To Event Log Page