I'm working with Selenium and the Chrome Driver, But I haven't been able to find an element by ID. However, this element is visible in the web inspector of the browser. I think this is because the element is dynamically generated (all the time I see the same URL in the Browser Url Bar, but content changes dynamically.

The way to solve it is to properly undersand driver waits. The first page is the login page which I can get past by succesfully:

```
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
delay = 5

username = driver.find_element_by_name('Username')
password = driver.find_element_by_name('Password')
username.send_keys('my_username')
password.send_keys('my_password')
login = driver.find_element_by_id('login_button')
login.click()

```

After this step I can succesfully find the element called say, button\_a, after I click on this, the page generates a new button say, button\_b, for which I use a wait for presence command.

```
button_a = driver.find_element_by_id('button_a')
button_a.click()
WebDriverWait(driver, delay).until(
    EC.presence_of_element_located(
        driver.find_element_by_id('button_b')))

```

However this throws the classic exception:

```
selenium.common.exceptions.NoSuchElementException: Message: no such element:     Unable to locate element: {"method":"id","selector":"button_b"}

```

It seems that the driver is keeping a reference to the old DOM and doesn't keep track of new elements added to the DOM, the page is not reloaded after the click on button\_a but I just get the classic Spin Wheel where the client is dynamically generating new content. At this point I can clearly see that the button\_b id exists by right clicking on the browser and then inspect.

Is this possible to solve with Selenium?

Excuse me I'm just a total noob in web browser automation.