https://i.sstatic.net/um1dw.pngI need help navigating the dropdown list with the following code:
new WebDriverWait(driver, 50).until(ExpectedConditions.elementToBeClickable(By.xpath("//*[@id
> =\\\"s2id_autogen4_search\\']"))).click();
driver.findElement(By.xpath("//*[@id
> =\"s2id_autogen4_search\"]")).click();
driver.findElement(By.id("s2id_autogen4_search")).sendKeys("New
> York");
The HTML for the dropdown I am trying to automate is:
<input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="select2-input" role="combobox" aria-expanded="true" aria-autocomplete="list" aria-owns="select2-results-4" id="s2id_autogen4_search" placeholder="" aria-activedescendant="select2-result-label-68">
Detailed HTML structure:
[HTML content here]