我是Java新手。我正在尝试使用htmlunit登录网站。我得到这些错误。我该如何解决。它的JDK11。这是我的代码:
try {
WebClient webClient = new WebClient();
HtmlPage page = (HtmlPage)
webClient.getPage("http://ubs.yalova.edu.tr");
HtmlForm form = page.getFormByName("loginForm");
form.getInputByName("username").setValueAttribute("myUsername");
form.getInputByName("password").setValueAttribute("myPassword");
page = form.getInputByValue("GİRİŞ YAP").click();
System.out.println(page.asText());
} catch (IOException e)
{
e.printStackTrace();
}
//module-info.java
module HelloWorld {
requires javafx.controls;
requires javafx.fxml;
requires htmlunit;
opens sample;
}