GUI: Added a new test to check warning log count on overview page

Changes :-
     - Added a new test case Verify_Event_Under_Warning_Event_Logs_Section
     - Using ${CMD_PREDICTIVE_ERROR} to creating a predictable or warning error log on system and trying to get warning error log count from Ovewview page under Event logs session and verifying.
     - Added "Redfish Purge Event Log" in teardown to clean up all logs post test.

Tested: -
      - Successfully ran this from gui/gui_test/overview_menu/test_overview_menu.robot
-

Change-Id: I4ef8d351a24d705ad7921b26f37abda1245b5223
Signed-off-by: rramyasr-in <rramyasr@in.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 c22dfe3..f4ac7cb 100644
--- a/gui/gui_test/overview_menu/test_overview_menu.robot
+++ b/gui/gui_test/overview_menu/test_overview_menu.robot
@@ -27,6 +27,7 @@
 ${xpath_led_button}                              //*[@data-test-id='overviewInventory-checkbox-identifyLed']
 ${xpath_dumps_view_more_button}                  (//*[text()="View more"])[7]
 ${xpath_critical_logs_count}                     //dt[contains(text(),'Critical')]/following-sibling::dd[1]
+${xpath_warning_logs_count}                      //dt[contains(text(),'Warning')]/following-sibling::dd[1]
 
 *** Test Cases ***
 
@@ -104,6 +105,23 @@
     Should Be True  '${log_count}' == '${1}'
 
 
+Verify Event Under Warning Event Logs Section
+    [Documentation]  Verify event under warning event logs section in case of any event.
+    [Tags]  Verify_Event_Under_Warning_Event_Logs_Section
+    [Teardown]  Redfish Purge Event Log
+
+    Redfish Purge Event Log
+    Click Element  ${xpath_refresh_button}
+
+    # Generate a predictable error for testing purpose.
+    BMC Execute Command  ${CMD_PREDICTIVE_ERROR}
+
+    Click Element  ${xpath_refresh_button}
+
+    ${log_count}=  Get Text  ${xpath_warning_logs_count}
+    Should Be Equal As Integers  ${log_count}  1
+
+
 Verify View More Event Logs Button
     [Documentation]  Verify view more event log button in overview page.
     [Tags]  Verify_View_More_Event_Logs_Button