openbmc / openbmc-test-automation

Apache License 2.0
100 stars 92 forks source link

GUI logins in security/test_bmc_connections.robot do not work #2169

Closed generatz closed 2 years ago

generatz commented 2 years ago

The login steps in both of the following 2 GUI testcases in security/test_bmc_connections.robot fail, apparently because the test is seeking the wrong login field locator:

The error message is Element with locator '//*[@data-test-id='login-input-username']' not found.

The GUI login does work for me on the same BMC HW with the tests in gui/test/gui_header/test_obmc_gui_ip_refresh_check.robot

The gui/test/gui_header/test_obmc_gui_ip_refresh_check.robot suite uses Suite Setup Launch Browser And Login OpenBMC GUI which, in turn, uses the variable

xpath_textbox_hostname = "//input[@id='host']"

It appears that the security tests use a different variable:

xpath_textbox_username = "//*[@data-test-id='login-input-username']"

Could it be that one of the xpath_textbox_username values is outdated?

generatz commented 2 years ago

Turns out the BMC I was testing on is outdated with respect to the webui - I just learned that it is using AngularJS. I'm guessing that my AngularJS webui could be the reason for the discrepancy.

gkeishin commented 2 years ago

yes, it is likely based on the input. Thanks for checking it out.