Doing so is not stealing. Remember, you're under no obligation to buy from a store simply because you've received advice there.
However, if you have decided you are going to buy a lens from an online supplier, yet deliberately visit stores and spend time with sales staff seeking advice, then that is unfair behaviour.