2012-04-11 15 views
9

Probieren Selenium IDE. Ich bekomme einen zeitweiligen Fehler, ich habe versucht, die IDE zu verlangsamen, aber es passiert immer noch. Ich starte mit Google und suche nach fishbase, dann klicke ich auf fishbase link - dann "common name is" und ich setze Taron rein und mag den obersten "usa" link. Normalerweise wird ein Fehler an der gleichen Stelle "[error] Element name = CommonName not found" gefunden, 9 mal von zehn hat es dort ein Problem. Ich hoffe, ich habe genug Informationen zur Verfügung gestellt. Ubuntu 11.10 und FF 11.0 verwenden. Ich habe eine sehr schnelle Verbindung, aber bewege den Schieber langsam. Warum tritt dieses Problem auf?Selenium IDE, [Fehler] Elementname .... nicht gefunden

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

Es funktionierte das 1. Mal aber nicht das 2. Mal ... danke.

[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 

Antwort

1

Dies wird Ihr Problem lösen

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

Oder einfach setzen Pause, bevor Befehl type| name=CommonName |Tarpon

+0

Versuchen Sie es mit der 'pause' zu ​​vermeiden, wo es möglich ist, weil es eine schlechte Praxis –

+0

@Rohit Ware, vielen Dank Tonne ist! Deine Lösung hat meinen Tag gerettet :) – npatel

1

Sie waitForElementPresent Befehl hinzufügen können. Kompatibel mit schnellsten IDE Parameter:

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