2012-04-11 25 views
9

Tentativo di selenio IDE. Sto ottenendo un errore intermittente, ho provato a rallentare l'IDE ma succede ancora. Comincio w/google e cerco fishbase, poi faccio clic su search fishbase link - quindi "common name is" e inserisco Taron e mi piace il link più "usa". Di solito riceve un errore nello stesso posto "[errore] Nome elemento = Nome comune non trovato", 9 volte su dieci ha un problema lì. Spero di aver fornito abbastanza informazioni. Utilizzo di Ubuntu 11.10 e FF 11.0. Ho una connessione molto veloce ma muovo il cursore per rallentare. Perché si verifica questo problema?Selenium IDE, [errore] Nome elemento .... non trovato

Ha funzionato la prima volta ma non la seconda volta ... grazie.

[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 

risposta

1

Questo risolverà il vostro 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 semplicemente mettere pausa prima che il comando type| name=CommonName |Tarpon

+0

cercare di evitare l'uso di 'pause' dove è possibile, perché è una cattiva pratica –

+0

@Rohit Ware, grazie una tonnellata! La tua soluzione ha salvato la mia giornata :) – npatel

1

È possibile aggiungere waitForElementPresent comando. Funziona con il parametro IDE più veloce:

<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> 
Problemi correlati