diff --git a/tests/e2e/test_source_oauth.py b/tests/e2e/test_source_oauth.py
index faeeea221..5e5d52b7e 100644
--- a/tests/e2e/test_source_oauth.py
+++ b/tests/e2e/test_source_oauth.py
@@ -147,11 +147,11 @@ class TestSourceOAuth2(SeleniumTestCase):
 
         wait.until(
             ec.presence_of_element_located(
-                (By.CLASS_NAME, "pf-c-login__main-footer-links-item-link")
+                (By.CSS_SELECTOR, "pf-c-login__main-footer-links-item > button")
             )
         )
         identification_stage.find_element(
-            By.CLASS_NAME, "pf-c-login__main-footer-links-item-link"
+            By.CSS_SELECTOR, "pf-c-login__main-footer-links-item > button"
         ).click()
 
         # Now we should be at the IDP, wait for the login field
@@ -206,11 +206,11 @@ class TestSourceOAuth2(SeleniumTestCase):
 
         wait.until(
             ec.presence_of_element_located(
-                (By.CLASS_NAME, "pf-c-login__main-footer-links-item-link")
+                (By.CSS_SELECTOR, "pf-c-login__main-footer-links-item > button")
             )
         )
         identification_stage.find_element(
-            By.CLASS_NAME, "pf-c-login__main-footer-links-item-link"
+            By.CSS_SELECTOR, "pf-c-login__main-footer-links-item > button"
         ).click()
 
         # Now we should be at the IDP, wait for the login field
@@ -245,11 +245,11 @@ class TestSourceOAuth2(SeleniumTestCase):
 
         wait.until(
             ec.presence_of_element_located(
-                (By.CLASS_NAME, "pf-c-login__main-footer-links-item-link")
+                (By.CSS_SELECTOR, "pf-c-login__main-footer-links-item > button")
             )
         )
         identification_stage.find_element(
-            By.CLASS_NAME, "pf-c-login__main-footer-links-item-link"
+            By.CSS_SELECTOR, "pf-c-login__main-footer-links-item > button"
         ).click()
 
         # Now we should be at the IDP, wait for the login field
@@ -338,11 +338,11 @@ class TestSourceOAuth1(SeleniumTestCase):
 
         wait.until(
             ec.presence_of_element_located(
-                (By.CLASS_NAME, "pf-c-login__main-footer-links-item-link")
+                (By.CSS_SELECTOR, "pf-c-login__main-footer-links-item > button")
             )
         )
         identification_stage.find_element(
-            By.CLASS_NAME, "pf-c-login__main-footer-links-item-link"
+            By.CSS_SELECTOR, "pf-c-login__main-footer-links-item > button"
         ).click()
 
         # Now we should be at the IDP, wait for the login field
diff --git a/tests/e2e/test_source_saml.py b/tests/e2e/test_source_saml.py
index 8fbfbfccd..9c5240462 100644
--- a/tests/e2e/test_source_saml.py
+++ b/tests/e2e/test_source_saml.py
@@ -140,11 +140,11 @@ class TestSourceSAML(SeleniumTestCase):
 
         wait.until(
             ec.presence_of_element_located(
-                (By.CLASS_NAME, "pf-c-login__main-footer-links-item-link")
+                (By.CSS_SELECTOR, "pf-c-login__main-footer-links-item > button")
             )
         )
         identification_stage.find_element(
-            By.CLASS_NAME, "pf-c-login__main-footer-links-item-link"
+            By.CSS_SELECTOR, "pf-c-login__main-footer-links-item > button"
         ).click()
 
         # Now we should be at the IDP, wait for the username field
@@ -208,11 +208,11 @@ class TestSourceSAML(SeleniumTestCase):
 
         wait.until(
             ec.presence_of_element_located(
-                (By.CLASS_NAME, "pf-c-login__main-footer-links-item-link")
+                (By.CSS_SELECTOR, "pf-c-login__main-footer-links-item > button")
             )
         )
         identification_stage.find_element(
-            By.CLASS_NAME, "pf-c-login__main-footer-links-item-link"
+            By.CSS_SELECTOR, "pf-c-login__main-footer-links-item > button"
         ).click()
         sleep(1)
 
@@ -289,11 +289,11 @@ class TestSourceSAML(SeleniumTestCase):
 
         wait.until(
             ec.presence_of_element_located(
-                (By.CLASS_NAME, "pf-c-login__main-footer-links-item-link")
+                (By.CSS_SELECTOR, "pf-c-login__main-footer-links-item > button")
             )
         )
         identification_stage.find_element(
-            By.CLASS_NAME, "pf-c-login__main-footer-links-item-link"
+            By.CSS_SELECTOR, "pf-c-login__main-footer-links-item > button"
         ).click()
 
         # Now we should be at the IDP, wait for the username field