I am using Selenium for the first time and am overwhelmed by the options. I am using the IDE in Firefox.
When my page loads, it subsequently fetches values via an JS
Try the below code
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException
try:
# 10 is the maximum time to wait
element = WebDriverWait(driver, 10).until(
EC.presence_of_element_located((By.CSS_SELECTOR, "#mySelectId option[value='valueofOptionYouExpectToBeLoaded']"))
)
except TimeoutException:
print("Time out")
# Write your code