Q:

Unable to locate element using Selenium

I have reviewed several questions pertaining to this popular topic but have not yet found a solution. I am trying to scrape a dynamic webpage that requires the user to click something and then enter some input. The site I am trying to scrape is here: https://a810-dobnow.nyc.gov/publish/#!/
I am trying to click where it says "Building Identification Number" and proceed to enter some input. I cannot seem to even locate the element I need to click. I used a wait and also checked to see if it was located in some other frame I needed to switch to, it is not as far as I can see:
driver = webdriver.Chrome("C:\\Users\\#####\\Downloads\\chromedriver_win32\\chromedriver.exe")
driver.get("https://a810-dobnow.nyc.gov/publish/#!/")
element = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.XPATH, "//*[@id=""accordiongroup-9-9180-tab""]/h4/a/span/h3")))
driver.find_element_by_xpath("//*[@id=""accordiongroup-9-9180-tab""]/h4/a/span/h3").click()

A:

I just loaded the page, and when i try to search the dom for the xpath you have provided it fails to find the matching element.
I'd recommend using something like:
driver.find_element_by_xpath("//h3[contains(text(), 'Building Identification Number (BIN)')]").click()

Hope this helps

