2012-04-11 18 views
9

Trying Selenium IDE. Recibo un error intermitente, he intentado ralentizar el IDE pero todavía sucede. Empiezo con w/google y busco fishbase, luego hago clic en buscar enlace de base de datos, luego "nombre común es" y pongo Taron y me gusta el enlace "usa" más alto. Por lo general, recibe el error en el mismo lugar "[error] Element name = CommonName no encontrado", 9 de cada 10 veces tiene un problema. Espero haber proporcionado suficiente información. Usando Ubuntu 11.10 y FF 11.0. Tengo una conexión muy rápida pero muevo el control deslizante para ralentizar. ¿Por qué ocurre este problema?IDE de selenio, [error] Nombre del elemento .... no encontrado

<tr> 
    <td>open</td> 
    <td>/</td> 
    <td></td> 
</tr> 
<tr> 
    <td>type</td> 
    <td>id=gbqfq</td> 
    <td>fishbase</td> 
</tr> 
<tr> 
    <td>clickAndWait</td> 
    <td>css=em</td> 
    <td></td> 
</tr> 
<tr> 
    <td>type</td> 
    <td>name=CommonName</td> 
    <td>Tarpon</td> 
</tr> 
<tr> 
    <td>clickAndWait</td> 
    <td>css=input[type=&quot;button&quot;]</td> 
    <td></td> 
</tr> 
<tr> 
    <td>clickAndWait</td> 
    <td>link=Tarpon</td> 
    <td></td> 
</tr> 

Funcionó la primera vez, pero no la segunda vez ... gracias.

[info] Executing: |open |/| | 
[info] Executing: |type | id=gbqfq | fishbase | 
[info] Executing: |clickAndWait | css=em | | 
[info] Executing: |type | name=CommonName | Tarpon | 
[info] Executing: |clickAndWait | css=input[type="button"] | | 
[info] Executing: |clickAndWait | link=Tarpon | | 
[info] Executing: |open |/| | 
[info] Executing: |type | id=gbqfq | fishbase | 
[info] Executing: |clickAndWait | css=em | | 
[info] Executing: |type | name=CommonName | Tarpon | 
[error] Element name=CommonName not found 

Respuesta

1

Esto va a resolver su problema

<tr> 
     <td>click</td> 
     <td>css=em</td> 
     <td></td> 
    </tr> 
    <tr> 
     <td>pause</td> 
     <td>7000</td> 
     <td></td> 
    </tr> 
    <tr> 
     <td>type</td> 
     <td>name=CommonName</td> 
     <td>Tarpon</td> 
    </tr> 

o hacer una pausa sólo hay que poner antes de comandos type| name=CommonName |Tarpon

+0

tratar de evitar el uso de 'pause' donde es posible, ya que es una mala práctica –

+0

@Rohit Ware, gracias una tonelada! Tu solución me salvó el día :) – npatel

1

Puede añadir waitForElementPresent comando. Funciona con el parámetro IDE más rápida:

<tr> 
    <td>open</td> 
    <td>/</td> 
    <td></td> 
</tr> 
<tr> 
    <td>type</td> 
    <td>id=gbqfq</td> 
    <td>fishbase</td> 
</tr> 
<tr> 
    <td>waitForElementPresent</td> 
    <td>css=em</td> 
    <td></td> 
</tr> 
<tr> 
    <td>clickAndWait</td> 
    <td>css=em</td> 
    <td></td> 
</tr> 
<tr> 
    <td>waitForElementPresent</td> 
    <td>name=CommonName</td> 
    <td></td> 
</tr> 
<tr> 
    <td>type</td> 
    <td>name=CommonName</td> 
    <td>Tarpon</td> 
</tr> 
<tr> 
    <td>waitForElementPresent</td> 
    <td>css=input[type=&quot;button&quot;]</td> 
    <td></td> 
</tr> 
<tr> 
    <td>clickAndWait</td> 
    <td>css=input[type=&quot;button&quot;]</td> 
    <td></td> 
</tr> 
<tr> 
    <td>clickAndWait</td> 
    <td>link=Tarpon</td> 
    <td></td> 
</tr> 
Cuestiones relacionadas