I usually give it a couple gigs. Live performance is where the rubber meets the road for me. Sometimes a change of strings, gauge, pick up heights or even a pick up change are required to get it dialed in. My most resonant guitars aren't always the number ones.
For random guitars off the rack, when I'm not really looking, it has to grab me pretty quickly. For those guitars I've bought without playing them first, I give them a few chances. And I agree, changing strings, action, and pickup heights can often help a guitar that's not quite there.
I would agree with most that when I am there in person, I can tell pretty quickly.
The one exception was a G&L ASAT that I handled a few times at a shop. I didn't like it. However, the third time I asked if I could tweak the truss rod and do a little adjustment. They said yes and I worked it and bought it after growing to love it. It is now a treasured member of the collection.
If I buy a guitar, I make a commitment to at least give it 2 months before I sell it off. This is particularly true of ones that I buy without handling first.
Usually, I will know if I'm impressed with a guitar within a minute of seeing and playing it. However, I have purchased guitars online that arrived and weren't set up to my liking and therefore didn't play well for me. Usually, I can tweak the setup to get it where I want and then reevaluate the guitar. The looks draw me in, but the playability, feel and tone is what makes it a keeper.
I don't have the stomach for buying guitars sight unseen. If I take a guitar off the wall at a store, I either like the feel or I don't, and can usually tell within 5 minutes. If the reason I don't like it is due to a poor setup, then that is the store's loss. I don't feel a new guitar should be a gamble, and I also don't feel I should have to pay to have a new guitar play properly. (You obviously have the skills do set them up yourself).
When I bought my first Strat (a used early 90's American Std), I liked it OK in the store, but never bonded with it. I took it home even though there was no real love because I figured I would have to get used to a Strat since they are so different from the Gibsons I was used to. But I never did fall in love with it, and ended up selling it.
I really feel that if you don't love the guitar in the store, the odds are very high that you won't love it at home either.
The last guitar that I totally fell for was a Fano RB6. I was just window shopping, and couldn't afford to be spontaneous and drop $3k on it. But I was sure tempted to do just that. The feel, the look, and the sound were all perfect. I knew in 5 minutes that it was cool. After 10, I was getting worried that I might not be able to walk away from it. After 15 minutes, I had already gone over in my head how I could cover it, including considering selling another prized guitar. But after 20 minutes, I had accepted the fact that it wasn't the right time. I still wish I could have swung it.