我如何将通过方法内部的循环派生的值附加到列表中,并让该方法返回该列表

时间:2019-05-14 02:27:49

标签: java function selenium methods automation

public int footer_social_links_status_code()引发IOException {         int x [];

    for (WebElement l : footer_social_pages) {

        String href = l.getAttribute("href");

        url = new URL(href);
        connection = (HttpURLConnection) url.openConnection();
        connection.setRequestMethod("GET");
        connection.connect();
        int statuscode = connection.getResponseCode();
        System.out.println(statuscode);

    } 

}

0 个答案:

没有答案