I am developing in VSCode with the Java Extension Pack (which includes Maven).
For some reason, my program (below) does not terminate after running.
import java.util.Scanner;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
Scanner in = new Scanner(System.in);
System.setProperty("webdriver.chrome.driver", "Path to exe\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.quit();
System.out.println("Press enter to quit");
in.nextLine();
in.close();
The Selenium chrome tab opens for a moment and then closes (as I would expect). The program then prompts me to "press enter", which I do, but the program does not end after that. It only ends if I press Ctrl-c
(at which point it asks if I want to terminate the batch job).
If I comment out the Selenium stuff, it works fine - the program ends after I press enter. Below is a picture of the log:
Do you think the part about the log error could be the cause? That part is not there when I comment out the Selenium stuff. Also, I hope you don't mind I censored some personal information.
Please let me know if there is anything I can do to make this question easier to answer.
Update: I fixed the log issue by including the slf4j-jdk14 dependency but that didn't have any impact - the program still didn't shut down. The only difference now is that the log no longer contains the lines beginning with "SLF4J"