Selenium Java - Handling Windows, Frames, and Alerts
Identify the error in the following Selenium Java code snippet that tries to open a new tab:
driver.get("https://example.com");
driver.newWindow(WindowType.TAB);
driver.get("https://selenium.dev");