flowControl

attached zip file contains required js code (working with selenium 0.6) + tests/examples.
Separate js files are attached for selenium versions > 0.6

Examples of implemented commands:

gotolabel / label

Unconditional jump

gotolabel testlabel1  
.... ....  
label testlabel1  

gotolabel parameters:

  1. a label to jump to

gotoIf / label

Conditional jump

gotoIf /corrrect caption/i.test( storedVars.pagetext ) testlabel1
.... ....  
label testlabel1  

gotoIf parameters:

  1. javascript expression
  2. label to jump to if javascript expression evaluated as true

(obsolete) assertNoFailureOnNextAndGoto / assertNoErrorOnNextAndGoto / label

this command is dropped in extension for Selenium Core v.0.8+

Jump if following command passed

assertNoFailureOnNextAndGoto testlabel1  
verifyText element correct page
open ./pageneeded.html  
label testlabel1  

while/endWhile

Cycle

store 0 loop2
while storedVars.loop2 < 2  
store javascript{storedVars.loop2++}  
endWhile    

while parameters:

  1. javascript expression.

FAQ

Q: Can the flowControl extension be used in Selenium IDE?

A: according to the following thread it can: http://clearspace.openqa.org/message/20977#20977

however, I do not use S-IDE and therefore will recommend to ask guys on corresponding (S-IDE) forum

Q: I am using this extension along with 'include' extension and getting error like "'While' is not found"". What do I do?

