cancel
Showing results for 
Search instead for 
Did you mean: 

strictEqual ---> 'Object Expected'

SOLVED
Highlighted
Contributor

strictEqual ---> 'Object Expected'

Hi All,

 

I ve a question,

When running the function below, an error occurs: Object expected

=============================

function equal()
{
Log.Message(strictEqual(2, 2))
}

=============================

I can't figure out what's wrong whith this code. Even when running it without the Log.Message, it still fails. I'm on TestComplete Desktop 14.3

 

1.png

 

1 - code

2 - error

 

Originally I started with more complicated code, using the strictequal method, as used in this example:

https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqfilesystem/findfolders.h...

 

next, I'm narrowing down the problem to the 'strictEqual' function, as used in the example below:

https://support.smartbear.com/testcomplete/docs/reference/language/javascript/strictequal-method.htm...

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Leader

Re: strictEqual ---> 'Object Expected'

Hi,


I think because "strictEqual" is not compatible with Jscript.


I was trying to run this code on my JavaScript project and evrything was fine.


On newly project with JScript i dont event have this function in intellisense and in documentation it's for JavaScript not for JScript.


I think this is the problem.

 

 

View solution in original post

3 REPLIES 3
Highlighted
Community Leader

Re: strictEqual ---> 'Object Expected'

Hi,


I think because "strictEqual" is not compatible with Jscript.


I was trying to run this code on my JavaScript project and evrything was fine.


On newly project with JScript i dont event have this function in intellisense and in documentation it's for JavaScript not for JScript.


I think this is the problem.

 

 

View solution in original post

Highlighted
Contributor

Re: strictEqual ---> 'Object Expected'

Aha yes,

Looks like it according to this link

 

Thanks!

Highlighted
Community Leader

Re: strictEqual ---> 'Object Expected'

I am happy to help Daniel.

 

Yes, you can convert it, but remember that there are many differences between Jscript and JavaScript.

 

 

New Here?
Join us and watch the welcome video:
Read the Latest News
JuneSCNJ
Top Kudoed Authors