How to take a pregnancy test

I've taken a few but always choose the second option (pee in a cup and test that way) I can't seem to take a test the usual way without it getting all messy. Any tips? If possible? Thank you