wait for a popup to appear

View: New views
2 Messages — Rating Filter:   Alert me  

wait for a popup to appear

by flamant :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I click on a button in my selenium script so that a popup appear. The problem is that the following script doesn't execute properly. It seems that the following script begins to execute before the popup appears and everything stops.
here is the concerned code :

<tr>
        <td>click</td>
        <td>//input[@id='recordButton' and @value='Mémoriser']</td>
        <td></td>
</tr>
<tr>
        <td>waitForPopUp</td>
        <td></td>
        <td>30000</td>
</tr>
<tr>
        <td>type</td>
        <td>title</td>
        <td>request1</td>
</tr>
<tr>
        <td>type</td>
        <td>desc</td>
        <td>premiere requete test</td>
</tr>
<tr>
        <td>clickAndWait</td>
        <td>rsave</td>
        <td></td>
</tr>

can anybody help me ?

Re: wait for a popup to appear

by kjaladi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It works well for me. Can I know the error that you are facing? this is the sample test that I ran, and it times out only after 10 seconds.

<tr>
        <td>open</td>
        <td>https://www.google.com</td>
        <td></td>
</tr>
<tr>
        <td>type</td>
        <td>q</td>
        <td>Anderson Copper</td>
</tr>
<tr>
        <td>click</td>
        <td>btnG</td>
        <td></td>
</tr>
<tr>
        <td>waitForPopUp</td>
        <td></td>
        <td>10000</td>

thanks.

flamant wrote:
Hi,
I click on a button in my selenium script so that a popup appear. The problem is that the following script doesn't execute properly. It seems that the following script begins to execute before the popup appears and everything stops.
here is the concerned code :

<tr>
        <td>click</td>
        <td>//input[@id='recordButton' and @value='Mémoriser']</td>
        <td></td>
</tr>
<tr>
        <td>waitForPopUp</td>
        <td></td>
        <td>30000</td>
</tr>
<tr>
        <td>type</td>
        <td>title</td>
        <td>request1</td>
</tr>
<tr>
        <td>type</td>
        <td>desc</td>
        <td>premiere requete test</td>
</tr>
<tr>
        <td>clickAndWait</td>
        <td>rsave</td>
        <td></td>
</tr>

can anybody help me ?