0

如何从弹出的日历中选择日期?有一个文本字段处于禁用模式。当您单击文本字段角落的日历图标时,会弹出日历,其中显示当前第 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>
4

0 回答 0