diff --git a/e2e/test_provider_oauth.py b/e2e/test_provider_oauth.py index 722872377..1cff7f366 100644 --- a/e2e/test_provider_oauth.py +++ b/e2e/test_provider_oauth.py @@ -104,22 +104,19 @@ class TestProviderOAuth(SeleniumTestCase): ) self.assertEqual( self.driver.find_element( - By.XPATH, - "/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[1]/div/input", + By.CSS_SELECTOR, "input[name=name]" ).get_attribute("value"), USER().username, ) self.assertEqual( self.driver.find_element( - By.XPATH, - "/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[2]/div/input", + By.CSS_SELECTOR, "input[name=email]" ).get_attribute("value"), USER().email, ) self.assertEqual( self.driver.find_element( - By.XPATH, - "/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[3]/div/input", + By.CSS_SELECTOR, "input[name=login]" ).get_attribute("value"), USER().username, ) @@ -176,22 +173,19 @@ class TestProviderOAuth(SeleniumTestCase): ) self.assertEqual( self.driver.find_element( - By.XPATH, - "/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[1]/div/input", + By.CSS_SELECTOR, "input[name=name]" ).get_attribute("value"), USER().username, ) self.assertEqual( self.driver.find_element( - By.XPATH, - "/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[2]/div/input", + By.CSS_SELECTOR, "input[name=email]" ).get_attribute("value"), USER().email, ) self.assertEqual( self.driver.find_element( - By.XPATH, - "/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[3]/div/input", + By.CSS_SELECTOR, "input[name=login]" ).get_attribute("value"), USER().username, ) diff --git a/e2e/test_provider_oidc.py b/e2e/test_provider_oidc.py index 73b653cbe..8bd51e50f 100644 --- a/e2e/test_provider_oidc.py +++ b/e2e/test_provider_oidc.py @@ -154,22 +154,19 @@ class TestProviderOIDC(SeleniumTestCase): ) self.assertEqual( self.driver.find_element( - By.XPATH, - "/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[1]/div/input", + By.CSS_SELECTOR, "input[name=name]" ).get_attribute("value"), USER().name, ) self.assertEqual( self.driver.find_element( - By.XPATH, - "/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[2]/div/input", + By.CSS_SELECTOR, "input[name=email]" ).get_attribute("value"), USER().email, ) self.assertEqual( self.driver.find_element( - By.XPATH, - "/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[3]/div/input", + By.CSS_SELECTOR, "input[name=login]" ).get_attribute("value"), USER().email, ) @@ -236,22 +233,19 @@ class TestProviderOIDC(SeleniumTestCase): ) self.assertEqual( self.driver.find_element( - By.XPATH, - "/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[1]/div/input", + By.CSS_SELECTOR, "input[name=name]" ).get_attribute("value"), USER().name, ) self.assertEqual( self.driver.find_element( - By.XPATH, - "/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[2]/div/input", + By.CSS_SELECTOR, "input[name=email]" ).get_attribute("value"), USER().email, ) self.assertEqual( self.driver.find_element( - By.XPATH, - "/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[3]/div/input", + By.CSS_SELECTOR, "input[name=login]" ).get_attribute("value"), USER().email, )