Я пытаюсь протестировать самодельный локальный веб-сайт с локальным сервером, но он не работает ...
Я получаю сообщение об ошибке:
org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"id","selector":"Amount"}
(Session info: chrome=70.0.3538.102)
(Driver info: chromedriver=2.43.600210 (68dcf5eebde37173d4027fa8635e332711d2874a),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Но я определяю элементы:
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
response.setContentType("text/html");
response.setStatus(HttpServletResponse.SC_OK);
response.getWriter().println(
"<html><head><title>HEADLINE</title></head>" +
"<body><form action=\"/withdraw\" method=\"post\">" +
"<label for=\"amount\">Amount</label>" +
"<input type=\"text\" id=\"amount\" name=\"amount\">" +
"<button type=\"submit\" id=\"withdraw\">Withdraw</button>" +
"</form></body></html>");
}
Но я не получаю заголовок или что-то еще ... в Chrome URL-адрес: data :, и я получаю пустую страницу