简体   繁体   中英

Not able to click on a button

I am not able to click on an element with the HTML below. This button is on an iframe, I have switched over to the iframe and performed several other operations on the same iframe. This button exists on the same iframe but is not getting clicked and giving a Element Not Visible Exception

The html is:

/*html*/
<table cellspacing="2" cellpadding="0" border="0" align="center">
<tbody>
<tr>
<td width="55" valign="baseline" align="center">
<td width="55" valign="baseline" align="center">
<input id="next_per" class="Button" width="55" type="button" align="bottom" onclick="changeTab(2)" value=" Next ">
</td>
<td width="55" valign="baseline" align="center">
</tr>
</tbody>
</table>

Dump the whole HTML of the iframe and search for id="next_per" in the dump. My guess is that there is more than one element with this ID.

If you have more than one element with the same ID, then it's undefined which one the browser will return when you do getElementById() . That's why you should make sure that all IDs in a single HTML document are unique.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM