Object required: 'TestedApps' error
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
TestedApps doesn't want a project name as a parameter. It wants an application name.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there still a problem? Looks like you fixed it by updating the parameter.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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...
/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
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
