Question: is alert class or interface?
Answer: The piece of code driver. switchTo(). alert() returns an object of class RemoteAlert which implements the Alert interface. The RemoteAlert is a private class inside the RemoteWebDriver class.