当我使用如下代码时
Select (driver.findElement(By.id("visualizationid"))).selectByVisibleText("Week");
我收到错误消息,例如:
无法定位元素:
{"method":"id","selector":"visualizationid"} 命令持续时间或超时:30.12 秒
无法准确判断。HTML 代码片段如下所示:
<select id="visualizationId" style="width: 120px; display: none;" name="visualization">
<option value="day">Day</option>
<option value="week">Week</option>
<option selected="" value="month">Month</option>
<option value="quarter">Quarter</option>
<option value="semester">Semester</option>
<option value="year">Year</option>
<!-- ... -->
</select>