In my application i have a text box which when i enter the city name brings the city names to select a city.when i am trying to locate the element,it says it is unable to locate the element.
THis is HTML code
<ul id="autocomplete-options-fd419e03-fc56-725a-dc68-0dd3e55a2b19" class="autocomplete-content
dropdown-content" tabindex="0" style="display: block; width: 231.948px; left: 5px; top: 54px;
height: 50px; transform-origin: 0px 0px; opacity: 1; transform: scaleX(1) scaleY(1);">
<li class="active"><span><span class="highlight">Hyderabad</span></span></li></ul>
Here is my script code
driver.find_element_by_name('residential_city_id').send_keys("Hyderabad")
tme.sleep(5)
html_list=driver.find_element_by_id("autocomplete-options-fd419e03-fc56-725a-dc68-0dd3e55a2b19")
items = html_list.find_elements_by_tag_name("li")
for item in items:
text = item.text
print(text)
i am getting the following error
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate
element: {"method":"css selector","selector":"[id="autocomplete-options-fd419e03-fc56-725a-dc68-0dd3e55a2b19"]"}
(Session info: chrome=76.0.3809.132)