如何从selenium web-driver的下拉列表中选择出生日期?以下是我尝试过的方法:
Select oSelect = new Select(driver. findElement(By.id("month"))).click();发布于 2020-05-21 16:05:47
首先,应选择下拉元素
Select oSelect = new Select(driver.findElement(By.id("month")))现在,任何select方法都可以像这样使用
oSelect.selectByVisibleText("February") // or
oSelect.selectByIndex(1) // or
oSelect.selectByValue(value attribute of the element to be selected)https://stackoverflow.com/questions/61927157
复制相似问题