vendredi 6 mars 2015

Simulate click on button

I am testing an application that have the following html code:



...
<input
type="button"
class="picto modif"
onclick="hideDiv('divGlobalResult');showDiv('divForm')"
/>


When the user clicks on this button, the div divGlobalResult is hidden and the div divForm is shown.


I want to simulate this action with Selenium. Here is how I did:



focus css=input.picto.modif
fireEvent css=input.picto.modif click


However, the divForm appears while the second div divGlobalResult stays on the screen...


What am I missing?





function hideDiv(idDivElement) {
$("#" + idDivElement).css("display", "none");
}

function showDiv(idDivElement) {
$("#" + idDivElement).css("display", "");
}

Aucun commentaire:

Enregistrer un commentaire