How to use GOtoIf and while
<tr>
<td>store</td>
<td>1</td>
<td>looptimes</td>
</tr>
<tr>
<td>while</td>
<td>storedVars.looptimes < 11</td>
<td></td>
</tr>
<tr>
<td>store</td>
<td>javascript{storedVars.looptimes++;}</td>
<td></td>
</tr>
<tr>
<td>gotoIf</td>
<td>javascript{(storedVars.looptimes==5);}</td>
<td>lbltest</td>
</tr>
<tr>
<td>open</td>
<td>http://www.yahoo.com</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${looptimes}</td>
<td></td>
</tr>
<tr>
<td>endWhile</td>
<td></td>
<td></td>
</tr>
<tr>
<td>label</td>
<td>lbltest</td>
<td></td>
</tr>
If your selenium IDE does not support while or if you don't have while js in your extension Please download below js and add in your extension.Click here to download while.js
good info for ide
ReplyDeleteGracias.
ReplyDeleteIt should be nice to initialize that var 'store' to 0. Nice code dude.
Thank You and greetings from Peru.
FYI - Here is an extension that adds full-fledged looping, conditional execution, and callable functions to Selenium IDE: http://wiki.openqa.org/display/SEL/SelBlocks
ReplyDeleteBy the way, I had tried the same with while.js also.same results.
ReplyDeleteHere's an easy solution :
ReplyDeletehttp://ia2tech.blogspot.com/2013/05/selenium-ide-flow-control-and-looping.html
Hello,
ReplyDeleteHow "while.js" installed ?, or where to configure to work ?.
thank you very much.
Great content, but extremely annoyed by all the ads. Maybe tone it down a bit.
ReplyDeleteThe benefits of Selenium for Test Automation are immense. Amongst the many benefits, Selenium is an Open-Source tool and is easy to get started with for functional testing of web applications. Importantly, it enables record and playback for testing web applications and can run multiple scripts across various browsers. Selenium Training in Chennai
ReplyDelete