cancel
Showing results for 
Search instead for 
Did you mean: 

Error:Variable uses an Automation type not supported in VBScript

Highlighted
Frequent Contributor

Error:Variable uses an Automation type not supported in VBScript

Hi,

Error is triggering only when i'm executing the test from QAComplete but when i'm running the same test from TestComplete it's running perfect, not sure how to debug that because it's only triggering while running from QAComplete.

Thanks

 

7 REPLIES 7
Community Hero

Re: Error:Variable uses an Automation type not supported in VBScript

Hi,

 

Any more info about the variable that causes the problem? Where it is initialized? How? With what value? Is this a project/project suite variable? How it is used? Anything else that might provide others with some insights instead of just guessing?

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Frequent Contributor

Re: Error:Variable uses an Automation type not supported in VBScript

Hi Alex,

all i'm trying to do is call out a function that returns me a boolean value. Please see the attached file, test is running fine when executing from test complete , 

thanks

Community Hero

Re: Error:Variable uses an Automation type not supported in VBScript

Hi,

 

And what line errors out?

 

Meanwhile:

a) AuthPage is an object, so

sMainPage=Aliases.browser.AuthPage

must be changed to

Set sMainPage=Aliases.browser.AuthPage

 

b) PageObjExists return value is undefined if Else branch for the

If sPage.Exists

condition is executed;

 

c) As sPage parameter of the PageObjExists() function is an object, I am not sure what the result of string and object concatenation will be at the

Log.Error "PAGE NOT FOUND: "&sPage

line of code.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Frequent Contributor

Re: Error:Variable uses an Automation type not supported in VBScript

Hi Alex,

a. sorry about typo , i've used: Set sMainPage=Aliases.browser.AuthPage

b. Should i use "on error resume next"??

c.trying the object to return a boolen value. 

Please see the updated code. what i'm trying to do is , when user log in to the system it takes some time to load th page, so i'm waiting for the page to load if page found then checking for the object

note: this code works fine when running from test complete, throwing error when running from qacomplete

thanks

Community Hero

Re: Error:Variable uses an Automation type not supported in VBScript

Hi,

 

Should i use "on error resume next"??

No. This is highly not recommended practice that may be used with extreme care in certain cases only. The reason is that the real place and actual error are hidden and this significantly complicates the search of the error root when the code fails somewhere later.

 

throwing error

Where? At what line? What is the contents of the Additional Info pane in the test log?

 

 

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Frequent Contributor

Re: Error:Variable uses an Automation type not supported in VBScript

Hi Alex, it's throwing error right after Click the button to log in and then i'm calling that function to verify,,,,, please see the attachment. Please Note: that this is not reproduceable in TestComplete not sure why, it runs perfect, only when we try to run from QAComplete, so unable to debug this 

Community Hero

Re: Error:Variable uses an Automation type not supported in VBScript

Hi,

 

> so unable to debug this 

Try to use the Runner.Pause() method (https://support.smartbear.com/testcomplete/docs/testing-with/debugging/general-info/activating-debug...).

In the worst case, use ages old debugging technique called 'debug print' and add Log.Message() calls to your code to get the values of the needed variables and to be able to trace what areas of your code were executed and where the failure occurs.

 

> please see the attachment

What is the contents of the Additional Info panel in test log for the error line?

What is the contents of the Call Stack panel?

What exact line of code errors out?

What is the context of execution? What does test code do after clicking the button? What are the values of parameters?

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Here?
Join us and watch the welcome video: