Range burner element replacement

The dual burner on my glass top quite working. The light on the infinite switch does not illuminate when the switch is rotated to the on position. How do I determine if the switch is bad or the burner is bad??