0

我正在使用 selenium 并且为了测试我必须获取请求标头,但是此方法返回 null,出了什么问题,请求 URL 是正确的,我得到标头大小 = 1010,但字符串为 null(

public static String getRequestHeadersByRequestUrl(String requestUrl) {
        HarEntry harEntry = getRequestByUrl(requestUrl);
        return harEntry == null ? "" : harEntry.getRequest().getHeaders().toString();
    }
4

0 回答 0