As was noted when reviewing r544276, LDAPAuthorization (and, probably, other PluggableAuth plugins) make selenium tests fail: they remove the username/password fields when logging in, and hence every attempt to login will fail.
As suggested by @CCicalese_WMF, we could set $wgPluggableAuth_EnableLocalLogin = true; in the LocalSettings file used for selenium.