I'm trying to use selenium on a search box on this site: https://www.claytoncountyga.gov/government/sheriff/inmate-search
def clayton_search(last, first, middle):
print("Clayton County Jail")
url = "https://www.claytoncountyga.gov/government/sheriff/inmate-search"
driver = webdriver.Chrome(chrome_options=(), executable_path="/usr/bin/chromedriver")
driver.get(url)
wait = WebDriverWait(driver, 30)
wait.until(EC.visibility_of_element_located((By.CSS_SELECTOR, "#name")))
driver.find_element_by_css_selector("#name").send_keys(last," ",first, " ", middle, Keys.ENTER)
return driver
driver = clayton_search(last, first, middle)
The site uses angularJS, and I know that on angularJS sites selenium wont see see elements unless you tell it to wait until the element is visible. Such as:
wait.until(EC.visibility_of_element_located((By.CSS_SELECTOR, "#name")))
But I get a timeout exception. I've tried finding the element by CSS selector, XPATH, and ID.
Even though the stack trace didn't indicate it might be hiding behind another element. I tried that too by using: driver.execute_script
I thought maybe the pop up menu from the navigator bar might be covering it, but It only appear when the cursor is over the nav bar.
Why am I not able to use wait.until(EC.visibility_of_element_located to locate the element on this AngularJS site?
#nameis insideiframe- forSeleniumitems iniframeare not part of page. You have to findiframeandswitch_to()to this frame to find element in thisiframe