bdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

<span class="code-comment"># Wait up to 10 seconds for the element to be present</span>
element = WebDriverWait(driver, 10).until(
    EC.presence_of_element_located((By.ID, "dynamically-loaded-element"))
)

<span class="code-comment"># Find elements by various methods</span>
<span class="code-comment"># By ID</span>
element_by_id = driver.find_element(By.ID, "element-id")

<span class="code-comment"># 