cancel
Showing results for 
Search instead for 
Did you mean: 

The certificate authority is invalid or incorrect- Web Testing

SOLVED
prekar
Occasional Contributor

The certificate authority is invalid or incorrect- Web Testing

I need to get the redirected URL so wrote the following code but i get 

"JavaScript runtime error.
The certificate authority is invalid or incorrect"
while sending the request. I tried to enable certificate issues from TestComplete Settings and included code as well. But still it doesn't work.. 

/* 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

1 ACCEPTED SOLUTION

Accepted Solutions
prekar
Occasional Contributor

Re: The certificate authority is invalid or incorrect- Web Testing

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

View solution in original post

2 REPLIES 2
AlexKaras
Community Hero

Re: The certificate authority is invalid or incorrect- Web Testing

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.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
prekar
Occasional Contributor

Re: The certificate authority is invalid or incorrect- Web Testing

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

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors