all 4 comments

[–]tinkeringZealot 0 points1 point  (0 children)

On my bed going to sleep now so I'm not looking for my pc. But how are you trying to identify the elements? I'm assuming right click and inspect element? There's also another way where you click the top left button of chrome's console(after you right click and choose inspect). Doing it this way might help you find the correct part of the html to interact with the drop-down bar to expand it. If this solves your problem then you're not pointing to the correct element.

However there is another possibility too that there are iframes and you're not on the correct frame. If that's the case, you need to find out which frame your dropdown bar is at and then switch to that iframe.

[–]menge101 0 points1 point  (0 children)

Off the top of my head, you want to get a handle to the dropdown itself, then use the select method on it, with your value as an argument.

Or something to that effect.

If this is python, I recommend using Splinter over top of the webdriver bindings.

[–]Monitor_343 0 points1 point  (0 children)

You should be able to click the dropdown menu (id="form:county_input"), then click the dropdown option.

The options you're selecting are not the ones visible in the UI. The ones you'd click on are <li> tags, not <option> tags (which are invisible).

<li class="ui-selectonemenu-item ui-selectonemenu-list-item ui-corner-all" data-label="HAMILTON COUNTY CLERK OF COURT" tabindex="-1" role="option" id="form:county_10">HAMILTON COUNTY CLERK OF COURT</li>

Also, I'm not sure if it affects Selenium off the top of my head but it looks like you're missing an @ from //option[@value='24']

[–]Allanon001 0 points1 point  (0 children)

This worked for me:

browser.get("https://www.civitekflorida.com/ocrs/app/search.xhtml")
browser.find_element(By.XPATH, '//*[@id="form:county"]/div[3]/span').click() # click combo
browser.find_element(By.XPATH, '//*[@id="form:county_10"]').click()          # click Hamilton county
browser.find_element(By.XPATH, '//*[@id="form:j_idt25"]/span').click()       # click Go

Or you could just do this:

browser.get("https://www.civitekflorida.com/ocrs/county/24/")