First, before you get your boarding pass, try to select a window seat from the airline's app. Then go to the ticket counter and ask the agent if he or she can help you get a window seat. Check again at the gate (long before boarding starts) and explain that you have been trying to get a window seat.