Added Refresh GUI keyword for the page to load compeletly after refresh
Change-Id: I34e037dfd88e75e8a43e0f1c0259071e6f6520e5
Signed-off-by: Ashwini Chandrappa <Ashwini.Chandrappa777@ibm.com>
diff --git a/gui/gui_test/overview_menu/test_overview_menu.robot b/gui/gui_test/overview_menu/test_overview_menu.robot
index 4edc2bf..a61f37a 100644
--- a/gui/gui_test/overview_menu/test_overview_menu.robot
+++ b/gui/gui_test/overview_menu/test_overview_menu.robot
@@ -22,6 +22,7 @@
${xpath_launch_serial_over_lan} //*[@data-test-id='overviewQuickLinks-button-solConsole']
${xpath_led_button} //*[@data-test-id='overviewQuickLinks-checkbox-serverLed']
+
*** Test Cases ***
Verify Existence Of All Sections In Overview Page
@@ -128,17 +129,14 @@
[Documentation] Turn on server LED via GUI and verify its status via Redfish.
[Tags] Verify_Server_LED_Turn_On
- # Turn Off the server LED via Redfish.
+ # Turn Off the server LED via Redfish and refresh GUI.
Redfish.Patch /redfish/v1/Systems/system body={"IndicatorLED":"Off"} valid_status_codes=[200, 204]
+ Refresh GUI
- # Refresh GUI.
- Click Element ${xpath_refresh_button}
- Wait Until Page Contains Element ${xpath_led_button}
-
- # Turn on the server LED via GUI and sleep.
+ # Turn ON the LED via GUI.
Click Element At Coordinates ${xpath_led_button} 0 0
- # Cross check that server LED on state via Redfish.
+ # Cross check that server LED ON state via Redfish.
${led_status}= Redfish.Get Attribute /redfish/v1/Systems/system IndicatorLED
Should Be True '${led_status}' == 'Lit'
@@ -147,14 +145,11 @@
[Documentation] Turn off server LED via GUI and verify its status via Redfish.
[Tags] Verify_Server_LED_Turn_Off
- # Turn On the server LED via Redfish.
+ # Turn On the server LED via Redfish and refresh GUI.
Redfish.Patch /redfish/v1/Systems/system body={"IndicatorLED":"Lit"} valid_status_codes=[200, 204]
+ Refresh GUI
- # Refresh GUI.
- Click Element ${xpath_refresh_button}
- Wait Until Page Contains Element ${xpath_led_button}
-
- # Now turn off the LED via GUI.
+ # Turn OFF the LED via GUI.
Click Element At Coordinates ${xpath_led_button} 0 0
# Cross check that server LED off state via Redfish.
@@ -179,4 +174,3 @@
Click Element ${xpath_overview_menu}
Wait Until Page Contains Element ${xpath_overview_page_header}
-
diff --git a/gui/lib/gui_resource.robot b/gui/lib/gui_resource.robot
index a7dcd9c..38266f4 100644
--- a/gui/lib/gui_resource.robot
+++ b/gui/lib/gui_resource.robot
@@ -120,3 +120,11 @@
Click Element ${xpath_profile_settings}
Click Element At Coordinates ${xpath_default_UTC} 0 0
Click Element ${xpath_profile_save_button}
+
+
+Refresh GUI
+ [Documentation] Refresh GUI via refresh button in header.
+
+ Click Element ${xpath_refresh_button}
+ # Added delay for page to load fully after refresh.
+ Sleep 5s