A starting point is knowing you measurements - and then knowing what you are buying.
It is true that getting to a shop that has what you want in "test ride" mode is a challenge.
Still, I see many people happy with mail order bikes as well - you just have to know what product materials and frame geometry should produce.