Моя веб-страница построена с использованием инфраструктуры Polymer JS. Я пытаюсь выбрать раскрывающееся значение внутри моего теневого элемента с помощью приведенного ниже кода. Я перешел к последней точке, но выбор не произошел, я хочу выбрать любое раскрывающееся меню. элемент с экрана на основе текста (trip.com, priceline.com и др. c), пожалуйста, помогите.
WebElement root2 = shadowRoot1.findElement(By.id("hotels-search"));
WebElement shadowRoot2 = expandRootElement(root2);
WebElement root3 = shadowRoot2.findElement(By.id("detail"));
WebElement shadowRoot3 = expandRootElement(root3);
WebElement root4 = shadowRoot3.findElement(By.id("rates"));
WebElement shadowRoot4 = expandRootElement(root4);
WebElement root5 = shadowRoot4.findElement(By.tagName("hotel-rates-sort-bar"));
WebElement shadowRoot5 = expandRootElement(root5);
WebElement element = shadowRoot5.findElement(By.cssSelector("#__providersDropdown > div.dropdown > div"));
Select select= new Select(element);
select.selectByIndex(2);```
**My elements in the below screenshot**
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/buYuq.png