如何从弹出的日历中选择日期?有一个处于禁用模式的文本字段。当您单击文本字段一角的日历图标时,会弹出日历,其中显示当前第1天和当前第2天,启用此选项并禁用其他日期。我需要选择上述2天的日期。我如何在selenium java中做到这一点?
以下是日历的HTML代码:
<a href="javascript: fooCalendar.show()">
<img width="16" height="14" border="0" src="images/dynCalendar.gif"/>
</a>
<div id="dynCalendar_layer_0" class="dynCalendar" onmouseout="fooCalendar._mouseover(false)"
onmouseover="fooCalendar._mouseover(true)" style="visibility: visible; top: 367px; left: 216px;">
<table width="219" border="0" bgcolor="#DBE7F4">
<tbody>
<tr>
<td width="219" colspan="7">
</tr>
<tr>
<td class="dynCalendar_dayname" width="27">Sun</td>
<td class="dynCalendar_dayname" width="27">Mon</td>
<td class="dynCalendar_dayname" width="27">Tue</td>
<td class="dynCalendar_dayname" width="27">Wed</td>
<td class="dynCalendar_dayname" width="27">Thu</td>
<td class="dynCalendar_dayname" width="27">Fri</td>
<td class="dynCalendar_dayname" width="27">Sat</td>
</tr>
<tr>
<td/>
<td/>
<td/>
<td/>
<td class="dynCalendar_disabled" align="center">1</td>
<td class="dynCalendar_disabled" align="center">2</td>
<td class="dynCalendar_disabled" align="center">3</td>
</tr>
<tr>
<td class="dynCalendar_disabled" align="center">4</td>
<td class="dynCalendar_disabled" align="center">5</td>
<td class="dynCalendar_disabled" align="center">6</td>
<td class="dynCalendar_disabled" align="center">7</td>
<td class="dynCalendar_disabled" align="center">8</td>
<td class="dynCalendar_disabled" align="center">9</td>
<td class="dynCalendar_day" align="center">
<a href="javascript: calendarSuspend(10, 8, 2013); fooCalendar._hideLayer()">10</a>
</td>
</tr>
<tr>
<td class="dynCalendar_day" align="center">
<a href="javascript: calendarSuspend(11, 8, 2013); fooCalendar._hideLayer()">11</a>
</td>
<td class="dynCalendar_today" align="center">12</td>
<td class="dynCalendar_disabled" align="center">13</td>
<td class="dynCalendar_disabled" align="center">14</td>
<td class="dynCalendar_disabled" align="center">15</td>
<td class="dynCalendar_disabled" align="center">16</td>
<td class="dynCalendar_disabled" align="center">17</td>
</tr>
<tr>
<td class="dynCalendar_disabled" align="center">18</td>
<td class="dynCalendar_disabled" align="center">19</td>
<td class="dynCalendar_disabled" align="center">20</td>
<td class="dynCalendar_disabled" align="center">21</td>
<td class="dynCalendar_disabled" align="center">22</td>
<td class="dynCalendar_disabled" align="center">23</td>
<td class="dynCalendar_disabled" align="center">24</td>
</tr>
<tr>
<td class="dynCalendar_disabled" align="center">25</td>
<td class="dynCalendar_disabled" align="center">26</td>
<td class="dynCalendar_disabled" align="center">27</td>
<td class="dynCalendar_disabled" align="center">28</td>
<td class="dynCalendar_disabled" align="center">29</td>
<td class="dynCalendar_disabled" align="center">30</td>
<td class="dynCalendar_disabled" align="center">31</td>
</tr>
</tbody>
</table>
<table width="219" cellspacing="0" cellpadding="0" border="0">
<tbody>
</table>
</div>