Replace text with predefined value in browser I used to have a tool on my PC that would allow me to prefill text when I enter certain "codes". For example, I would type $test123 and it would replace that text with a sentence that I had setup.

Is there a similar program on the Mac that also works in any browser?
I believe you are looking for TextExpander. 

From their site: 


  Type more with less effort! TextExpander saves your fingers and your keyboard, expanding custom keyboard shortcuts into frequently-used text and pictures...