Fix for CT failures in GUI Header suite
Resolves openbmc/openbmc-test-automation#1887
Change-Id: If13a32791f13e498880bc3045aa3a35823d97702
Signed-off-by: Anusha Dathatri <adathatr@in.ibm.com>
diff --git a/gui/lib/resource.robot b/gui/lib/resource.robot
index b085be6..b59f2df 100644
--- a/gui/lib/resource.robot
+++ b/gui/lib/resource.robot
@@ -121,7 +121,7 @@
Launch Browser And Login OpenBMC GUI
Log To Console Verifying the system state and stablity...
- Click Button ${xpath_select_server_power}
+ Click Element ${xpath_select_server_power}
${obmc_current_state}= Get Text ${xpath_power_indicator}
Rpvars obmc_current_state
@@ -235,21 +235,6 @@
[Return] ${browser_ID}
-Model Server Power Click Button
- [Documentation] Click main server power in the header section.
- [Arguments] ${div_element} ${anchor_element}
-
- # Description of argument(s):
- # div_element Server power header divisional element
- # (e.g. header_wrapper.)
- # anchor_element Server power header anchor element
- # (e.g. header_wrapper_elt.)
-
- Wait Until Element Is Visible
- ... //*[@id='header__wrapper']/div/div[${div_element}]/a[${anchor_element}]/span
- Click Element
- ... //*[@id='header__wrapper']/div/div[${div_element}]/a[${anchor_element}]/span
-
Controller Server Power Click Button
[Documentation] Click main server power in the header section.
[Arguments] ${controller_element}
@@ -285,8 +270,6 @@
GUI Power On
[Documentation] Power on the host using GUI.
- Model Server Power Click Button ${header_wrapper} ${header_wrapper_elt}
- Page Should Contain Attempts to power on the server
Controller Server Power Click Button power__power-on
Page Should Contain Running
diff --git a/gui/test/gui_header/test_obmc_gui_ip_refresh_check.robot b/gui/test/gui_header/test_obmc_gui_ip_refresh_check.robot
index e29dd11..053f9d0 100644
--- a/gui/test/gui_header/test_obmc_gui_ip_refresh_check.robot
+++ b/gui/test/gui_header/test_obmc_gui_ip_refresh_check.robot
@@ -11,11 +11,10 @@
*** Variables ***
-${xpath_select_server_control} //*[@id="header__wrapper"]/div/div[2]/p[2]
-${xpath_select_refresh_button} //*[@id="header__wrapper"]/div/div[3]/button
-${xpath_select_date_text} //*[@id="header__wrapper"]/div/div[3]/p/span
-${xpath_header_scroll_front} //*[@id="header__wrapper"]/div/div[3]/a[1]/span
-${xpath_header_scroll_back} //*[@id="header__wrapper"]/div/div[3]/a[1]/i
+${xpath_bmc_ip} //*[contains(@class, "header__server-ip")]
+${xpath_select_refresh_button} //*[contains(@class, "header__page-refresh")]
+${xpath_select_date_text} //p[@class="header__refresh"]
+${xpath_header_scroll} //*[@class="header__info"]
*** Test Cases ***
@@ -23,14 +22,16 @@
[Documentation] Verify server power page on clicking server power button.
[Tags] Verify_Server_Power_Button
- Click Button ${xpath_select_server_power}
+ Wait Until Element Is Visible ${xpath_select_server_power}
+ Click Element ${xpath_select_server_power}
Wait Until Page Contains Select a power operation
Verify Server Health Button
[Documentation] Verify server health page on clicking server health button.
[Tags] Verify_Server_Health_Button
- Click Button ${xpath_select_server_health}
+ Wait Until Element Is Visible ${xpath_select_server_health}
+ Click Element ${xpath_select_server_health}
Wait Until Page Contains All events from the BMC
Verify IP address
@@ -39,7 +40,7 @@
# NOTE: gui_displayed_ip can be either a host name or an IP address.
# (e.g. "machinex" or "xx.xx.xx.xx").
- ${gui_displayed_ip}= Get Text ${xpath_select_server_control}
+ ${gui_displayed_ip}= Get Text ${xpath_bmc_ip}
Should Contain ${gui_displayed_ip} ${OPENBMC_HOST}
@@ -95,9 +96,9 @@
${shrink_browser_height}= Evaluate ${max_browser_height} / 2
# Reduce the browser size which enables scroll element.
Set Window Size ${shrink_browser_width} ${shrink_browser_height}
- Click Element ${xpath_header_scroll_front}
+ Click Element ${xpath_header_scroll}
# Below element is to scroll back.
Wait Until Page Does Not Contain Element ${xpath_refresh_circle}
- Click Element ${xpath_header_scroll_back}
+ Click Element ${xpath_header_scroll}
# Restore to original browser size.
Set Window Size ${current_browser_width} ${current_browser_height}