0
现在用下面的代码来读取jsp页面内容 使用eclipse如何在阅读内容之前刷新jsp页面?
public static String getOTP(String p_mobileNumber)
{
String l_str_result;
StringBuilder content = new StringBuilder();
// many of these calls can throw exceptions, so i've just
// wrapped them all in one try/catch statement.
try
{
// create a url object
URL url = new URL("https://page.jsp");
// create a urlconnection object
URLConnection urlConnection = url.openConnection();
// wrap the urlconnection in a bufferedreader
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));
String line;
// read from the urlconnection via the bufferedreader
while ((line = bufferedReader.readLine()) != null)
{
content.append(line + "\n");
}
bufferedReader.close();
}
catch(Exception e)
{
e.printStackTrace();
}
l_str_result=content.toString();
}
任何一个可以请告诉我,我对上面的代码读取内容之前刷新jsp页面做什么修改?
我认为你需要更清楚你想要达到什么目标,以及目前你看到的是什么,如果你想在这里获得有用的帮助。我也不确定这与Selenium有什么关系。 – DaveyDaveDave
“刷新”是指您指示浏览器绕过缓存的术语。在你的功能中,你没有使用浏览器,也没有缓存。那么“刷新”是什么意思? –
正在尝试从jsp页面读取短信代码用于测试中的付款测试用例使用perfecto云与硒环境 –