Skip to content

Instantly share code, notes, and snippets.

@jkwaldrip
Created April 25, 2013 14:51
Show Gist options
  • Save jkwaldrip/5460301 to your computer and use it in GitHub Desktop.
Save jkwaldrip/5460301 to your computer and use it in GitHub Desktop.
Generate a Random String of Nine Characters (Javascript for OLE Selenium IDE Testing)
var count = 9; var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; var randomstring = ''; for (var i=0; i<count; i++) { var rnum = Math.floor(Math.random()*chars.length); randomstring += chars.substring(rnum,rnum+1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment