4
Command : clickAndWait
Target  : some xpath of the location

在 selenium IDE 中执行此命令后,将数据加载到页面中需要大量时间。所以在 IDE 的日志中,我可以看到'Timed out after 30000ms'.

是否可以增加/减少值 30000ms ?

Command              Target         Value
click              id=ext-gen007    
waitForPageToLoad    60000          wait for one minute
click              id=ext-gen008    
waitForPageToLoad    60000          wait for one minute
click              id=ext-gen009    
waitForPageToLoad    60000          wait for one minute

我正在使用 Selenium IDE 1.8.1 ,在按上述方式进行编辑后,会出现错误'Timed out after 60000ms'

4

1 回答 1

4

在 Selenium2 / Webdriver 你必须使用setTimeout(long milliseconds)

使用 Selenium,您必须使用:

<tr>
    <td>setTimeout</td>
    <td>60000</td>
    <td>Wait 60 seconds for the page</td>
</tr>

参见setTimeout ( timeout )Selenium Reference
也看看waitForPageToLoad ( timeout )

<tr>
    <td>click</td>
    <td>Your XPath</td>
    <td></td>
</tr>
<tr>
    <td>waitForPageToLoad</td>
    <td>60000</td>
    <td>Wait one minute</td>
</tr>
于 2012-06-21T06:36:04.890 回答