I have an angular 11 website that I wish to write automated tests for. The issue I'm having is that all the templates/fields/labels/inputs etc load first. Then the data is fetched from the database using a GET method. This creates a problem since the tests wait for an input element to appear, the element appears. The test starts writing "hello world" into that input. The web then finished fetching the data from the backend. and overwrites "hello world".
I don't understand how I can wait for the GET request to finish since that information is hidden from Selenium.
What i've tried so far. but this just waits for the element but not the data:
wait = WebDriverWait(driver, 25)
element = driver.find_element(By.CSS_SELECTOR, user_name_id)
wait.until(expected_conditions.element_to_be_clickable(By.CSS_SELECTOR, user_name_id)
element.send_keys(text)