在Selenium IDE中使用Selblocks时出错

时间:2016-06-23 12:37:28

标签: selenium selenium-ide

我对Selenium IDE的Selblocks扩展有问题。我准备了XML文件:

<testdata>
    <vars projekt="1-2OM0W5"/>
    <vars projekt="1-2P3K19"/>
    <vars projekt="1-2P2O6L"/>
    <vars projekt="1-2P00UN"/>
    <vars projekt="1-2OW20F"/>
</testdata>

Selenium正确地从XML获取第一个值。不幸的是在endForXml命令之后我有这样的错误:

[error] Unexpected Exception: TypeError: activeBlockStack(...).top(...) is undefined. 

`<tr>
    <td>loadTestData</td>
    <td>file://C://Users//mkulesza//Desktop//14.4 RELEASE/new&nbsp;&nbsp;10.xml</td>
    <td></td>
</tr>
<tr>
    <td>while</td>
    <td>!testdata.EOF()</td>
    <td></td>
</tr>
<tr>
    <td>nextTestData</td>
    <td></td>
    <td></td>
</tr>
<tr>
    <td>store</td>
    <td></td>
    <td>klient</td>
</tr>
<tr>
    <td>store</td>
    <td></td>
    <td>wycena_clnet</td>
</tr>
<tr>
    <td>store</td>
    <td></td>
    <td>numer</td>
</tr>
<tr>
    <td>open</td>
    <td>http://clnet-prp/Main.aspx</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>id=FindMenu1_btnCosting</td>
    <td></td>
</tr>
<tr>
    <td>clickAt</td>
    <td>id=AssignedTo_chosen</td>
    <td></td>
</tr>
<tr>
    <td>clickAt</td>
    <td>xpath=/html/body/table[2]/tbody/tr/td/div/form/fieldset/div[2]/table[2]/tbody/tr/td[1]/table/tbody/tr[1]/td[2]/div/div/div/ul/li[contains(.,&quot;wszy&quot;)]</td>
    <td></td>
</tr>
<tr>
    <td>type</td>
    <td>id=QuotaId</td>
    <td>${projekt}</td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>id=btnForm</td>
    <td></td>
</tr>
<tr>
    <td>pause</td>
    <td>2000</td>
    <td></td>
</tr>
<tr>
    <td>storeText</td>
    <td>xpath=html/body/table[2]/tbody/tr/td/div/fieldset/div/div/div/div/table/tbody/tr/td[1]</td>
    <td>numer</td>
</tr>
<tr>
    <td>echo</td>
    <td>${numer}</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>link=${projekt}</td>
    <td>link=${projekt}</td>
</tr>
<tr>
    <td>clickAt</td>
    <td>id=assignedTo_chosen</td>
    <td></td>
</tr>
<tr>
    <td>clickAt</td>
    <td>xpath=/html/body/table[2]/tbody/tr/td/div/form[1]/fieldset/div/div[2]/div[3]/div/div[2]/div/div/div/ul/li[contains(.,&quot;CLNET_TEST_PM&quot;)]</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>id=btnChangeAssigment</td>
    <td></td>
</tr>
<tr>
    <td>refreshAndWait</td>
    <td></td>
    <td></td>
</tr>
<tr>
    <td>select</td>
    <td>id=ActionPerformed</td>
    <td>Zaakceptuj do wyceny (Accepted)</td>
</tr>
<tr>
    <td>type</td>
    <td>id=comment</td>
    <td>Test Comment</td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>id=btnPerformAction</td>
    <td></td>
</tr>
<tr>
    <td>storeText</td>
    <td>xpath=/html/body/table[2]/tbody/tr/td/div/fieldset[2]/div/table/tbody/tr/td[1]/div/div[2]/span</td>
    <td>klient</td>
</tr>
<tr>
    <td>echo</td>
    <td>${klient}</td>
    <td></td>
</tr>
<tr>
    <td>echo</td>
    <td>${wycena_clnet}</td>
    <td></td>
</tr>
<tr>
    <td>open</td>
    <td>https://solver/test/DataDigger/Public/index.php</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>//ul[@id='menu-content-5']/li/p</td>
    <td></td>
</tr>
<tr>
    <td>pause</td>
    <td>6000</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>xpath=/html/body/div[5]/div/div[2]/button[1]</td>
    <td></td>
</tr>
<tr>
    <td>type</td>
    <td>name=QuoteIdShow</td>
    <td>${numer}</td>
</tr>
<tr>
    <td>sendKeys</td>
    <td>name=QuoteIdShow</td>
    <td>${KEY_DOWN}</td>
</tr>
<tr>
    <td>pause</td>
    <td>2000</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>//a[contains(text(), '${numer} ${klient}')]</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>name=realSelection</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>xpath=/html/body/div[5]/div[2]/div[2]/div[3]/button[1]</td>
    <td></td>
</tr>
<tr>
    <td>assertConfirmation</td>
    <td>Jesteś pewien, że chcesz dodać?</td>
    <td></td>
</tr>
<tr>
    <td>pause</td>
    <td>5000</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>xpath=/html/body/div[5]/div[2]/div[2]/div[2]/div/div[1]/div[1]/div/div[2]/div/div/div/table/tfoot/tr/th[1]/div/button[2]</td>
    <td></td>
</tr>
<tr>
    <td>type</td>
    <td>xpath=/html/body/div[5]/div[2]/div[2]/div[2]/div/div[1]/div[1]/div/div[2]/div/div/div/table/tbody/tr[2]/td[2]/div/div[1]/dd/input</td>
    <td>DATERA</td>
</tr>
<tr>
    <td>sendKeys</td>
    <td>xpath=/html/body/div[5]/div[2]/div[2]/div[2]/div/div[1]/div[1]/div/div[2]/div/div/div/table/tbody/tr[2]/td[2]/div/div[1]/dd/input</td>
    <td>${KEY_DOWN}</td>
</tr>
<tr>
    <td>pause</td>
    <td>3000</td>
    <td></td>
</tr>
<tr>
    <td>clickAt</td>
    <td>xpath=/html/body/div[5]/div[2]/ul[9]/li[3]/a[contains(text(), 'DATERA Call-eX brama GSM x 4')]</td>
    <td></td>
</tr>
<tr>
    <td>type</td>
    <td>xpath=/html/body/div[5]/div[2]/div[2]/div[2]/div/div[1]/div[1]/div/div[2]/div/div/div/table/tbody/tr[2]/td[3]/div/div[1]/dd/textarea[2]</td>
    <td>TEST</td>
</tr>
<tr>
    <td>click</td>
    <td>css=.SaveUpdateButton</td>
    <td></td>
</tr>
<tr>
    <td>assertConfirmation</td>
    <td>Jesteś pewien, że chcesz zapisać zmiany?</td>
    <td></td>
</tr>
<tr>
    <td>pause</td>
    <td>3000</td>
    <td></td>
</tr>
<tr>
    <td>open</td>
    <td>http://clnet-prp/Main.aspx</td>
    <td></td>
</tr>
<tr>
    <td>waitForElementPresent</td>
    <td>id=FindMenu1_btnCosting</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>id=FindMenu1_btnCosting</td>
    <td></td>
</tr>
<tr>
    <td>clickAt</td>
    <td>id=AssignedTo_chosen</td>
    <td></td>
</tr>
<tr>
    <td>clickAt</td>
    <td>xpath=/html/body/table[2]/tbody/tr/td/div/form/fieldset/div[2]/table[2]/tbody/tr/td[1]/table/tbody/tr[1]/td[2]/div/div/div/ul/li[contains(.,&quot;wszy&quot;)]</td>
    <td></td>
</tr>
<tr>
    <td>type</td>
    <td>id=QuotaId</td>
    <td>${projekt}</td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>id=btnForm</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>link=${projekt}</td>
    <td>link=${projekt}</td>
</tr>
<tr>
    <td>waitForElementPresent</td>
    <td>id=costingSystemId</td>
    <td></td>
</tr>
<tr>
    <td>type</td>
    <td>id=costingSystemId</td>
    <td>${numer}v1</td>
</tr>
<tr>
    <td>click</td>
    <td>id=btnChangeAssigment</td>
    <td></td>
</tr>
<tr>
    <td>waitForElementPresent</td>
    <td>id=ActionPerformed</td>
    <td></td>
</tr>
<tr>
    <td>select</td>
    <td>id=ActionPerformed</td>
    <td>Wyślij wycenę (Completed)</td>
</tr>
<tr>
    <td>type</td>
    <td>id=comment</td>
    <td>Zamknieto w CLNET</td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>id=btnPerformAction</td>
    <td></td>
</tr>
<tr>
    <td>waitForElementPresent</td>
    <td>xpath=/html/body/table[2]/tbody/tr/td/div/form/fieldset/div[2]/button[1]</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>xpath=/html/body/table[2]/tbody/tr/td/div/form/fieldset/div[2]/button[1]</td>
    <td></td>
</tr>
<tr>
    <td>endWhile</td>
    <td></td>
    <td></td>
</tr>
</tbody></table>
</body>
</html>`

不知道出了什么问题。

感谢您的帮助

0 个答案:

没有答案