public static ExternalSessionKey fromResponseBody ( String responseBody ) throws NewSessionException { if ( responseBody != null && responseBody . startsWith ( "OK," ) ) { return new ExternalSessionKey ( responseBody . replace ( "OK," , "" ) ) ; } throw new NewSessionException ( "The server returned an error : " + responseBody ) ; }
extract the external key from the server response for a selenium1 new session request .