Search login btn first by id/name, then xpath
What does this MR do?
To perform an authenticated scan, we use selenium to fill in login forms and submit them. We were searching the form's submit button first via a default XPath expression. If no button was found, it would search then by the button's id and name. This causes problems when there are multiple buttons on the login page and the XPath finds the wrong button.
This MR changes the order how we search for the button. It searches the login button first by id and name. If no element is found or no value is provided by the user, it searches the button by a default XPath expression.
What are the relevant issue numbers?
https://gitlab.com/gitlab-org/gitlab-ee/issues/9830
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated for GitLab EE, if necessary -
Documentation created/updated for this project, if necessary -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Job definition updated, if necessary -
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer
Edited by Philippe Lafoucrière