<a id="SIU2_country" class="button combobox-button country" onclick="event.cancelBubble = true; if (event.stopPropagation) { event.stopPropagation(); }" tabindex="9" style="cursor: auto;">
<span id="SIU2_country_span"> </span>
<div class="combobox-menu" style="width: 298px; max-height: 212px; display: block;">
<div class="combobox-menu-item">
<span>United States</span>
</div>
<div class="combobox-menu-item">
<span>United Kingdom</span>
</div>
<div class="combobox-menu-item">
试图避免在 Webdriver 中使用 xpath :
(By.xpath("//a[@id= SIU2_country ]/div/div/span[contains(text(), United Kingdom )]"));
我如何使用 id 或 csselector 从下调列表中选择联合王国?
谢谢!