too often and the shop assistants will get annoyed [about practising on pianos in music shops]
true, you can't do it for ever. However, you can postpone the day when they turf you out irrevocably as follows:
-Look like a plausible buyer: ask questions about payment options. Tell them you have a certain price limit, and don't touch any pianos above that price. The price limit must be high enough for you to have to try out several pianos (so you'll have to spend longer trying out different pianos), but not so high that they don't believe you can afford it. Wear clothes that suggest you have enough money to pay for a piano.
-To justify doing 20 practice sessions in the shop, tell them that you don't want to make a spur-of-the-moment decision. Give them some chatter about having been badly burnt from an over-hasty decision when you bought a piano in the last town you lived in.