Hi,
I,m using clickAndWait to click on a button. But I got an error that
says the button was not found. I guess this is because there is more than one button at the same level of the html code.
selenium.clickAndWait("//input[@value='Réserver']");
The number of buttons is generated dynamically and the onclick value is different for each of the buttons.
<b>12 500 milles</b>/chambre/nuit</div>
<div class="order">
<input type="button" value="Réserver" onmouseover="if (this.disabled != 'true') this.className = 'action-button-hover';" onmouseout="if (this.disabled != 'true') this.className = 'action-button';" class="action-button" onclick="submitHotel('CA','Direct','SI','VO','271','12500','12500', 'BookThis');return false;">
</div>
</div>
</div>
<div class="detail">
<div class="images">
<center>
<img width="125" onclick="submitHotel('CA','Direct','SI','VO','271','12500','12500', 'Details');return false;" src="http://localhost:8086/static/gfx/hotel/VO/she271lo.46594_md.jpg"><br>
<img onclick="submitHotel('CA','Direct','SI','VO','271','12500','12500', 'Details');return false;" src="http://localhost:8086/static/gfx/hotel/SI/logo.gif"></center>
</div>
<div class="description">
<b>Sheraton Centre Toronto Hotel</b>
<br>
<br>S'étalant sur 10 hectares de cascades, de jardins et de terrasses pittoresques, le remarquable Sheraton Centre Toronto Hotel, classé Quatre Diamants par la CAA/AAA, est une véritable oasis de fraîcheur parmi les hôtels du centre de Toronto. Superbement situé au cœur du quartier des théâtres et des lieux de divertissement de la ville, nous sommes à deux pas du centre commercial Eaton et des...<br>
<br>
<a class="arrow-double" href="" onclick="submitHotel('CA','Direct','SI','VO','271','12500','12500', 'Details');return false;">Voir détails</a>
</div>
</div>
</div>
<br>
<div>
<div class="summary">
<div class="address">
<b>The Fairmont Royal York</b>
<br>100 Front Street West<br>Toronto ON<br>M5J 1E3, Canada</div>
<div class="distance-rooms">Aéroport : 21 km<br>Nombre de chambres : 1 365</div>
<div class="cost">
<div class="rate">Coût minimum<br>
<b>27 500 milles</b>/chambre/nuit</div>
<div class="order">
<input type="button" value="Réserver" onmouseover="if (this.disabled != 'true') this.className = 'action-button-hover';" onmouseout="if (this.disabled != 'true') this.className = 'action-button';" class="action-button" onclick="submitHotel('CA','Direct','FA','FA','RYH','27500','39000', 'BookThis');return false;">
</div>
</div>
how can I get the first button?