Answer the question
In order to leave comments, you need to log in
Can't select Selenium dropdown list?
Good evening. There was a problem when automating the browser on the site mos.ru
I can not select an element from the drop-down list, I tried both by value and by visible text, the code in python:
select = Select(driver.find_element_by_name('field[internal.new_okrug]'))
select.select_by_visible_text('Восточный административный округ')
Message: element not interactable: Element is not currently visible and may not be manipulated
(Session info: chrome=90.0.4430.212)
category = driver.find_element_by_xpath(r'//*[@id="field[internal.person_type]-1"]')
driver.execute_script("arguments[0].click();", category)
Answer the question
In order to leave comments, you need to log in
I also noticed that the "li" tag is clickable on the Xpath if I open the list manually, but how can I automate this so that the list item is selected without my help?
select = driver.find_element_by_xpath('//*[@id="step_1"]/fieldset[1]/div[9]/div[1]/div[1]/div/div/ul/li[7]')
select.click()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question