开发者

Using Selenium commands within a command?

I'm using Selenium IDE and would like to know if it is possible to use a Selenium command, within a Selenium command.

For example to use verifyElementPresent('someelement') within a storeEval command to store true/false.

I know this could 开发者_运维技巧be using JS, but using Selenium IDE's built in commands would be very time-saving!


If I understand correct, you want to create Selenium Nested function. The answer is No, it cann't.

For the SeleniumIDE reference, you will see that there are 3 parts of command (command, target, value). it also no function to store the command result, if you see the HTML code when you create the Selenium test script, you will see that it totally seperated the command to three sections.

I cannot find the document that selenium said it doesn't support to create the nested function. However, it will be get more complexity when you going to test something but the test script itself already complex. I would suggest you to store something you needs in user-extension.js, otherwise, done it by test script in your programming language you want.


Selenium have command storeElementPresent(locator, variable) See http://release.seleniumhq.org/selenium-core/0.8.0/reference.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