Definitions of by trial and error:

  • adverb:   in an empirical manner