我使用Selenium IDE.I需要if-else构建,我找到了一个Javascript文件。我很容易在IDE中使用该文件。但是,当我试图在Selenium中使用该文件时,我遵循了以下步骤:
-java -jar selenium.jar -userExtensions用户-Extensions.js -htmlSuite "*chrome“链接站点"staj\Projects\SikayetTestleri.html”"result2.html“-port 4445
Selenium服务器启动了firefox但是什么都没发生..。
发布于 2013-09-20 14:31:19
我找到了另一种方法来解决我的用户扩展的problem.Instead,我使用了storeEval命令并编写了2行javascript代码,我使用了条件语句而不是if语句。
Selenium IDE命令:
<tr>
<td>storeEval</td>
<td>
selenium.isElementPresent('Element I control')?selenium.doClick('Element which will be clicked if the element present'):seleniumdoClick('Element which will be clicked if the element NOT present')
</td>
</tr>https://stackoverflow.com/questions/18320121
复制相似问题