Sometimes. It does depend on the employer. For many Software Engineering positions, the potential employer wants to find out if you are a technical fit. Traditionally, doing a technical test or task is the preferred way to do this. These can be online tests that are timed and you get the results instantly (like Codility), or you might be given a task to complete over a few days, at home.
Other approaches that are popular are to do whiteboard exercises and technical challenges when in an interview, or to do some paired screen coding with a technical person from the potential employer.