1

I use Selenium IDE.I needed if-else construction and I found a Javascript file. I used the file in IDE easily. However when I tried to use the file with Selenium RC, I followed the steps:

  1. Opened selenium.jar file and changed the user-extensions file(this file is in core->scripts->user-extensions) with what I found(which includes if-else functions) from internet.

  2. I started selenium rc with the command:

-java -jar selenium.jar -userExtensions user-extensions.js -htmlSuite "*chrome" "linkofsite" "staj\Projects\SikayetTestleri.html" "result2.html" -port 4445

Selenium server started firefox but nothings happend...

AbdullahC
  • 23
  • 9

1 Answers1

1

I've found another way to solve my problem.Instead of user-extensions I used storeEval command and wrote 2 lines of javascript code.I used conditional statement instead of if statement.

Selenium IDE command:

<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>
AbdullahC
  • 23
  • 9