cancel
Showing results for 
Search instead for 
Did you mean: 

Converted JScript to Javascript project stalling on Log.Message calls

Contributor

Converted JScript to Javascript project stalling on Log.Message calls

Hey, 

 

I have a legacy project in JScript that I am converting to Javascript, and i am hitting what seems to be an odd issues.  If I watch the execution of my scripts, the scripts are stalling when ever there is a Log.Message call.  It is not every log.message, but more often than not, it is stuck.

 

Has anyone run into this?

 

I have a non-converted project running in javascript and am NOT seeing the slow downs when logging.

 

Thanks.

6 REPLIES 6
Community Hero

Re: Converted JScript to Javascript project stalling on Log.Message calls

Stuck meaning it takes longer to run than the other log messages or stuck in that it never moves on?

 

What exactly are those particular log messages recording?  Post them here please.

Contributor

Re: Converted JScript to Javascript project stalling on Log.Message calls

sorry, the execution stalls.  it is not always Log.Message.  there are some .click calls that are slow as well.

 

the main one that stalls every time is this;

 

var xmlDoc = Sys.OleObject("Msxml2.DOMDocument.6.0");
xmlDoc.async = false;

let path = ProjectSuite.Path + "OMITTED" + sXMLFile + "\\" + sXMLFile + ".xml"

Log.Message(path); <----this line

 

Community Hero

Re: Converted JScript to Javascript project stalling on Log.Message calls

Is sXMLFile a string?  If not, that could be a problem.

 

Some other things to try to narrow down the issue:

 

1) Hard code the whole path and put it inside the Log.Message and see if it works without slowing down

2) See if Log.Message(ProjectSuite.Path + "OMITTED" + sXMLFile + "\\" + sXMLFile + ".xml") works without slowing down

 

 

 

 

Contributor

Re: Converted JScript to Javascript project stalling on Log.Message calls

sXMLFile is a string (put a break before the offending Log.Message and it is the proper type)

hard coding the path did not help

 

if i omit this one log.message call, another one down the chain of execution will stall the execution.

 

I am assuming that no one else is experiencing this?

Community Hero

Re: Converted JScript to Javascript project stalling on Log.Message calls

Do you have an "OnLogMessage" event handler configured?  It could be that it's not a problem with the conversion of that code but perhaps something going on in an event handler.


Robert Martin
[Community Expert Group]
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
Extensions available
Contributor

Re: Converted JScript to Javascript project stalling on Log.Message calls

we only have the OnLogError, OnTimeout and OnStartTest hooked up.

New Here?
Join us and watch the welcome video:
Watch the new Interview