Unless the seller is also an instructor, I suspect that your suggestion is probably the only legal way to do it that avoids people going around trying to get free flying by pretending to be prospective buyers.
On the other subject, I'd not buy an aeroplane if I'd not had a decent chance to handle the controls and decide if I was happy with it or not. Sure, it's not unreasonable for the seller to fly the take-off and landing for insurance purposes if nothing else, but I'd expect if I was a prospective buyer to do most of the rest of the flying.
Of course you can't log it; you aren't the captain, the other pilot is (probably) not an instructor, and almost certainly it's not certified as a multi-crew aircraft. But, if you buy it - you can log all the flying you like ;-)
G