title: calling js file function in selenium ide
body: <p>company just started using just the Selenium IDE 1.10 with Firefox. In a some web pages there is a username and password and enter button to allow entry. I found a code that will allow random text to be generated using this .js file. How do I call this function from this .JS file to populate this textbox and enter a fictions password. This is just a very preliminary stage in web testing to see if some functions work. Advise? How do I call this function from within the IDE itself without having to go through intensive java script training. company is not at this time wanting to use more than just the 1.10 IDE itself and some simple javascript to populate fields if possible.</p>
  
  <pre><code>    // Generate random text for a variable
  // Possible options:
  //   length      number indicating how long to make the string (defaults to 8)
  //
  //   type        string indicating what type of string to create alpha, numeric
  //               or alphanumeric (defaults to alphanumeric)
  //
  //   length|type pipe delimited option list
  
  Selenium.prototype.doRandomString = function( options, varName ) {
  
      var length = 8;
      var type   = 'alphanumeric';
  
      var o = options.split( '|' );
  
      for ( var i = 0 ; i &lt; 2 ; i ++ ) {
          if ( o[i] &amp;&amp; o[i].match( /^\d+$/ ) )
              length = o[i];
  
          if ( o[i] &amp;&amp; o[i].match( /^(?:alpha)?(?:numeric)?$/ ) )
              type = o[i];
      }
  
      switch( type ) {
          case 'alpha'        : storedVars[ varName ] = randomAlpha( length ); break;
          case 'numeric'      : storedVars[ varName ] = randomNumeric( length ); break;
          case 'alphanumeric' : storedVars[ varName ] = randomAlphaNumeric( length ); break;
          default             : storedVars[ varName ] = randomAlphaNumeric( length );
      };
  };
  
  function randomNumeric ( length ) {
      return generateRandomString( length, '0123456789'.split( '' ) );
  }
  
  function randomAlpha ( length ) {
      var alpha = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split( '' );
      return generateRandomString( length, alpha );
  }
  
  function randomAlphaNumeric ( length ) {
      var alphanumeric = '01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split( '' );
      return generateRandomString( length, alphanumeric );
  }
  
  function generateRandomString( length, chars ) {
      var string = '';
      for ( var i = 0 ; i &lt; length ; i++ )
          string += chars[ Math.floor( Math.random() * chars.length ) ];
      return string;
  }
  </code></pre>