URL testProp = UtilURL.fromResource("seleniumXml.properties");
if (testProps == null) {
testProps = new Properties();
if (testProp == null) {
String errMsg = "Cannot resolve location from test.properties.";
throw new MalformedURLException(errMsg);
}
}
internetAccess = UtilProperties.getPropertyAsBoolean("seleniumXml", "internet.access", true);
File file = new File(libPath);
if (internetAccess) {
URL url = new URL(urlSite);
URLConnection connection = url.openConnection();
contentLength = connection.getContentLength();
if (contentLength == -1) {
request.setAttribute("_ERROR_MESSAGE_", "can not conect to the internet");
}
Debug.logInfo("file size. "+contentLength,module);
if (file.exists()) {
if (contentLength == file.length()) {
lib = true;
} else lib = false;
msgMap.put("LIBFLAG",lib);
}
} else {
if (file.exists()) {
msgMap.put("LIBFLAG",true);
} else {
msgMap.put("LIBFLAG", "noInternet");
}
}
/* Check a change use HTTP as the default */
String httpStatus = null;
URL urlProp = UtilURL.fromResource("url.properties");
if (urlProps == null) {
urlProps = new Properties();
if (urlProp == null) {
String errMsg = "Cannot resolve location from url.properties.";
throw new MalformedURLException(errMsg);
}
urlProps = UtilProperties.getProperties(urlProp);
if (urlProps != null) {
httpStatus = urlProps.getProperty("port.https.enabled");
if (httpStatus != null && httpStatus.equals("N")) {