Made changes to accommodate new logout button location
Change-Id: I8f7f8d691e6d6d13402835dc81b02779351e4364
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/gui/__init__.robot b/gui/__init__.robot
index 4ce5fe2..94ca091 100644
--- a/gui/__init__.robot
+++ b/gui/__init__.robot
@@ -23,8 +23,7 @@
[Documentation] Display initial info about the test cases.
Rpvars EXECDIR
- Print Timen OBMC_GUI Testing ==> [IN PROGRESS]
- Print Dashes 0 100 1 =
+ Log To Console OBMC_GUI Testing ==> [IN PROGRESS]
Get OpenBMC System Info
[Documentation] Display open BMC system info like system name and IP.
@@ -33,11 +32,9 @@
Rpvars OPENBMC_HOST OPENBMC_HOST_NAME
${build_info} ${stderr} ${rc}= BMC Execute Command cat /etc/os-release
... print_output=1
- Print Dashes 0 100 1 =
Init Teardown Steps
[Documentation] End the test execution by closing browser.
- Print Timen OBMC_GUI Testing ==> [Finished]
- Print Dashes 0 100 1 =
+ Log To Console OBMC_GUI Testing ==> [Finished]
Close Browser
diff --git a/gui/data/resource_variables.py b/gui/data/resource_variables.py
index 3eb83a9..64362a5 100644
--- a/gui/data/resource_variables.py
+++ b/gui/data/resource_variables.py
@@ -12,7 +12,8 @@
xpath_textbox_username = "//input[@id='username']"
xpath_textbox_password = "//input[@id='password']"
xpath_button_login = "//*[@id='login__submit']"
- xpath_button_logout = '//a[contains(text(), "Log out")]'
+ xpath_button_user_action = "//button[@id='user-actions']"
+ xpath_button_logout = '//button[text()="Log out"]'
xpath_yes_button = "//button[text()='Yes']"
xpath_power_indicator = "//*[@id='power-indicator-bar']"
xpath_select_button_power_on = "//*[@id='power__power-on']"
diff --git a/gui/lib/resource.robot b/gui/lib/resource.robot
index 2899df5..c3d75e5 100644
--- a/gui/lib/resource.robot
+++ b/gui/lib/resource.robot
@@ -198,7 +198,7 @@
LogOut OpenBMC GUI
[Documentation] Log out of OpenBMC GUI.
SSHLibrary.Close All Connections
- # Passing direct id element "header" as an argument to Click Element.
+ Click Button ${xpath_button_user_action}
Click Element ${xpath_button_logout}
Wait Until Page Contains Element ${xpath_button_login}
@@ -289,5 +289,6 @@
Logout And Close Browser
[Documentation] Logout from openbmc application and close the browser.
- Click Element //*[text()='Log out']
+ Click Button ${xpath_button_user_action}
+ Click Button ${xpath_button_logout}
Close Browser
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 2f4b0ff1..770ea84 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
@@ -111,5 +111,7 @@
[Documentation] Log out from openBMC GUI.
[Tags] OpenBMC_GUI_Logoff
- Click Element ${xpath_button_logout}
+
+ Click Button ${xpath_button_user_action}
+ Click Button ${xpath_button_logout}
Wait Until Page Contains Element ${xpath_button_login}