cancel
Showing results for 
Search instead for 
Did you mean: 

"JScript runtime error" at Webservice ClientCertificate object

SOLVED
Highlighted
Occasional Contributor

"JScript runtime error" at Webservice ClientCertificate object

I use the QAComplete's psWS Webservices in my Project with HTTPS protocol. 

My Code:

 

function _Test_Ws()
{
  var tmp = Ws_GetVersion();
  //var tmp = Ws_GetLoginInfo(wsObj);
  
  return true;
}

function ServiceCertificate()
{
  var service, crd, certificate;

  service = WebServices.QAComplete;
  crd = service.Credentials;
  certificate = crd.ClientCertificate;
  certificate.SetCertificateEx(slLocalMachine, snMy, ftFindBySerialNumber, "6b46030c65549b4c83d07690102358f0e315eead");

}

function Ws_GetVersion()
{
  // Ws_GetVersion() - QAComplete GetVersion WebService
  // Out: wsObj - webservice-nek megfelelő objektum

  var wsObj = new Object();

  ServiceCertificate();

  try
  {
    wsObj = WebServices.QAComplete.GetVersion();
    var a = 1;
  }
  catch (e)
  {
    Log.Error(e.name + " \r\n" + e.description);
    Log.Message(WebServices.QAComplete.LastRequest.xml);
    Log.Message(WebServices.QAComplete.LastResponse.xml);
  }

  return wsObj;
}

 

 

It's perfect run in TestComplete and TestExecute v10. When I try run it in v10+ TestComplete or TestExecute I give the next error:

JScript runtime error.
Az objektumot kötelező megadni.
Error location:
Unit: "TestAutomata\TestAutomata\Script\_RunWebservice"
Line: 46 Column: 3.

 

I attached the error in picuter.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Occasional Contributor

Re: "JScript runtime error" at Webservice ClientCertificate object

Thanks for your trying!

I solved the problem! The solution is in the TestComplete parameter.

Tools > Options > Engines > Web Services > Prefferd Web Service API

  • .NET WCF - Default settings
  • Native

I changed this parameter to "Native" from default and now my code works all TC version.

View solution in original post

2 REPLIES 2
Community Hero

Re: "JScript runtime error" at Webservice ClientCertificate object

What it sounds like is that there is a problem at the root with the QAComplete Web Service.  Something doesn't sound like it's compatible with later versions of TC/TE.

 

Can you provide screenshots of that web service within the TestComplete project?


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Highlighted
Occasional Contributor

Re: "JScript runtime error" at Webservice ClientCertificate object

Thanks for your trying!

I solved the problem! The solution is in the TestComplete parameter.

Tools > Options > Engines > Web Services > Prefferd Web Service API

  • .NET WCF - Default settings
  • Native

I changed this parameter to "Native" from default and now my code works all TC version.

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

Changing options from outside of TestComplete

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!
Top Kudoed Authors