Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

335
Views
Selenium: Drop Down list with div tag instead of select tag

I am new to automated testing with Selenium Web Driver. I am not able to figure it how to test drop down lists of the location type without using the select command. I have div tag.

I was trying to send keys but did not work.

I am working on this website: https://freightpower.schneider.com (>>get a quote>>less than truckload) You may then need to register but it is very quick.enter image description here

enter image description here

 driver.find_elements(by=By.XPATH, value = '//div[@class="dropdownstyle__StyledValueContainer-sc-13n3p0k-2 dIpAqS"]')[0].click()

Then I need to choose one of the options but could not do it. Any help would be appreciated ! I know how I can choose if I could have select tag but now I do not have it and really do not know what to do although checking many related questions.

enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

In my project, I am using selenium automated test. There is an selection box that includes hospital names and user choose hospitals. Maybe you can use find_element_by_id and find_elements_by_tag_name together like this:

try:
    el = driver.find_element_by_id('hospital_name')
    for option in el.find_elements_by_tag_name('option'):
        if option.text == 'Mount Sinai West':
            time.sleep(5)
            logging.info("Hospital name was added")
            option.click()
            break
except Exception as e:
    logging.exception(e)
    raise e
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!