因此,每次我尝试在操场上运行代码时,都会引发以下错误:
String url = logo.getAttribute("src");
URL obj = new URL(url);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
if (String.valueOf(con.getResponseCode()).equals("200")) {
assertTrue(true, "FAILED :",
"Success" + logo.getAttribute("outerHTML") + "exists at server");
} else {
assertTrue(false, "FAILED :" + logo.getAttribute("outerHTML") + " is broken.",
"Success");
}
con.disconnect();
请帮助我...