Corrected XPath for server health, scroll down and export link
Change-Id: Ia8339499ec48cfa9ae6ac3f865328d86b7d241b9
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/gui/obmc_gui/data/resource_variables.py b/gui/obmc_gui/data/resource_variables.py
index 12ee7a7..1edb275 100644
--- a/gui/obmc_gui/data/resource_variables.py
+++ b/gui/obmc_gui/data/resource_variables.py
@@ -94,7 +94,7 @@
xpath_select_server_power = "//a[@href='#/server-control/power-operations']"
# Server health elements locators.
- xpath_select_server_health = "//*[@id='header__wrapper']/div/div[3]/a[2]"
+ xpath_select_server_health = "//a[@href='#/server-health/event-log']"
xpath_server_health_text = \
"//*[@id='header__wrapper']/div/div[3]/a[2]/span"
xpath_select_refresh_button = \
diff --git a/gui/obmc_gui/test/gui_header/test_obmc_gui_server_health.robot b/gui/obmc_gui/test/gui_header/test_obmc_gui_server_health.robot
index 31a69d1..a026611 100644
--- a/gui/obmc_gui/test/gui_header/test_obmc_gui_server_health.robot
+++ b/gui/obmc_gui/test/gui_header/test_obmc_gui_server_health.robot
@@ -313,11 +313,15 @@
Test Setup Execution
[Documentation] Do test case setup tasks.
+
${status}= Run Keyword And Return Status Logging Test Binary Exist
Run Keyword If ${status} == ${False} Install Tarball
Delete Error Logs And Verify
- Click Element ${xpath_select_server_health}
+ # Refresh the GUI and navigate to server health page.
+ Click Element ${xpath_select_refresh_button}
+ Click Element ${xpath_select_server_health}
+ Wait Until Page Contains Event log
Test Teardown Execution
[Documentation] Do the post test teardown.
diff --git a/gui/obmc_gui/test/server_config/test_obmc_gui_firmware_update.robot b/gui/obmc_gui/test/server_config/test_obmc_gui_firmware_update.robot
index 431de5e..edbf7e8 100644
--- a/gui/obmc_gui/test/server_config/test_obmc_gui_firmware_update.robot
+++ b/gui/obmc_gui/test/server_config/test_obmc_gui_firmware_update.robot
@@ -14,7 +14,7 @@
${xpath_select_server_config} //*[@id="nav__top-level"]/li[4]/button
${xpath_select_firmware} //a[@href='#/configuration/firmware']
${xpath_choose_file_button} //*[@id="firmware__upload-form"]/div[1]/label/span[1]
-${xpath_scroll_down} //a[@href='/html/body/main/div[2]/p[2]/a']
+${xpath_scroll_down} //a[contains(text(), "Scroll down")]
${xpath_tftp_server_ip} //*[@id="tftp-ip"]
${xpath_tftp_filename} //*[@id="tftp-file-name"]
${xpath_download_firmware} //*[@id="firmware__upload-form"]/div[2]/fieldset/div[1]/div[3]/input
diff --git a/gui/obmc_gui/test/server_health/test_obmc_gui_hardware_status.robot b/gui/obmc_gui/test/server_health/test_obmc_gui_hardware_status.robot
index 25c1aa0..115fab4 100644
--- a/gui/obmc_gui/test/server_health/test_obmc_gui_hardware_status.robot
+++ b/gui/obmc_gui/test/server_health/test_obmc_gui_hardware_status.robot
@@ -12,10 +12,10 @@
${xpath_select_server_health} //*[@id="nav__top-level"]/li[2]/button
${xpath_select_hardware_status} //a[@href='#/server-health/inventory-overview']
-${xpath_inventory_export} css:a.inline
+${xpath_inventory_export} //a[contains(text(), "Export")]
${xpath_inventory_search} //*[@id="content__search-input"]
${xpath_inventory_search_button} //*[@id="content__search-submit"]
-${xpath_inventory_search_text_clear} class:clear-input
+${xpath_inventory_search_text_clear} //button[@class='clear-input']
${xpath_bmc_expand} //*[@id="inventory-categories"]/div[5]/button
${xpath_system_expand} //*[@id="inventory-categories"]/div[2]/button
${xpath_motherboard_expand} //*[@id="inventory-categories"]/div[4]/button