I need to get the redirected URL so wrote the following code but i get
/* 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
Solved! Go to Solution.
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
Hi,
I think that you should work with the MSXML2.ServerXMLHTTP object but not with aqHTTPRequest.
Create Support ticket via the https://support.smartbear.com/message/?prod=TestComplete form to get a confirmation whether or not aqHTTPRequest has an option to ignore certificate errors and proceed.
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
Subject | Author | Latest Post |
---|---|---|