The certificate authority is invalid or incorrect- Web Testing
I need to get the redirected URL so wrote the following code but i get
The certificate authority is invalid or incorrect"
/* Code...*/
function NavigateToFromUrl()
{
var address = "https://www.te**********";
// Create an aqHttpRequest object
var aqHttpRequest = aqHttp.CreateGetRequest(address);
let objXMLHTTP = Sys["OleObject"]("MSXML2.ServerXMLHTTP.3.0");
objXMLHTTP.setOption(2,13056);
// Send the request, get an aqHttpResponse object
var aqHttpResponse = aqHttpRequest.Send();
if (aqHttpResponse != null)
{
// Read the response data
Log.Message(aqHttpResponse.StatusCode); // A status code
Log.Message(aqHttpResponse.StatusText); // A status text
Log.Message(aqHttpResponse.GetHeader("Location"));//Navigated URL
}
}
Any help is appreciated. Thanks
Thanks AlexKaras , My code is working. All it required to work was to restart my pc and its working.
and as you said to ignore certificate issues, MSXML2.ServerXMLHTTP object needs to be used