Ask a Question

Since this morning getting "Microsoft JScript runtime error.", never encountered before!

royd
Regular Contributor

Since this morning getting "Microsoft JScript runtime error.", never encountered before!

Using TestComplete 12.2, Windows 7, JScript.

 

Since I have started using (for about 3+ months) the following, I have never had any errors. Ran the same script yesterday without any trouble!

 

while (Sys.WaitBrowser("iexplore").Exists)
    {
      // if browser open
      Sys.WaitBrowser("iexplore").Close(500);
    }

runtime.png

 

This morning started to have "Microsoft JScript runtime error. Object doesn't support this property or method" error at the

while (Sys.WaitBrowser("iexplore").Exists)

!

 

Tried several script routines, same error!

 

Desperately need help solving the issue.

 

Dave

7 REPLIES 7
AlexKaras
Community Hero

Hi Dave,

 

Have you tried to execute this loop step-by-step under debugger in TestComplete and check whether the problem persists?

My current understanding is that:

-- There was IE browser running in the system;

-- The loop found it on the first pass and proceeded to .Close() statement;

-- The browser was commanded to close and TestComplete waited for 0.5 sec for the browser process to end;

-- 0.5 sec was not enough for the browser to close thus the second loop pass still found the process and proceeded to .Close() statement;

-- By the moment of actual execution of the .Close() method IE process has ended. This invalidated the reference to the browser process and caused the error.

 

As a quick fix attempt try to increase the parameter of the .Close() method from 500 to, say, 2500 and check if it helps.

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
================================
royd
Regular Contributor

Hi Alex

 

Thanks for your prompt reply. I will give it a try and report ASAP.

 

Dave

royd
Regular Contributor

Just ran it, it got stuck the first time on line 19, did not make it to 21. See capture.

while.png

 

Thanks.

 

Dave

tristaanogre
Esteemed Contributor

WaitBrowser is part of the Web licensing of TestComplete.  If, for some reason, the machine you're on isn't licensed for web application testing then the problem may not be in the time outs or anything but on actually calling "WaitBrowser".

Couple of things to check:

 

1) Go to File | Install Extensions and make sure that the Web option is checked with everything under neath it

2) In your text editor, type Sys. followed by CTRL-SPACE to get the code completion window and see if WaitBrowser shows in there.


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

As @tristaanogre said,If you are not having Web module license then you won't be able to see the WaitBrowser in the Code Completion.

 

We are also having only Desktop module. Please find below screenshot.

 

CC_WebBrowser.png


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”

Extension Available

royd
Regular Contributor

Hi Robert

 

You hit the nail on the head! I have been working with TestComplete for over 6 months now. We have web and mobile license. Never had any problem!

 

I last night I spent hours to figure out what was going on! Finally I decided to create a new suite and start from scrach to see what happens. That is when TestComplete complained "The selected testing type requires the Web Testing plug-in, which is currently disabled. ..."!

 

There is no reason for me to disable it, neither I did so! Anyway, after enabling the plug-in, all is well now.

 

Dave

tristaanogre
Esteemed Contributor

Bizzare...  So, you have the proper license, just the plug-in was disabled.  Not a clue how that happened... glad it's fixed, though.


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
cancel
Showing results for 
Search instead for 
Did you mean: