mercredi 19 juillet 2017

selenium webdriver validate if checkbox is checked

I need to perform validation against the table that is being displayed like this.

daysTableCheck

The problems I have is that this table come with 2 tags first row represents the days and the second "checkboxes" as you can see they line up with days, however checkbox have no link to each day. I have tried to solve this with reverse logic to try to identify the input tag if is disabled. But when the box is selected it turns from input tag into tag, also I when I identify input tags I cannot pinpoint what day deselected box it corresponds to.

Does anyone have any advice or suggestion how to approach this type of validation? Thank you.

I have put the source to make it clearer how the picture above is presented.

<tbody>
 <tr bgcolor="whitesmoke">
   <td><b>Sun</b></td>
   <td><b>Mon</b></td>
   <td><b>Tues</b></td>
   <td><b>Wed</b></td>
   <td><b>Thurs</b></td>
   <td><b>Fri</b></td>
   <td><b>Sat</b></td>
 </tr>
 <tr>
   <td><img src="webwb/dhtmlx_iconcheckall.gif" /></td>
   <td><input disabled="disabled" type="checkbox" /></td>
   <td><input disabled="disabled" type="checkbox" /></td>
   <td><input disabled="disabled" type="checkbox" /></td>
   <td><img src="webwb/dhtmlx_iconcheckall.gif" /></td>
   <td><img src="webwb/dhtmlx_iconcheckall.gif" /></td>
   <td><input disabled="disabled" type="checkbox" /></td>
 </tr>
</tbody>




Aucun commentaire:

Enregistrer un commentaire