A: add following code at the end of IncludeCommand.prototype.doInclude function. (as per http://forums.openqa.org/thread.jspa?threadID=10163 )

if( htmlTestRunner.currentTest.initialiseLabels )
{ htmlTestRunner.currentTest.initialiseLabels(); }

NOTE:This answer refers to the IncludeCommand.prototype.doInclude function, which did not work for me.  Farther down in this forum there's a reference by Jerry Qianto putting this code in the Selenium.prototype.doInclude function, which did work for me.  In addtion, since I was using IDE, changed the code to:

if( this.initialiseLabels )
{ this.initialiseLabels(); }

You will also need to add this at the end of doEnd$Template$ so that goto's after includes to work.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. May 04, 2006

    JPT says:

    I was not able to jump back to a label using gotoIf or gotoLabel. Would it be po...

    I was not able to jump back to a label using gotoIf or gotoLabel. Would it be possible to add this feature? I need it!

    Thanks,

    JPT

  2. May 20, 2006

    RALPH says:

    me too, gottolabel does not work, it shows the following error: [error] Unexpec...

    me too, gottolabel does not work, it shows the following error:

    [error] Unexpected Exception: message -> gotoLabels has no properties, fileName -> file:C:\Program Files\Mozilla Firefox\components\user-extensions.js, lineNumber -> 72, stack -> gotoLabel("test1","")@file:C:\Program Files\Mozilla Firefox\components\user-extensions.js:72 call([object Object],"test1","")@:0 ([object Object],[object Object])@chrome://selenium-ide/content/selenium/selenium-commandhandlers.js:193 ()@chrome://selenium-ide/content/selenium/selenium-executionloop.js:65 ()@chrome://selenium-ide/content/selenium/selenium-executionloop.js:32 ()@chrome://selenium-ide/content/selenium/selenium-executionloop.js:28 executeCommand("http://www.google.com/",[object Object])@chrome://selenium-ide/content/selenium-runner.js:252 ([object Object])@chrome://selenium-ide/content/debugger.js:81 ()@chrome://selenium-ide/content/treeView.js:396 ("cmd_selenium_exec_command")@chrome://selenium-ide/content/treeView.js:78 doCommand("cmd_selenium_exec_command")@:0 goDoCommand("cmd_selenium_exec_command")@chrome://global/content/globalOverlay.js:93 onxblkeypress([object KeyboardEvent])@chrome://selenium-ide/content/selenium-ide.xul:0 @:0 , name -> TypeError

    please help 

  3. May 21, 2006

    Andrey Yegorov says:

    did you use Selenium version 0.7 or 0.6? The only version extension was tested w...

    did you use Selenium version 0.7 or 0.6? The only version extension was tested with is 0.6.

  4. Jun 19, 2006

    Ai Li says:

    Chris:  Could you post the hacked version? Thanks.

    Chris:

     Could you post the hacked version? Thanks.

  5. Jun 29, 2006

    Chris Nichols says:

    Hack fix added as attachment.  GotoIf works if the label you're jumping to ...

    Hack fix added as attachment.  GotoIf works if the label you're jumping to comes after the call for it.  I haven't been able to get it to work with a label that is earlier in the test.  While not included (couldn't hack it).

  6. Jul 14, 2006

    Chris Nichols says:

    Newer version of my hack fix uploaded.  Adds the while command back in.&nbs...

    Newer version of my hack fix uploaded.  Adds the while command back in.  Multiple while loops within a test are supported, nested whiles are not.  Also, since I forgot to state it with the previous version, this fix for gotoIf the extension no longer deletes your results.  While loops do appear to destroy results however.

     And for anyone who is trying to make this work with the include extension, at the end of the doInclude function add:

    gotoLabels = initialiseGotoLabels();
    whileLabels = initialiseWhileLabels();

  7. Jul 17, 2006

    Chris Nichols says:

    Yet another new version uploaded.  Fixed loss of results using while and bu...

    Yet another new version uploaded.  Fixed loss of results using while and bug that would cause the same with goto if the include extension was used anywhere other than the first line of a test.

  8. Aug 28, 2006

    Wouter van Reeven says:

    Hi Chris, Thanks for all the great work you're doing. I am trying to get your a...

    Hi Chris,

    Thanks for all the great work you're doing. I am trying to get your addon to work with Selenium 0.7.1 and I get an error at line 22 of the goto.js file. Apparently, the HtmlTest object no longer exists in this version of Selenium. Either that, or I am missing a dependency somewhere. Would you know what's going on here?

    Thanks in advance, Wouter van Reeven

  9. Aug 28, 2006

    Andrey Yegorov says:

    I uploaded version wich worked with core 0.7.1

    I uploaded version wich worked with core 0.7.1

  10. Aug 28, 2006

    Wouter van Reeven says:

    Hi Andrey, Thank you so much for your extremely fast response! I downloaded...

    Hi Andrey,

    Thank you so much for your extremely fast response! I downloaded and tried the new version of goto.js and it does indeed work. Great stuff! Many thanks again!

    Greets, Wouter

  11. Oct 18, 2006

    mingjian bai says:

    Hi Andrey, This goto action is a great addin. But after I download the newest g...

    Hi Andrey,

    This goto action is a great addin. But after I download the newest goto.js but can't use it.
    The javascript error is:

    1. in line 22, HtmlTest is not defined.
    2. in line 29, initialiseTestLoop is not defined.

    How to solved this.

    Thanks in advance,
    Mingjian

  12. Oct 20, 2006

    Chris Nichols says:

    What version of Selenium are you using?

    What version of Selenium are you using?

  13. Oct 21, 2006

    Andrey Yegorov says:

    attached version for selenium core 0.8.

    attached version for selenium core 0.8.

  14. Oct 22, 2006

    Rob Carlson says:

    For Selenium Core .8 - I am referencing the goto_sel08.js file directly in my "S...

    For Selenium Core .8 - I am referencing the goto_sel08.js file directly in my "Selenium Core extensions" path. On load of Selenium IDE, I get error message:
    "Failed to load user-extensions.js!
    files=

    Unknown macro: {path to file}

    \goto_sel08.js
    error=ReferenceError: HtmlRunnerTestLoop is not defined
    [OK]"

    Sorry for my ignorance. What am I missing? I had previously loaded the zip file, and ran into issue with .8 core - commands were recognized but then I got errors on gotolabel.

    Best Regards,
    -Rob

  15. Oct 23, 2006

    Andrey Yegorov says:

    Rob, I have never used Selenium IDE and so far not planning to. I tested extens...

    Rob,

    I have never used Selenium IDE and so far not planning to.
    I tested extension with Selenium Core and it worked.

    There are a chances that something in S-IDE requires changes or extension needs to be updated to work under S-IDE.
    At this moment I am leaving detailed troubleshooting & fixing of this problem to parties interested in making it work with S-IDE.

  16. Nov 10, 2006

    surewin03 says:

    got the error below with Selenium IDE: error loading Selenium IDE extensions: R...

    got the error below with Selenium IDE:

    error loading Selenium IDE extensions: ReferenceError: HtmlRunnerTestLoop is not defined

  17. Dec 06, 2006

    Sumith Gamage says:

    Dear Andry & All, This is a great extension save my life a lot. But I came...

    Dear Andry & All,

    This is a great extension save my life a lot.

    But I came across an owsome problem, when I tried to use it with include command (another powerful user extension).

    <tr>
    	<td>include</td>
    	<td>transaction/withdrow.html</td>
    	<td></td>
    </tr>
    <tr>
    	<td>gotoIf</td>
    	<td>${moneyInHand} < ${price}</td>
    	<td>skipBuy</td>
    </tr>
    <tr>
    	<td>include</td>
    	<td>../transaction/Buy.html</td>
    	<td></td>
    	<td>Buy the good</td>
    </tr>
    <tr>
    	<td>label</td>
    	<td>skipBuy</td>
    	<td></td>
    </tr>
    

    When the condition in 'gotoIf' satisfies it jumps to an incorrect row. This happens since the table extends by including few additional rows from 'transaction/Withdrow.html' script.

    Is there anyone who tried a work arrond this problem?

    Sumith

  18. Dec 20, 2006

    Sumith Gamage says:

    Work around for above issue has been sorted out in http://forums.openqa.org/thre...

    Work around for above issue has been sorted out in http://forums.openqa.org/thread.jspa?threadID=5833 - Sumith

  19. Jan 10, 2007

    marijke says:

    I've tried to add the extension goto_sel08.js and I also got the error below wit...

    I've tried to add the extension goto_sel08.js and I also got the error below with Selenium IDE:
    error loading Selenium IDE extensions: ReferenceError: HtmlRunnerTestLoop is not defined

  20. Feb 23, 2007

    Andreas says:

    Can someone tell me, what the gotoif statement is all about? /corrrect caption/...

    Can someone tell me, what the gotoif statement is all about?

    /corrrect caption/i.test( storedVars.pagetext )

    what means correct caption?

    in the examplefiles provided with the package they use gi.test(...) and the description here says i.test(...) what is right?

  21. Feb 23, 2007

    Andrey Yegorov says:

    "/corrrect caption/i" is a regular expression (look for RegExp in javascript's d...

    "/corrrect caption/i" is a regular expression (look for RegExp in javascript's documentation)
    test() is a method of RegExp object

    you can translate that code as
    var re = new RegExp( "corrrect caption", "i" );
    re.test( storedVars.pagetext )

  22. Feb 23, 2007

    Andrey Yegorov says:

    I added descriptions of parameters on this wiki page. hope it helps.

    I added descriptions of parameters on this wiki page.
    hope it helps.

  23. Feb 27, 2007

    Mahesh says:

    Hi Andrey, Please can you put some light on this error? I found that lot of per...

    Hi Andrey,

    Please can you put some light on this error? I found that lot of person struck with this problem. Otherwise provide some alternative solution for loop.

    For Selenium Core .8 - I am referencing the goto_sel08.js file directly in my "Selenium Core extensions" path. On load of Selenium IDE, I get error message:
    "Failed to load user-extensions.js!
    files= \goto_sel08.js
    error=ReferenceError: HtmlRunnerTestLoop is not defined
    OK "

    Thanks,
    Mahesh

  24. Mar 07, 2007

    Sumith Gamage says:

    The issue in above post (comment) is addressed in http://forums.openqa.org/messa...

    The issue in above post (comment) is addressed in http://forums.openqa.org/message.jspa?messageID=19612#19612.

  25. Mar 14, 2007

    nick says:

    When I download the user attachment "ZIP Archive selenium-goto.zip" it does not ...

    When I download the user attachment "ZIP Archive selenium-goto.zip" it does not have the files to run the practice tests called "./tests/html/test_click_page1.html" Why not? It is tougher to learn from tests that do not run!

    But this is a cool plugin.

  26. May 30, 2007

    Ivan says:

    I was wondering if is there any way to set a timeout to a set of instructions, s...

    I was wondering if is there any way to set a timeout to a set of instructions, so we can use the gotoif command until we get what we expect.
    For instance:
    ----------------
    (set timeout here)
    label label1
    ...
    gotoif 'condition' labelEnd
    gotolabel label1
    label labelEnd
    (step fails if doesn't reach labelEnd before timeout)
    ----------------
    Or any other way to do that?

    Thanks,

    btw, great extension!

  27. May 31, 2007

    Andrey Yegorov says:

    Ivan, I think what you want to do can be easily implemented as: [timestamp...

    Ivan,

    I think what you want to do can be easily implemented as:

    [timestamp = store current time]
    [do necessary step]
    [assert (current time - timestamp) < expected_execution_time ]

  28. May 31, 2007

    Ivan says:

    That worked, thanks!

    That worked, thanks!

  29. Jun 24, 2007

    goggyy says:

    Hello, I am a bit confused now. Can the flowControl extension be used in Seleni...

    Hello,

    I am a bit confused now. Can the flowControl extension be used in Selenium IDE? It gives me an error:

    [error] Unexpected Exception: message -> currentCommandRow is not defined

    Also, I am not sure what I should do with goto_sel08.js file, as when I try to load it, it gives me an error.

    Any help will be appreciated.

  30. Jun 25, 2007

    Andrey Yegorov says:

    > Can the flowControl extension be used in Selenium IDE? according to the fo...

    > Can the flowControl extension be used in Selenium IDE?

    according to the following thread it can: http://forums.openqa.org/thread.jspa?messageID=20977

    however, I do not use S-IDE and therefore will recommend to ask guys on corresponding (S-IDE) forum

  31. Jun 27, 2007

    Mikhail says:

    I need to wait for "some text" will appear on the page and then the test must go...

    I need to wait for "some text" will appear on the page and then the test must go on.

    label testlabel
    gotoif 'condition' testlabel

    If "some text" doesn't apeear on the page and the 'condition' is true, it have to go to the "testlabel" upper and assert the 'condition' again.

    What kind of condition must I write to assert that "some text" is not presented on the page?
    How it will look like?

    Thanks a lot!

  32. Jun 27, 2007

    Andrey Yegorov says:

    > If "some text" doesn't apeear on the page and the 'condition' is true, it h...

    > If "some text" doesn't apeear on the page and the 'condition' is true, it have to go to the "testlabel" upper and assert the 'condition' again.

    I suggest to use waitForCondition (seehttp://openqa.org/selenium-core/reference.html ).

    for example (I did not test the code):
    waitForCondition | javascript

    Unknown macro: {selenium.isTextPresent( "some text" )}

    | 60

  33. Jun 27, 2007

    Sonik says:

    I am a newbie working with selenium IDE. All I want is to loop through a define...

    I am a newbie working with selenium IDE. All I want is to loop through a defined set of pages infinitely. I have firefox 2.0.4 installed with the latest selenium IDE version 0.8.7. I installed one of the selenium extensions which enables the gotoLabel command from:

    http://wiki.openqa.org/display/SEL/flowControl

    But after running the test, I get the following error when the test reaches the "goto" command:

    [error] Unexpected Exception: message -> gotoLabels has no properties, fileName -> file:///C:/Selenium-goto/user-extensions.js, lineNumber -> 72, stack ->
    gotoLabel("start","Title")@file:///C:/Selenium-goto/user-extensions.js:7
    2 apply([object Object],[object Array])@:0 ("start","Title")@chrome://selenium-ide/content/selenium/scripts/htmluti
    ls.js:60 ([object Object],[object
    Object])@chrome://selenium-ide/content/selenium/scripts/selenium-command
    handlers.js:307
    ()@chrome://selenium-ide/content/selenium/scripts/selenium-executionloop
    .js:112
    (-10)@chrome://selenium-ide/content/selenium/scripts/selenium-executionl
    oop.js:78 apply([object Object],[object Array])@:0 (-10)@chrome://selenium-ide/content/selenium/scripts/htmlutils.js:60 @:0 , name -> TypeError=20

    Please let me know what should be done to get the test working. There's an above post regarding the same, asking to use Selenium 0.6. Does that still hold valid? Thanks a lot!

  34. Jun 27, 2007

    Andrey Yegorov says:

    > Clease let me know what should be done to get the test working. according ...

    > Clease let me know what should be done to get the test working.

    according to the following thread it can: http://forums.openqa.org/thread.jspa?messageID=20977

    however, I do not use S-IDE and therefore will recommend to ask guys on corresponding (S-IDE) forum

    > There's an above post regarding the same, asking to use Selenium 0.6

    version for S-Core 0.8.0 is available

  35. Jun 28, 2007

    Mikhail says:

    > I suggest to use waitForCondition (seehttp://openqa.org/selenium-core/refer...

    > I suggest to use waitForCondition (seehttp://openqa.org/selenium-core/reference.html ).
    >
    > for example (I did not test the code):
    > waitForCondition | javascript
    > Unknown macro:
    Unknown macro:
    Unknown macro:

    Unknown macro: {selenium.isTextPresent( "some text" )}

    > | 60

    The problem is that I don't need to use the "timeout" option. I need to wait 'till the condition will be false not after 30, 60 or more seconds. The "timeout" in my situation must be unlimited.

    I will write conditions which I need in words such as [condition]:

    label testlabel1
    gotoif [verify that an "error message" present on the page] testlabel2
    gotoif [verify that "some text" doesn't present on the page] testlabel1
    label testlabel2

    Andrey, do you speak russian? Can you write me to my e-mail miniok@mail-dot-ru? Or to ICQ 6665503.

    Thanks!

  36. Jun 28, 2007

    Andrey Yegorov says:

    Mikhail, try something like label testlabel1 gotoif selenium.isTextPresent...

    Mikhail,

    try something like

    label testlabel1
    gotoif selenium.isTextPresent( "error message" ) testlabel2
    gotoif !selenium.isTextPresent( "some text" ) testlabel1
    label testlabel2

    p.s. yes, I do speak Russian. However, generally I am not available for 'private consultations', language does not matter. Forums are more reliable place to get answers (I just cannot guarantee that I will read/answer questions within somewhat acceptable for you timespan).

  37. Jul 04, 2007

    Mikhail says:

    Andrey, thanks a lot! But can you help me please in installation of the plugin?...

    Andrey, thanks a lot!

    But can you help me please in installation of the plugin?
    I'm using Selenium Core 0.8.2 .
    I have put "goto_sel08.js" file into the "scripts" directory and have added the contents of the "user-extensions.js" (from "selenium-goto.zip") to my "user-extensions.js" file.
    Then have restarted the server.

    When I write the test like:

    1. label testlabel
    2. gotoif "condition" testlabel

    it doesn't go to the label. It allways goes straight. 1, then 2... and so on.

    Please, write me, how to install the plugin correctly!

    Thanks!

  38. Jul 05, 2007

    Andrey Yegorov says:

    selenium-goto.zip contains extension compatible with selenium 0.6.0 I believe th...

    selenium-goto.zip contains extension compatible with selenium 0.6.0
    I believe that you need to use goto_sel08.js which works with selenium 0.8.0 (unless you are using old s-core 0.6.0)

    there are self tests for the extension in the zip file that you can use as example and to test the extension.

  39. Feb 06, 2008

    Sachin says:

    I am trying to run TestSuite-goto but selenium core gives me error as Selenium ...

    I am trying to run TestSuite-goto
    but selenium core gives me error as
    Selenium failure. Please report to selenium-dev@openqa.org, with error details from the log window. The error message is: 'gotoLabels' is null or not an object

    I don't know how to add user extensions. i have added user-extentions.js & goto_sel08.js in ..core/scripts/ folder is it write or please tell me correct method

    Please help me in this issue

  40. Feb 22, 2008

    Darren says:

    Great extension... I also needed a version that would work within Selenium IDE (...

    Great extension... I also needed a version that would work within Selenium IDE (as opposed to the TestRunner).

    So... there's a version of Flow Control for Selenium IDE at http://51elliot.blogspot.com/2008/02/selenium-ide-goto.html

    It works for basic goto, gotoIf and while loops within Selenium IDE.

    Hope this helps.

  41. Feb 26, 2008

    Jayant says:

    Hi All, I read all the comments and really got confused ... Can some one please...

    Hi All,

    I read all the comments and really got confused ...
    Can some one please tell me latest version in which while,and gotolabel works... and also where to put goto.js and goto_sel08.js files?

    Thanks,
    Jay

  42. Feb 26, 2008

    Jayant says:

    Hi ALL, GotoLabel part is working for me for core8.0 version but when i am usi...

    Hi ALL,
    GotoLabel part is working for me for core8.0 version but when i am using 'while' command...it passed this step , performs first open statement and fails at the second command. For example in below script my script gives a "Permission denied error" at clicking Gmail link:

    <tr>
    <td>store</td>
    <td>0</td>
    <td>var1</td>
    </tr>
    <tr>
    <td>store</td>
    <td>2</td>
    <td>var2</td>
    </tr>
    <tr>
    <td>while</td>
    <td>$

    Unknown macro: {var1}

    <=$

    Unknown macro: {var2}

    </td>
    <td></td>
    </tr>
    <tr>
    <td>open</td>
    <td>http://www.google.co.in/</td>
    <td></td>
    </tr>
    <tr>
    <td>pause</td>
    <td>3000</td>
    <td></td>
    </tr>

    <tr>
    <td>clickAndWait</td>
    <td>link=Gmail</td>
    <td></td>
    </tr>
    v
    <tr>
    <td>store</td>
    <td>javascript

    Unknown macro: {storedVars.var1++}

    </td>
    <td></td>
    </tr>
    <tr>
    <td>endWhile</td>
    <td></td>
    <td></td>
    </tr>

    Please help
    Thanks in advance
    Jay

  43. Feb 27, 2008

    says:

    Hi ! I'm working with selenium core 0.8 . I downloaded the goto_sel08.js and pu...

    Hi !

    I'm working with selenium core 0.8 . I downloaded the goto_sel08.js and put it into core/scripts. Also I downloaded the .zip file and copy only the tests and the test suite into /test directory. All the tests failed and all have the same error " Unknown command : " for gotolabel, goto, assertNoFailureOnNextAndGoto and while commands.

    Could anyone tell me whats wrong ???

    Many Thanks

  44. Feb 28, 2008

    says:

    Hi ! I found my own error . I didn't change the name of the goto_sel08.js to us...

    Hi !

    I found my own error . I didn't change the name of the goto_sel08.js to user-extensions.js.
    Now it works !!

    Thanks

  45. Jul 04, 2008

    zeld says:

    I used this file for my test script. And I put this file into core\scripts but w...

    I used this file for my test script. And I put this file into core\scripts but when i run test script by Selenium Core. The 'While' loop doesn't identify. and change its name to user-extension.js the error javascript is displayed. How can i use this file with selenium Core?Please help me

  46. Aug 14, 2008

    nisarg says:

    I am trying to use this with the latest version 1.0b2, but doesnt seem to work? ...

    I am trying to use this with the latest version 1.0b2, but doesnt seem to work? I am trying to use the GOTOLABEL command as per in the samples/tests that come along in the zip. Please the error I get below. To me this looks like a compatibility issue - useless a more experienced person thinks differently.

    1. [info] Executing: |gotolabel | label | |
    2. [error] Unexpected Exception: message -> Specified label 'label' is not found., fileName -> chrome://selenium-ide/content/tools.js -> file:///C:/Documents%20and%20Settings/Developer/Desktop/Selenium/selenium-goto/Selenium/GoTO%20Ext%20-IDE/user-extensions.js, lineNumber -> 81, stack -> Error("Specified label 'label' is not found.")@:0 ("label","")@chrome://selenium-ide/content/tools.js -> file:///C:/Documents%20and%20Settings/Developer/Desktop/Selenium/selenium-goto/Selenium/GoTO%20Ext%20-IDE/user-extensions.js:81 ("label","")@chrome://selenium-ide/content/selenium/scripts/htmlutils.js:60 ([object Object],[object Object])@chrome://selenium-ide/content/selenium/scripts/selenium-commandhandlers.js:309 ()@chrome://selenium-ide/content/selenium/scripts/selenium-executionloop.js:112 (30)@chrome://selenium-ide/content/selenium/scripts/selenium-executionloop.js:78 (30)@chrome://selenium-ide/content/selenium/scripts/htmlutils.js:60 , name -> Error

    Anyideas?
    Regards.

  47. Sep 24, 2008

    Aurora says:

    When I run my test I get the following message: Stack overflow at line:54. I'm...

    When I run my test I get the following message:

    Stack overflow at line:54.

    I'm using STIQ. Added extensin code to project-extensions.js

  48. Dec 15, 2008

    Jerry Qian says:

    Since many people work on both Core and IDE, they need a unified version for flo...

    Since many people work on both Core and IDE, they need a unified version for flowControl extensions.

    IDE version: http://51elliot.blogspot.com/2008/02/selenium-ide-goto.html

    The simplest way to combine IDE version and this Core version is writing below code in your user-extensions.js.

    var sel_locstr = window.location.href;  
    if(sel_locstr.indexOf("selenium-ide.xul") != -1){ //IDE mode      
       // paste IDE extension here
    }else{
       // paste Core extension here
    }

    Enjoy!

  49. Dec 15, 2008

    Jerry Qian says:

    For guys who failed to use it with include command (another powerful user extens...

    For guys who failed to use it with include command (another powerful user extension).

    Here is a workaround code.

    Please revise 'include' js source:

    Selenium.prototype.doInclude = function(locator, paramString) {
        LOG.debug(IncludeCommand.LOG_PREFIX + " Version " + IncludeCommand.VERSION);
        var includeCommand = new IncludeCommand();
        includeCommand.doInclude(locator, paramString);
      
         //Jerry Qian: add flowControl support for include template steps
         try{
           htmlTestRunner.currentTest.gotoLabels  = {};
           htmlTestRunner.currentTest.whileLabels = { ends: {}, whiles: {} };
           htmlTestRunner.currentTest.initialiseLabels();
         }catch(e){}
         //End flowControl
    };

    Enjoy!

  50. Dec 30, 2008

    mbmiceli says:

    I get the error: "error loading Selenium IDE extensions: ReferenceError: Selen...

    I get the error:

    "error loading Selenium IDE extensions: ReferenceError: Selenium is not defined"

    The link above referenced to solve this issue no longer works. Whats the solution?

  51. Jan 12, 2009

    Jo says:

    Hi everyone I get this error whenever the goToLabel command is reache...

    Hi everyone

    I get this error whenever the goToLabel command is reached, most likely a valid goToIf will cause this error as well. 

    The error message is: 'gotoLabels' is null or not an object

    The test I am running, works perfectly on IDE, I am now testing with RC and it gives me that error

  52. Apr 21, 2009

    paul jones says:

    Hi there - I don't think this issue has been covered but I am hoping someone can...

    Hi there - I don't think this issue has been covered but I am hoping someone can help.  I am running the latest version of the IDE via the UI-Element in firefox 3.0 and trying to use the user-extensions.js and goto.js in order to use the "while" functionality. 

    These are my commands:

    <tr>
        <td>storeElementPresent</td>
        <td>link=Reveal Company Report</td>
        <td>CoRepLink4</td>
    </tr>
    <tr>
        <td>while</td>
        <td>storedVars['CoRepLink4'] != false</td>
        <td></td>
    </tr>
    <tr>
        <td>getEval</td>
        <td>alert(storedVars['CoRepLink4']);</td>
        <td></td>
    </tr>
    <tr>
        <td>endWhile</td>
        <td></td>
        <td></td>
    </tr>

    However when it hits the 'while', I get this error:

    [error] Unexpected Exception: message -> currentCommandRow is not defined, fileName -> chrome://selenium-ide/content/tools.js -> file:///C:/selenium-remote-control-1.0-beta-2/FlowControl/user-extensions.js, lineNumber -> 184, stack -> skipWhile()@chrome://selenium-ide/content/tools.js -> file:///C:/selenium-remote-control-1.0-beta-2/FlowControl/user-extensions.js:184 ("storedVars['CoRepLink4'] != false","")@chrome://selenium-ide/content/tools.js -> file:///C:/selenium-remote-control-1.0-beta-2/FlowControl/user-extensions.js:158 ("storedVars['CoRepLink4'] != false","")@chrome://selenium-ide/content/selenium/scripts/htmlutils.js:60 ([object Object],[object Object])@chrome://selenium-ide/content/selenium/scripts/selenium-commandhandlers.js:309 ()@chrome://selenium-ide/content/selenium/scripts/selenium-executionloop.js:112 (5)@chrome://selenium-ide/content/selenium/scripts/selenium-executionloop.js:78 (5)@chrome://selenium-ide/content/selenium/scripts/htmlutils.js:60 , name -> ReferenceError 

    I was originally trying to use the gotoif command but this produced errors too. 

    Can anyone suggest anything?  Maybe I need a later version of the goto.js or user-extensions.js?  I thought I had the latest ones however (attached to this page).

  53. Aug 05, 2011

    John Ekstedt says:

    I'm running RC under 2.2 and need flow control.  What file(s) do I need - a...

    I'm running RC under 2.2 and need flow control.  What file(s) do I need - and how do I install them.  I need instructions in explicit detail.  Thank you very much!