Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Failed to load user-extensions.js! #6063

Closed
lukeis opened this issue Mar 4, 2016 · 4 comments
Closed

Failed to load user-extensions.js! #6063

lukeis opened this issue Mar 4, 2016 · 4 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 4, 2016

Originally reported on Google Code with ID 6063

files=C:\Documents and Settings\Abhishek\Desktop\user-extensions.js
lineNumber=23
error=ReferenceError: HtmlRunnerTestLoop is not defined

Getting this error while loading user-extensions.js file, although commands are working
but they are not coming in the window, have to type them fully in order to use them


This is the portion of the user-extension file. Starting line is line 23 in which the
error is coming

HtmlRunnerTestLoop.prototype.old_initialize = HtmlRunnerTestLoop.prototype.initialize

HtmlRunnerTestLoop.prototype.initialize = function(htmlTestCase, metrics, seleniumCommandFactory)
    {
    this.gotoLabels  = {};
    this.whileLabels = { ends: {}, whiles: {} };

    this.old_initialize(htmlTestCase, metrics, seleniumCommandFactory);

    this.initialiseLabels();
    }

HtmlRunnerTestLoop.prototype.initialiseLabels = function()
    {
    var command_rows = map_list( this.htmlTestCase.getCommandRows() 
                               , function(i, x) { 
                                    return x.getCommand()
                                    }
                               );

    var cycles = [];
    for( var i = 0; i < command_rows.length; ++i )
        {
        switch( command_rows[i].command.toLowerCase() )
            {
            case "label":
                this.gotoLabels[ command_rows[i].target ] = i;
                break;
            case "while":
            case "endwhile":
                cycles.push( [command_rows[i].command.toLowerCase(), i] )
                break;
            }
        }        

    var i = 0;
    while( cycles.length )
        {
        if( i >= cycles.length )
            throw new Error( "non-matching while/endWhile found" );

        switch( cycles[i][0] )
            {
            case "while":
                if(    ( i+1 < cycles.length ) 
                    && ( "endwhile" == cycles[i+1][0] )
                    )
                    {
                    // pair found
                    this.whileLabels.ends[ cycles[i+1][1] ] = cycles[i][1]
                    this.whileLabels.whiles[ cycles[i][1] ] = cycles[i+1][1]

                    cycles.splice( i, 2 );
                    i = 0;
                    }
                else
                    ++i;
                break;
            case "endwhile":
                ++i;
                break;
            }
        }

    }    

HtmlRunnerTestLoop.prototype.continueFromRow = function( row_num ) 
    {
    if(    row_num == undefined
        || row_num == null
        || row_num < 0
        )
        throw new Error( "Invalid row_num specified." );

    this.htmlTestCase.nextCommandRowIndex = row_num;
    }

Reported by abhii2628 on 2013-08-08 06:31:28

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by barancev on 2013-08-08 06:47:39

  • Labels added: Component-IDE

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

It seems to me that you are not the author of the user extension and at the first glance
it looks more a Javascript error than an error with Selenium IDE. If that is the case,
how about contacting the author of the user extension or asking for help on the developer
/ user group or stack overflow?

Cheers,
Samit Badle
Selenium IDE Maintainer
Twitter: @samitbadle
Blog: http://blog.reallysimplethoughts.com/

Reported by Samit.Badle on 2013-08-13 21:40:31

  • Status changed: NeedsClarification
  • Labels removed: Status-Untriaged

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Closing the issue as it is not related to Selenium, should be reported to the extension
author.

Reported by barancev on 2013-10-29 23:26:46

  • Status changed: Invalid

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by luke.semerau on 2015-09-17 18:17:41

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 4, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant