Using if / else in selenium ide


I have a checkbox that I’m trying to click in Selenium IDE – but only if it’s not already active.

I’m using Selenium IDE to create my tests, and htmlsuite to run them – anyone know how I can use an “if” in those?

  • You must to post comments

You’ll have to download the Flow Control plugin for Selenium IDE from the official page (aaaall the way down).

The most useful link I found is this one, because it has a complete example in it:

Anyway, there’s also a documentation and author’s blogpost explaining something more.

The only alternative I know about is implementing the whole logic in javascript – including the test steps. It’s possible, it’s a little bit harder to get right, but if you’ll end up stuck with IDE without plugins, it might be your only save:

var value = this.browserbot.findElement("id=someInput").value;
if (value == "Slanec is the best!") {
  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.