selenium cant start a new browser(ie7):java.lang.StringIndexOutOfBoundsException: String index out of range: -1
error will be occurred when selenium try to start a new ie7 browser. actually selenium cant start the ie7 because of this error.
if u meet this trouble, please turn off your ie7's pop-up blocker.
if u already turned off the blocker and still get this error, please turn on the blocker first, then turn off the blocker again. (I think it's a bug of ie7. anyway, that will solve your problem)