Good morning
Try before you buy is always good advice but often hard to do in practice.:-)
If you can find a shop with both and the shop is happy to set them both up for you then great, but you say that you are new to cycling so you probably won't really be able to tell the difference with a short ride and will not be offered a long enough ride to really discover what suits you. :-)
If you can only try one locally then I would seriously consider buying that one regardless of which bike is better in an absolute sense.
The value of being able to go back the shop that you sold you the bike and ask a "stupid" question or possibly get a bolt tightened for free will probably be far greater than the difference between the bikes.
Bye
Ian