Ask a Question

Object required: 'TestedApps' error

SOLVED
Olya
New Contributor

Object required: 'TestedApps' error

Hello,

I am trying to run the script which is using the extension created by me. But I get an error: Object required: 'TestedApps'.  Here is the function which I am trying to run using WMI object. Can anyone help to handle this error?

 

This is function in my extension

Sub FillLoginForm()
    TestedApps.Items("ApplicationName").Run()
End Sub

 

This is my function call, by using extension

Sub Test()
     WMI.FillLoginForm
End Sub

 

 

 

5 REPLIES 5
Marsha_R
Champion Level 3

TestedApps doesn't want a project name as a parameter.  It wants an application name.

https://support.smartbear.com/testcomplete/docs/reference/project-objects/items/tested-apps/testedap...

Olya
New Contributor

Yes, but in my case the project name matches the application name. 
When I change the code as follows it starts working properly

This is function in my extension

Sub FillLoginForm("App")
    App.Items("ApplicationName").Run()
End Sub

 

This is my function call, by using extension

Sub Test()
     WMI.FillLoginForm TestedApps
End Sub

Marsha_R
Champion Level 3

Is there still a problem?  Looks like you fixed it by updating the parameter.

AlexKaras
Champion Level 3

Hi,

 

script which is using the extension

If you are talking about Script Extension, then TestedApps object is not available to the Script Extension (https://support.smartbear.com/testcomplete/docs/working-with/extending/script/objects-reference/inde...).
But it is interesting that TestedApps object can be passed as a parameter and the code works as expected...

 

Regards,
  /Alex [Community Champion]
____
[Community Champions] 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 Champions]
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 Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
sonya_m
SmartBear Alumni (Retired)

Thank you for your replies Alex and Marsha.

 

@Olya Please let the Community know if there's something else we can help you with. Or, does the fixed code you posted serve as a workaround for you?


Sonya Mihaljova
Community and Education Specialist

cancel
Showing results for 
Search instead for 
Did you mean: