Selenium IDE - Command to wait for 5 seconds

2019-01-31 22:26发布

I´m using the Selenium IDE for Firefox and searching for a wait command. My problem is that I want to test a website with a embedded external map. This external map needs 3-5 seconds to load.

My commands:

open /Page/mysite.html
//Wait Command? (5 seconds)
ClickAndWait link=do something

10条回答
smile是对你的礼貌
2楼-- · 2019-01-31 23:04

Before the command clickAndWait add the following code so the script will wait until the specific link to be visible:

   <tr>
        <td>waitForVisible</td>
        <td>link=do something</td>
        <td></td>
    </tr>

The practice of using the wait commands instead of pause is most of the times more efficient and more stable.

查看更多
ら.Afraid
3楼-- · 2019-01-31 23:11

For those working with ant, I use this to indicate a pause of 5 seconds:

<tr>
    <td>pause</td>
    <td>5000</td>
    <td></td>
</tr>

That is, target: 5000 and value empty. As the reference indicates:

pause(waitTime)

Arguments:

  • waitTime - the amount of time to sleep (in milliseconds)

Wait for the specified amount of time (in milliseconds)

查看更多
做自己的国王
4楼-- · 2019-01-31 23:11

In Chrome, For "Selenium IDE", I was also struggling that it doesn't pause. It will pause, if you give as below:

  • Command: pause
  • Target: blank
  • Value: 10000

This will pause for 10 seconds.

查看更多
神经病院院长
5楼-- · 2019-01-31 23:14

Use the pause command. Set speed to fastest (Actions --> Fastest), otherwise it won't work.

查看更多
登录 后发表回答