Maybe you can’t get a free test because of your situation, but there are other ways.
First, if you' re a UK resident, you can get a free NHS eye examination by any optometrist in Scotland who provides NHS services. Find out more on GOV.scot
Second, you can search online for free eye tests.
Lots of the larger chain opticians have special offers on throughout the year, letting you download a voucher for a free eye test. There might also be vouchers you can cut out of local newspapers, flyers or magazines, so keep an eye out.
Sometimes going to a free test will mean they’ll try to sell you glasses, but you don’t have to buy anything right there and can look somewhere else when you’re ready.